Teach
So far, interest has been constant. Many contracts specify rates that change over time — for example, a loan at 5% for two years followed by 6% thereafter. This lesson accumulates and discounts when the rate is piecewise constant or otherwise time-varying.
Piecewise-constant rates
Divide the timeline into intervals with effective rate over each interval. The from to is the product of single-period factors: