gic_calculator.gic_plotting

Module Contents

Functions

gic_plotting(principal, term_lengths[, gic_rates])

GIC interest plotting

gic_calculator.gic_plotting.gic_plotting(principal, term_lengths, gic_rates=None)[source]

GIC interest plotting

Generate, output and export a bar chart to visualize the interest(s) accrued after investment(s) in GIC (Guarenteed Investment Certificate) for comparison.

Parameters:
  • principal (float) – The principal (initial amount) to be invested in the GIC account.

  • term_lengths (list) – A list of the term length (duration) per each investment. To be one of the following standard options: 90, 180, 270, 1, 1.5, 2, 3, or 5 correspond to 90 days, 180 days, 270 days, 1 year, 1.5 years, 2 years, 3 years, 5 years.

  • gic_rates (list, optional) – A list of the GIC rate for the term length and investment type (fixed / cashable). This information can be found on your bank’s website. If a value is not provided by the user, default values will be used based on the specifed term length, as follows (GIC rates have units of percent): 90 days = 1.40, 180 days = 3.90, 270 days = 5.10, 1 year = 4.90, 1.5 years = 4.80, 2 years = 4.10, 3 years = 4.00, 5 years = 3.75.

Returns:

An Altair Chart object representing the bar chart of total interest accrued per each investment

Return type:

altair.vegalite.v4.api.Chart

Examples

>>> from gic_calculator.gic_plotting import gic_plotting
>>> gic_plotting(principal=1000, term_lengths=[90, 180])