Valuing Contracts with Multiple Cash Flows

Table of Contents

In this presentation, we'll look at the valuation of contracts that are comprised of multiple cash flows. We'll cover the following:

1 Annuities

An annuity is a contract which pays a fixed amount at the end of each period for a fixed number of periods. Many common financial contracts are annuities, such as fixed-rate mortgages and auto loans. If the payments are in the beginning of a period (such as renting an apartment) the contract is known as an annuity due.

The annuity is defined by its:

  • \(r\) rate per period
  • \(n\) number of periods
  • \(C\) cash flow per period

It is important that each quantity you use is over the same period, i.e. don't use a yearly rate with monthly payments.

2 The Present Value of an Annuity

To calculate the present value (PV) of an annuity, we can simply discount each payment individually, to the same period, and sum them:

\(PV_0 = \frac{C}{(1+r)^1} + \frac{C}{(1+r)^2} + ... + \frac{C}{(1+r)^n}\)

Note the PV is at time 0 (one period before the first payment in time 1). This calculation is very easy to do in a spreadsheet. But annuities have been around for a long time, so historically we have used a simplified version of the above equation. Specifically, the above is equal to:

\(PV_0 = C(\frac{1 - \frac{1}{(1+r)^n}}{r})\)

2.1 PV of an Annuity Calculator

Future Value of a Single Cash Flow Calculator

Cash Flow per Period:
Number of Periods:
Rate Per Period:

Present Value of the Annuity:




2.2 Python calculation

def present_value_annuity(C, rate, periods):
    return C * (1 - 1 / pow(1 + rate, periods)) / rate

C = 100
rate = 0.07
periods = 10

print(round(present_value_annuity(C, rate, periods), 2))

702.36

3 Solving for C in the PV of an Annuity

You can use the above formula to find your monthly mortgage payment. Say you are going to borrow \$150,000 to buy a house, and your 30-year mortgage rate is 5\%. We can plug these values into the formula:

\[$150,000 = C(\frac{1 - \frac{1}{(1 + \frac{0.05}{12})^{12(30)}}}{\frac{0.05}{12}})\]

rearranging for \(C\) (the monthly payment) gives:

$C = \\(805.23\)

The general formula is:

\[C = \frac{PVA(r)}{1 - 1/(1+r)^n}\]

3.1 Cash Flow Per Period in an Annuity Calculator

Cash Flow in an Annuity Calculator

Present Value of the Annuity:
Number of Periods:
Rate Per Period:

Cash Flow per Period:




3.2 Python calculation

def cash_flow_per_period(pva, rate, periods):
    return C * (1 - 1 / pow(1 + rate, periods)) / rate

C = 100
rate = 0.07
periods = 10

print(round(present_value_annuity(C, rate, periods), 2))

4 Solving for n in the PV of an Annuity

Rearranging the formula for the present value of the annuity affords:

\[n = \frac{ln\left(\frac{C}{C - PVA(r)\right)}}{ln(1+r)}\]

4.1 How Long Will It Take To Pay Off Your Credit Card? (solving for n)

5 Solving for r in the PV of an Annuity

To solve for \(r\) we need to find the root of an \(n\) degree polynomial, which we can do with an optimizer (such as in the example below or using =IRR() in Excel, which both use the Newton-Raphson algorithm).

from scipy import optimize

C = 100
years = 10
annuity_present_value = 702.36 

def eq(YTM):
    return(C * (1 - 1 / pow(1 + YTM, years)) / YTM - annuity_present_value)

root = optimize.newton(eq, 0.1) ## 0.1 is our initial guess

print("The rate per period is: ", round(root * 100, 2), "%")
The rate per period is:  7.0 %

6 The Future Value (FV) of an Annuity

We can instead push each cash flow into the last period and find the total value of the payments then. This is the future value (FV) of the annuity.

The FV at the last period of the annuity (time \(n\)) is simply:

\(FV_n = C(1+r)^{n-1} + C(1+r)^{n-2} + ... + C\)

This is equivalent to:

\(FV_n = C\left(\frac{(1 + r)^n - 1}{r}\right)\)

6.1 Future Value of an Annuity Calculator

Future Value of an Annuity Calculator

Cash Flow per Period:
Number of Periods:
Rate Per Period:

Future Value of the Annuity:




6.2 C++ Calculation

#include <cmath>
#include <iostream>
using namespace std;

double future_value_annuity(double c, double rate, double periods){
return(c * (pow((1 + rate), periods) - 1) / rate);
}

double C = 100;
double rate = 0.07;
double periods = 10;

int main(){
double ans = future_value_annuity(C, rate, periods);
cout << ans;
 return 0;
}
1381.64

6.3 Rearranging for the Cash Flow per Period

\(C = \frac{FV_n(r)}{\left((1 + r)^n - 1\right)}\)

7 Saving for Retirement and the FV of an Annuity

Calculating the FV of an annuity is most often used in retirement calculations. For example, if you put $300 per month into an account earning 4% annual interest, how much money would you have in the account in 30 years?

You will have \(300\frac{(1 + \frac{0.04}{12})^{30(12)} - 1}{\frac{0.04}{12}} = 298,214.80\)

pmt_per_period = 300 
periods = 30 * 12
rate_per_period = 0.04 / 12

FV = pmt_per_period * (pow(1 + rate_per_period, periods) - 1) / rate_per_period

print("The Future Value of the Annuity is: ", round(FV, 2))
The Future Value of the Annuity is:  208214.82

8 Solving for C in FVA

\(C = \frac{FVA(r)}{(1 + r)^n - 1}\)

9 Solving for r in FVA

=IRR() in Excel or optimization.

Example in python:

from scipy import optimize

pmt_per_period = 300 
periods = 30 * 12
FV = 208214.82

def find_rate(r):
    return(pmt_per_period * (pow(1 + r, periods) - 1) / r - FV)

root = optimize.newton(find_rate, 0.1) ## 0.1 is our initial guess
## note, there are not multiple roots here, but if there were would this root finder list them????

print("The monthly rate is: ", round(root * 100, 2), "%")
print("The rate per year (quoted rate) is: ", round((root * 12) * 100, 2), "%")
The monthly rate is:  0.33 %
The rate per year (quoted rate) is:  4.0 %

10 Solving for n in FVA

See the 'Saving for Retirement' document.

11 A Growing Annuity

A growing annuity is a contract which pays a constantly increasing amount at the end of each period for a set number of periods.

  • For example, the following is a growing annuity: a contract which pays $\\(100\) in the next period, and $\\(100(1 + r)^i\) in period \(i\), where \(i\) ranges from 1 to the final period \(n\), and \(r\) is the growth rate per period. The value of a growing annuity at time \(0\) is:

12 PV of a Growing Annuity

The PV of a growing annuity is:

\(PV_0 = \frac{C}{(1+r)} + \frac{C(1+g)}{(1+r)^2} + ... + \frac{C(1+g)^{n-1}}{(1+r)^n}\)

which can simplified to:

\(PV = C(\frac{1-(\frac{1+g}{1+r})^n}{r - g})\)

Feel free to try the calculation, and check your answer on the calculator on the next slide.

12.1 Present Value of a Growing Annuity Calculator

Present Value of a Growing Annuity Calculator

Cash Flow per Period:
Number of Periods:
Discount Rate Per Period:
Growth Rate Per Period:

Present Value of the Growing Annuity:




13 FV of a Growing Annuity

The FV of a growing annuity (in the last period \(n\)) is:

\(FV_n = C(1 + r)^{n-1} + C(1+g)(1+r)^{n-2} + ... + C(1+g)^{n-1}\)

which can be simplified to:

\(FV_n = C(\frac{(1+r)^n - (1+g)^n}{r - g})\)

where \(r \neq g\). Note the future value is at period n.

Again, you can try the calculation, and check your answer using the following calculator.

Present Value of a Growing Annuity Calculator

Cash Flow per Period:
Number of Periods:
Discount Rate Per Period:
Growth Rate Per Period:

Future Value of the Growing Annuity:




14 Perpetuity

A perpetuity is a contract which pays a fixed amount at the end of each period for an infinite number of periods. Despite having an infinite number of payments, the PV is a finite amount (assuming a positive interest rate). This is because later payments become negligible.

The present value of a perpetuity is:

\(PV = \frac{C}{1+r} + \frac{C}{(1+r)^2} + \frac{C}{(1+r)^3} + \ldots =\frac{C}{r}\)

15 Applications of the Perpetuity

Likely the best known perpetuity is preferred stock. Preferred stock pays a fixed dividend, unlike common stock whose dividend changes over time.

Say ABC company's preferred stock pays a fixed dividend of $7 per year every year. The discount rate is 10%. Then the preferred stock is worth:

\(PV = \frac{7}{0.10} = 70\)

16 A Growing Perpetuity

A growing perpetuity is a contract which pays a constantly increasing amount at the end of each period for an infinite number of periods. That is, if the first payment is $\\(C\), then the following payments are $\\(C(1+g)\), $\\(C(1+g)^2\), … off to infinity.

Assuming \(g < r\) the PV of the growing perpetuity is:

$PV = \frac{C}{1+r} + \frac{C(1+g)}{(1+r)^2} + \frac{C(1+g)^2}{(1+r)^3} + … = \frac{C}{r-g}

If \(g \geq r\) then then the value is infinite.

17 Applications of the Growing Perpetuity

Perhaps the most famous application is the Gordon Growth Model of stock valuation. The model assumes a stock's dividends grow at a constant rate. Since stock is infinitely lived, we can find the PV of the dividends (the stock's value), as the PV of a growing perpetuity.

  • Say XYZ Corp pays yearly dividends, and next year's dividend will be $5. XYZ's dividends are expected to grow at 3% in perpetuity, and its discount rate is 7%. The value of XYZ's stock is:

\(PV = \frac{5}{0.07 - 0.03} = 125\)

18 Irregular Cash Flows

A contract with Irregular cash flows is any contract that has a cash flow structure other than those listed above.

  • As mentioned earlier, annuity formulas allowed computationally easy valuation, and therefore use, of the above contracts. However present computing power makes valuation of any stream of cash flows very easy.
  • So the valuation of irregular cash flows can simply be done by applying the formulas for single cash flows to each individual cash flow in the contract.

19 Reading Ease Score


"Flesch-Kincaid reading ease score: 99.08 Very easy (5th grade)"


"Flesch-Kincaid grade level score: 3.16"

Author: Matt Brigida, Ph.D.

Created: 2021-01-25 Mon 11:48

Validate