Fixed Income - Certicificate of Deposit (CD) - Compound Interest Schedule An interest-at-maturity CD earns interest at a compounding frequency, and pays principal plus all earned interest at maturity. Write a function, called CompoundInterestSchedule, that creates and returns a pandas DataFrame, where each row has: time (in years, an integer starting at 1), starting balance, interest earned, and ending balance, for an investment earning compoundedinterest. Use a for(or while) loop to create this table. The equation for theith year's ending balance is given by: Ei =Bi (1+r/f)f where: Ei is year i's ending balance Bi is year i's beginning balance (note: B1 is the amount of the initial investment (principal) r is the annual rate of interest (in decimal, e.g., 5% is .05) f is the number of times the interest rate compounds (times per year) The interest earned for a given year is Ei - Bi Note the term of the investment (in years) is not in the above equation; it is used to determine how many rows the table will have.
Jupyter Notebook
Fixed Income - Certicificate of Deposit (CD) - Compound Interest Schedule
An interest-at-maturity CD earns interest at a compounding frequency, and pays principal plus all earned interest at maturity.
Write a function, called CompoundInterestSchedule, that creates and returns a pandas DataFrame, where each row has: time (in years, an integer starting at 1), starting balance, interest earned, and ending balance, for an investment earning compoundedinterest.
Use a for(or while) loop to create this table. The equation for theith year's ending balance is given by:
Ei =Bi (1+r/f)f
where:
Ei is year i's ending balance
Bi is year i's beginning balance (note: B1 is the amount of the initial investment (principal)
r is the annual rate of interest (in decimal, e.g., 5% is .05)
f is the number of times the interest rate compounds (times per year)
The interest earned for a given year is Ei - Bi
Note the term of the investment (in years) is not in the above equation; it is used to determine how many rows the table will have.
Test your function by calling it, for example: (see image bellow)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images