1. Change of period and term structure
Why limit yourself to annual time periods and constant interest rates? This video explains how you can go beyond this rigid structure, while enjoying the flexibility of the notation developed so far.
2. Moving away from constant, yearly interest
In real-life you will face two questions: first, how to deal with interest rates when the time unit changes? and second, how to go from a constant interest rate to a rate that changes over time?
3. From yearly to $m$th-ly interest rates
Assume a yearly interest rate i. Which rate is then applicable to the mth part of a year? i*m denotes the rate applicable to such a period. Obviously, you can now calculate in two ways how much 1 euro at time 0 is worth at time 1. With the yearly rate, 1 euro grows to 1+i euro but at the same time this should be equal to (1+i*m)^m. This equality allows you, for instance, to go from a yearly to a monthly rate.
4. From yearly to $m$th-ly interest rates in R
Let's start from a given interest rate of 3% per year. You obtain the monthly_interest with the transformation derived earlier. Here, a yearly interest of 3% is equivalent to a monthly interest of 0-point-2466%. You can verify this result by transforming back: 1 plus the monthly_interest is how 1 euro grows over one month. Raise this to the power 12 and you find the accumulated value of 1 euro over one year. Subtracting one, the initial capital, gives the yearly rate. That's again 3%!
5. Non-constant interest rates
You can now deal with the second question: how to go from a constant interest rate to a rate that changes over time? In reality, interest rates are not necessarily constant over time. The so-called term structure of interest rates reflects the relationship between interest rates or bond yields and different terms or maturities. We wish to incorporate interest rates changing over time in our framework.
6. Non-constant interest rates
Instead of working with a fixed rate i, the interest rate now changes over time. i0 is the rate applicable to the first year, between time 0 and time 1; i1 is the rate in the second year, and so on.
1 euro at time 0 is worth 1 euro at time 0. Thus, v(0,0) should be 1.
7. Non-constant interest rates
1 euro at time 1 becomes 1 over 1+i0 euro at time 0.
8. Non-constant interest rates
And to discount 1 euro at time 2 to the present moment you multiply the discount factor 1 over 1+i0, applicable to the first year, and 1 over 1+i1, applicable to the second year.
9. Non-constant interest rates
And so on!
10. Non-constant interest rates
The rates ik are given at the present moment, but they apply to a future time period. That's why people in finance would call them forward rates. This illustration demonstrates how discounting works when interest rates change over time.
11. Non-constant interest rates in R
Here the rate is 4% in the first year, 3% in the second year, and then 2 and 1% in years three and four. You store these rates in the interest vector. You create the yearly discount factors from these rates as 1 plus the applicable interest rate to the power minus 1.
To quickly go from the yearly discount factors to multi-year discount factors you can use the cumprod() function in R. This function returns a vector whose elements are the cumulative products of the elements of the original vector. Since 1 euro at time zero stays 1 euro you extend the vector returned by the cumprod() function with 1. As such, the vector discount_factors stores the discount factors to go from 0 to 0, from 1 to 0, and eventually from 4 to 0.
12. Let's practice!
Those were two big steps. Time to translate theory to practice!