Example Usage

The tutorial below provides an example of how the gic_calculator can be employed in a practical use case.

Saving for College (and Pizza!) With GICs

In the financial industry, Guaranteed Investment Certificates (GICs) are an excellent way to invest and save for a goal without the risk or volatility associated with stock purchases. As such, they are a great way for students to save for college. In this tutorial, we will work through an example outlining the case where a student, Eva, has $5000.00 in principal which she is looking to invest in either Bank A (default GIC rates) or Bank B (competitor with custom GIC rates). Eva wants to know with which GIC rates and term length she will be able to earn the highest return on her investment (hopefully she will be able to pay tuition AND buy food while in school 🍕!).

Interest Calculator

First, Eva wants to know how much interest she will be able to earn on each investment based on a fixed term length of 1 versus 3 years at Bank A’s default GIC rates. In order to do this, she runs the following code to run the interest_calc function from her command line:

from gic_calculator.interest_calculator import interest_calc
interest_calc(5000, 1)
(4.9, 245.0)

This returns two values: 4.9 and 245.00. This refers to a GIC rate of 4.9% and an interest accrual of $245.00, respectively, after a term length of 1 year. Next, Eva calculates the interest accrued after 3 years with the default GIC rate.

interest_calc(5000, 3)
(4.0, 624.32)

This returns the values 4.0 and 624.32. This refers to a GIC rate of 4.0% and an interest accrual of $624.32, respectively. Wowza, what a difference! 🤑

Eva is shrewd with her money, though, and wants to compare the rates at a different bank just to check if she can get a better deal (let’s see if she can squeeze a few more bucks out of this investment)! In order to do this, she’ll need to enter Bank B’s interest rates manually in the interest_calc function. Bank B is offering 5.5% GIC rates for a 1 year fixed term, and 3.5% for a 3 year term. She completes this in the below step:

interest_calc(5000, 1, 5.5)
(5.5, 275.0)

This returns the values 5.5 and 275.00. This refers to a GIC rate of 5.5% and an interest accrual of $275.00, respectively. Hmm…this is 30 dollars more than Bank A. Eva knew that her shrewdness would pay off! 🕵️‍♀️

However, the 3 year term at Bank A is still better overall. Eva decides to check the return for Bank B on a 3 year term, to see if their offering is better. The code she ran is as follows:

interest_calc(5000, 3, 3.5)
(3.5, 543.59)

This returns the values 3.5 and 543.59. This refers to a GIC rate of 3.5% and an interest accrual of $543.59, respectively. Hmm…this is about 80.73 dollars less than Bank A’s return after 3 years. Oh well, it’s always good to double check. 🤷‍♀️ At least Eva knows that she’s getting the best return with Bank A! 💸

GIC Difference

Eva now has the interest return on her $5000 principal for 1 year and 3 year terms with Bank A and Bank B, but she still wonders what the difference in total return is between term lengths and varied GIC rates for each bank. The calculate_gic_difference function is here to provide this information for Eva!

In order to calculate the difference in total return for Bank A with default GIC rates, Eva now runs the following code from her command line:

from gic_calculator.gic_difference import calculate_gic_difference
calculate_gic_difference(1, 3, 5000)
379.32

This returns the value 379.32, which corresponds to a difference in total return of $379.32 (principal plus interest accrual) between the 1 and 3 year terms at Bank A. Next Eva will calculate the same for Bank B. Remember that Bank B has different interest rates for each term, so Eva enters these in manually, as follows:

calculate_gic_difference(1, 3, 5000, 5.5, 3.5)
268.59

This returns the value 268.59, which corresponds to a difference in total return of $268.59 between the 1 and 3 year terms at Bank B for interest rates of 5.5% and 3.5%, respectively.

GIC Plotting

Eva didn’t realize that there would be such a big difference in return amounts between the two investments until she calculated it using calculate_gic_difference! 🤑

But HOLD ON! What are the interests she would have earned again??? 😳

Apart from the numbers, it’s always nice to have a chart to illustrate the difference between the two investments. Then she can easily see the difference between the investment options and make a smart decision. 😎

To create the chart comparing the GIC investment options at Bank A, Eva runs the the following code:

from gic_calculator.gic_plotting import gic_plotting
gic_plotting(5000, [1, 3])

Wow! Now she knows the investment after 3 years seems to be way better after looking at the chart. The interest she would earn is almost 2.5 times the interest from the investment after 1 year! She is going to be rich!💰

Apart from that, Eva has heard of a great rate from a friend of a friend - a 1-year investment with an GIC rate of 4% (this is the best her friend has ever seen!). Eva wants to know which is better, the rate from Bank A, or the hot tip from her friend!

Eva decides to plot a chart of both Bank A’s GIC rate and the friend’s rate:

gic_plotting(5000, [1, 1], [None, 4.0])

The chart shows that the interest from Bank A’s GIC is actually higher than the friend’s suggested investment. Seemingly, the “best thing” might not always be good! 🤔 Eva decides to go ahead and purchase the 3-year GIC from Bank A. Great job on the analysis Eva!!

Aside

Now for the most important math (outside of the scope of the gic_calculator package, but of dire personal importance to Eva) - at an average pizza price of 20 dollars for a large pizza, will Eva be able to survive the semester? Assume that 1 large pizza will last Eva 3 meals. At an interest accrual of $624.32, Eva will be able to purchase 31 pizzas, which will last her a total of 93 meals. Assuming that Eva eats 3 nutritious pizza meals per day, she will only have enough money for 31 days of pizza! Oh no!! Eva sighs 😞 … I guess that she’ll have to get a job at Domino’s (the employee discount will come in very handy!).

So go ahead, give it a try! Who knows, you might just save enough for tuition and have a little extra for a celebratory pizza party. 🍕 Happy saving!