Sub topic 1
Discounting Cash Flows: The Foundation
A bond is a promise of dated cash payments. Pricing it means converting those payments into one number today. This chapter builds that conversion from first principles, and every later chapter reuses it.
Prerequisites
This chapter assumes you already have:
- Present value (PV) and future value (FV) with compound interest.
- Basic algebra, including exponents and solving for one unknown.
- Familiarity with a financial calculator, such as the BA II Plus or HP 12C.
- A general idea of what a bond is: a loan that pays interest and returns principal.
If you can compute 1,000 × 1.05³ by hand or on a calculator, you are ready.
The Core Idea: Money Has a Time Dimension
A euro received today is worth more than a euro received next year, because today's euro can be invested. Discounting converts a future cash flow into its equivalent today. Compounding does the reverse.
The two basic relationships are:
- Future value: FV = PV × (1 + r)^N
- Present value: PV = FV / (1 + r)^N
Here r is the rate per period and N is the number of periods. The quantity 1 / (1 + r)^N is the discount factor. It is always between 0 and 1 for positive rates, and it shrinks as N or r grows.
Matching the Rate to the Period
The most common error in bond math is a mismatch between the rate and the period. The rate and N must use the same time unit.
If a stated annual rate compounds m times per year, the rate per period is the stated rate divided by m. The number of periods is the years multiplied by m.
| Stated annual rate | Compounding | Rate per period | Periods for 5 years |
|---|---|---|---|
| 8% | Annual | 8% | 5 |
| 8% | Semiannual | 4% | 10 |
| 8% | Quarterly | 2% | 20 |
| 8% | Monthly | 0.6667% | 60 |
For example, 1,000 invested at a stated 8% compounded semiannually for 5 years grows to 1,000 × 1.04^10 = 1,480.24.
Effective Annual Rate
Different compounding frequencies are not directly comparable. To compare them, convert each to an effective annual rate (EAR):
EAR = (1 + stated rate / m)^m − 1
For the 8% semiannual example, EAR = 1.04² − 1 = 8.16%. More frequent compounding gives a higher EAR for the same stated rate.
The EAR matters for bonds because yields are quoted on a stated annual basis with a convention. For example, a semiannual-pay bond quotes a yield "on a semiannual bond basis". This is the stated rate, not the EAR. Later chapters rely on that distinction.
Annuities and Uneven Cash Flows
A bond mixes two kinds of cash flow patterns:
- A series of equal payments (the coupons), which is an annuity.
- A single lump sum at the end (the principal).
There are two ways to value the annuity part. The first is to discount each payment separately and add them. The second is to use the closed form for an ordinary annuity, where payments arrive at the end of each period:
PV = C × [1 − (1 + r)^−N] / r
Both methods give the same answer. The closed form is faster by hand, and the explicit sum is clearer when cash flows differ.
Worked Example: A Three-Year Bond
Take a bond with par value 100 that pays a 5% annual coupon for 3 years. Discount at 4%.
- Coupon at year 1: 5 / 1.04 = 4.8077
- Coupon at year 2: 5 / 1.04² = 4.6228
- Final coupon plus par at year 3: 105 / 1.04³ = 93.3446
- Sum: 102.7751
Now check this with the annuity formula. The coupon annuity is worth 5 × [1 − 1.04^−3] / 0.04 = 13.8755. The par value is worth 100 / 1.04³ = 88.8996. The total is again 102.7751.
The price is above par because the 4% discount rate is below the 5% coupon rate. The next chapters develop this relationship in full.
Implementing It in Python
The functions below implement each idea in this chapter. They run as written.
def future_value(pv, rate, periods):
return pv * (1 + rate) ** periods
def present_value(fv, rate, periods):
return fv / (1 + rate) ** periods
def effective_annual_rate(stated_rate, m):
return (1 + stated_rate / m) ** m - 1
def annuity_pv(payment, rate, periods):
"""Ordinary annuity: payments at the end of each period."""
return payment * (1 - (1 + rate) ** -periods) / rate
def pv_of_cash_flows(cash_flows, rate):
"""cash_flows is a list of (time_in_periods, amount) pairs."""
return sum(cf / (1 + rate) ** t for t, cf in cash_flows)
# Lump sum
print(round(present_value(1000, 0.05, 3), 4)) # 863.8376
# Semiannual compounding: rate per period and periods both adjusted
print(round(future_value(1000, 0.08 / 2, 5 * 2), 4)) # 1480.2443
print(round(effective_annual_rate(0.08, 2), 4)) # 0.0816
# Three-year 5% bond discounted at 4%, two ways
flows = [(1, 5), (2, 5), (3, 105)]
explicit = pv_of_cash_flows(flows, 0.04)
closed = annuity_pv(5, 0.04, 3) + present_value(100, 0.04, 3)
print(round(explicit, 4), round(closed, 4)) # 102.7751 102.7751The pv_of_cash_flows function is the template for bond pricing. A bond price is a call to it with the bond's coupons and principal.
Common Errors
- Mixing units. Using an annual rate with a semiannual period count is the most frequent mistake. Convert both, as in the table above.
- Confusing the stated rate with the EAR. Dividing the EAR by m does not give the periodic rate. Only the stated rate divided by m does.
- Wrong timing. The annuity formula assumes payments at the end of each period. For payments at the start (an annuity due), multiply the result by (1 + r).
- Calculator mode. On a BA II Plus, set payments per year to 1 and keep sign conventions consistent. Cash paid out is negative and cash received is positive. If PV and FV have the same sign, the solver often returns an error or a negative N.
- Early rounding. Rounding discount factors to two or three decimals can shift a bond price by several cents. Keep full precision until the final answer.
Why This Matters for the Rest of the Tutorial
Everything that follows is a variation on one calculation, sum of cash flow divided by (1 + r)^t. Yield to maturity is the r that makes the sum equal the market price. Spot-rate pricing uses a different r for each cash flow. Duration measures how the sum responds when r changes. If this chapter is solid, those chapters are extensions rather than new ideas.
Exercise
What is the present value of 10,000 received in 4 years, if the stated annual rate is 6% compounded quarterly?
Show answer
The rate per period is 6% / 4 = 1.5%, and the number of periods is 4 × 4 = 16. PV = 10,000 / 1.015^16 = 10,000 / 1.268986 ≈ 7,880.3.
Exercise
A deposit account states a 12% annual rate compounded monthly. What is its effective annual rate?
Show answer
The rate per month is 12% / 12 = 1%. EAR = 1.01^12 − 1 ≈ 0.126825, or about 12.68%. This is higher than the 12% stated rate because of intra-year compounding.
Exercise
A 2-year bond with par value 100 pays a 6% annual coupon. Using the discounting method from this chapter, what is its price when the discount rate is 6%? Explain the result without calculating the full sum first.
Show answer
Cash flows are 6 at year 1 and 106 at year 2. PV = 6 / 1.06 + 106 / 1.06² = 5.6604 + 94.3396 = 100.0000. The price equals par because the discount rate equals the coupon rate, so the bond pays exactly the return investors require.