1. EXPANDED LESSON OBJECTIVES (10 TARGETS)
By the end of this lesson, you will be able to:
-
Derive the discrete and continuous compounding formulas for the Time Value of Money (TVM) from first principles.
-
Implement the Net Present Value (NPV) and Internal Rate of Return (IRR) calculations using iterative numerical methods.
-
Model the full bond pricing equation, accounting for coupon frequency, day-count conventions, and accrued interest.
-
Differentiate between Yield to Maturity (YTM), Current Yield, and Spot Rates.
-
Derive Macaulay Duration, Modified Duration, and Dollar Duration mathematically using partial derivatives.
-
Apply Convexity to improve the accuracy of price change predictions under large yield shifts.
-
Solve the bond immunization problem using linear algebra to match asset and liability durations.
-
Construct the zero-coupon yield curve using the bootstrapping methodology with cubic spline interpolation.
-
Calculate forward rates from the spot curve using the no-arbitrage condition.
-
Quantify the price impact of a yield curve shift using key rate durations (KRD).
2. THE MATHEMATICAL FOUNDATION OF TIME VALUE OF MONEY
At its core, money has a time-dependent value due to opportunity cost, inflation, and default risk. The fundamental principle is that a dollar today is worth more than a dollar tomorrow.
A. DISCRETE COMPOUNDING:
Let PV be the present value, FV be the future value, r be the nominal annual interest rate (decimal), n be the number of compounding periods per year, and t be the number of years. The future value formula is:
FV = PV * (1 + r/n)^(n*t)
The present value (discounting) is the inverse:
PV = FV / (1 + r/n)^(n*t)
B. CONTINUOUS COMPOUNDING (THE LIMIT):
As n → ∞, the compounding interval shrinks to zero. We use the mathematical identity:
lim_{n→∞} (1 + r/n)^n = e^r
Therefore, the continuous compounding formulas become:
FV = PV * e^(r * t)
PV = FV * e^(-r * t)
In FinTech, continuous compounding is preferred for derivatives pricing because it simplifies calculus (the derivative of e^(rt) is r * e^(rt)). For bond pricing, however, discrete compounding is often used to match coupon payment frequencies.
C. EFFECTIVE ANNUAL RATE (EAR) VS. ANNUAL PERCENTAGE RATE (APR):
-
APR is the nominal rate (r) before considering compounding.
-
EAR is the actual annual return after compounding:
EAR = (1 + r/n)^n – 1
For continuous compounding, the EAR is:
EAR = e^r – 1
EXAMPLE (BANK DEPOSIT): A bank offers an APR of 6% compounded monthly. The EAR is (1 + 0.06/12)^12 – 1 = 0.061678 (6.1678%). If the same 6% is compounded continuously, the EAR is e^(0.06) – 1 = 0.061837 (6.1837%). The difference is approximately 1.65 basis points, which becomes significant for multi-billion dollar portfolios.
D. PERPETUITIES AND ANNUITIES:
-
An annuity is a series of equal payments C at regular intervals for a finite period T. The PV of an annuity is:
PV_Annuity = C * [1 – (1 + r)^(-T)] / r
-
A perpetuity is an annuity that lasts forever (T → ∞). The PV simplifies to:
PV_Perpetuity = C / r
In FinTech, perpetuities are used to model the terminal value of a platform’s projected free cash flows beyond a forecast horizon.
3. NET PRESENT VALUE (NPV) AND INTERNAL RATE OF RETURN (IRR)
A. NET PRESENT VALUE (NPV):
For a project with a series of cash flows C_0 (initial investment, negative), C_1, C_2, …, C_T, the NPV is:
NPV = Σ_{t=0}^T C_t / (1 + r)^t
If we use continuous discounting, it becomes:
NPV = Σ_{t=0}^T C_t * e^(-r * t)
The decision rule: Accept the project if NPV > 0. The discount rate r is the weighted average cost of capital (WACC) of the firm.
B. INTERNAL RATE OF RETURN (IRR):
The IRR is the discount rate r* that makes the NPV equal to zero:
Σ_{t=0}^T C_t / (1 + r*)^t = 0
NUMERICAL SOLUTION (NEWTON-RAPHSON METHOD):
There is no closed-form solution for the IRR when T > 3. The FinTech system uses the Newton-Raphson iterative method:
r_{k+1} = r_k – f(r_k) / f'(r_k)
Where:
-
f(r) = Σ_{t=0}^T C_t / (1 + r)^t
-
f'(r) = -Σ_{t=1}^T t * C_t / (1 + r)^(t+1)
The algorithm iterates until |r_{k+1} – r_k| < ε, where ε is typically 10^(-8). The initial guess r_0 is usually set to 0.1 (10%). If the cash flows have multiple sign changes (non-normal cash flows), multiple IRRs can exist. In that case, the system uses the Modified IRR (MIRR), which assumes reinvestment at the firm’s cost of capital, ensuring a unique solution.
4. BOND PRICING – THE FULL MATHEMATICAL MODEL
A bond is a debt security that pays periodic coupons (C) and the principal (Face Value F, usually 100 or 1000) at maturity T.
A. PRICE FORMULA (WITH SEMI-ANNUAL COMPOUNDING):
Most corporate and government bonds pay coupons semi-annually. Let:
-
y = Yield to Maturity (YTM) expressed as an annual rate, but converted to per-period rate: y_period = y / 2.
-
m = Number of coupon payments per year (usually 2).
-
T = Years to maturity.
-
n = Total number of periods = m * T.
The bond price P (clean price) is:
P = Σ_{i=1}^n C / (1 + y/m)^i + F / (1 + y/m)^n
This is a geometric series. We can express it in closed form using the annuity formula:
P = C * [1 – (1 + y/m)^(-n)] / (y/m) + F / (1 + y/m)^n
B. DAY-COUNT CONVENTIONS (ACCURATE INTEREST ACCRUAL):
The market does not price bonds only on coupon dates. The full price is the Dirty Price = Clean Price + Accrued Interest. The accrued interest (AI) is:
AI = (Coupon_Payment) * (Days_Since_Last_Coupon / Days_in_Coupon_Period)
Different markets use different day-count conventions:
-
ACT/ACT (Actual/Actual): Used for US Treasuries. Actual number of days divided by the actual number of days in the coupon period.
-
30/360: Used for corporate bonds. Assumes 30 days per month and 360 days per year. The AI formula is:
AI = C * (30 * ΔMonth + ΔDay) / 360
-
ACT/365: Used for some money-market instruments.
The accurate pricing engine uses the day-count fraction τ to discount cash flows:
P_Dirty = Σ_{i=1}^n CF_i / (1 + y/m)^(τ_i)
where τ_i is the exact time fraction from the settlement date to the cash flow date.
C. YIELD TO MATURITY (YTM):
YTM is the single discount rate that equates the present value of all future cash flows to the current bond price. It is calculated by solving the bond price equation for y. This also requires the Newton-Raphson method because the equation is non-linear.
D. SPOT RATES AND THE ZERO-COUPON YIELD CURVE:
YTM assumes a flat yield curve, which is unrealistic. The theoretically correct way to price a bond is to discount each cash flow using a unique spot rate (r_i) that corresponds to the maturity of that cash flow:
P = Σ_{i=1}^n CF_i / (1 + r_i)^(τ_i)
The term structure of interest rates (the yield curve) is the function r(τ) mapping maturity τ to the zero-coupon rate. This curve must be constructed from market data (discussed in Section 8).
5. DURATION – THE MATHEMATICAL SENSITIVITY MEASURE
Duration measures the sensitivity of a bond’s price to changes in interest rates.
A. MACAULAY DURATION (WEIGHTED AVERAGE TIME):
Frederick Macaulay defined duration as the weighted average maturity of the bond’s cash flows, where the weights are the present values of the cash flows:
D_Mac = Σ_{i=1}^n [ τ_i * (CF_i / (1 + y/m)^i) ] / P
Where τ_i is the time (in years) until the i-th cash flow. The denominator is the bond price P. Macaulay duration is expressed in years.
B. MODIFIED DURATION (PRICE CHANGE PER YIELD CHANGE):
Modified duration is the negative of the logarithmic derivative of price with respect to yield:
D_Mod = – (1/P) * (dP / dy) = D_Mac / (1 + y/m)
The approximate percentage change in bond price for a small change in yield (Δy) is:
ΔP / P ≈ -D_Mod * Δy
Example: If a bond has a Modified Duration of 7.5, and yields increase by 50 basis points (0.005), the price falls by approximately 7.5 * 0.005 = 0.0375 (3.75%).
C. DOLLAR DURATION (DV01 – DOLLAR VALUE OF 01):
DV01 measures the dollar price change for a 1 basis point (0.0001) change in yield:
DV01 = D_Mod * P * 0.0001
This is a critical risk metric for trading desks. If a portfolio has a DV01 of $5,000, it means that if interest rates rise by 1 basis point, the portfolio loses $5,000.
6. CONVEXITY – THE SECOND-ORDER EFFECT
Duration is a linear approximation (first-order Taylor series). For large yield changes, the price-yield relationship is convex (a bond’s price falls faster when yields decline and slower when yields rise). We correct the approximation using Convexity.
A. MATHEMATICAL DERIVATION (TAYLOR SERIES):
We expand the price function P(y) around a point y_0 using a second-order Taylor series:
P(y) ≈ P(y_0) + P'(y_0) * (y – y_0) + (1/2) * P”(y_0) * (y – y_0)^2
Dividing by P(y_0), we get:
ΔP / P ≈ -D_Mod * Δy + (1/2) * Convexity * (Δy)^2
Where:
Convexity = (1/P) * (d^2P / dy^2)
B. CASH FLOW FORMULA FOR CONVEXITY:
For a bond with discrete cash flows, the convexity (in periods) is:
Convexity_Period = (1/P) * Σ_{i=1}^n [ CF_i * τ_i * (τ_i + 1) ] / (1 + y/m)^(i+2)
To convert to annual convexity, we divide by m^2 (where m is the compounding frequency per year):
Convexity_Annual = Convexity_Period / m^2
C. PORTFOLIO IMMUNIZATION (MATCHING DURATION AND CONVEXITY):
Immunization is a strategy to shield a portfolio from interest rate risk. A bank wants to match the duration of its assets and liabilities so that a parallel yield curve shift does not change its net worth.
The conditions for perfect immunization:
-
PV(Assets) = PV(Liabilities)
-
D_Mod(Assets) = D_Mod(Liabilities)
-
Convexity(Assets) > Convexity(Liabilities) (to profit from large rate moves).
Linear Algebra Solution: If we have m assets and m liabilities, we solve a system of linear equations for portfolio weights w_j:
Σ_{j=1}^m w_j * PV_j = PV_L
Σ_{j=1}^m w_j * (D_j * PV_j) = D_L * PV_L
Σ_{j=1}^m w_j * (C_j * PV_j) ≥ C_L * PV_L
This is a constrained optimization problem solved using Lagrange multipliers.
7. KEY RATE DURATION (KRD) – NON-PARALLEL SHIFTS
The yield curve does not always shift in parallel. The KRD approach, introduced by Thomas Ho, decomposes duration into sensitivity to specific key maturities (e.g., 2-year, 5-year, 10-year, 30-year).
DEFINITION: KRD_i is the percentage change in the bond’s price due to a 100 basis point change in the spot rate at maturity i, holding all other spot rates constant:
KRD_i = – (1/P) * (∂P / ∂r_i)
The sum of all KRDs equals the Modified Duration of the bond if all rates shift in parallel:
Σ_{i} KRD_i = D_Mod
This is extremely useful for hedging a portfolio against steepening or flattening of the yield curve. A bank using KRD can set up a hedge using 2-year, 5-year, and 10-year futures contracts to neutralize the portfolio’s exposure to changes in the shape of the curve.
8. BOOTSTRAPPING THE ZERO-COUPON YIELD CURVE (CONSTRUCTION)
Market instruments (Treasury bills, notes, and bonds) trade with coupon payments. To obtain the pure zero-coupon spot rates (r_i), we use the bootstrapping algorithm.
ASSUMPTION: We have n bonds with maturities τ_1 < τ_2 < … < τ_n. Each bond has known cash flows CF_{i,j} at times τ_j.
THE RECURSIVE ALGORITHM:
-
For the shortest maturity (a 6-month T-bill), the spot rate r_1 is directly observable because it has no coupon:
r_1 = (Face_Value / Price – 1) * (1 / τ_1)
-
For the next maturity (a 1-year bond with a coupon C), we know the first cash flow (C) must be discounted using the already-known r_1. The equation is:
P_2 = C / (1 + r_1) + (C + F) / (1 + r_2)^2
We solve for r_2:
r_2 = [ (C + F) / (P_2 – C / (1 + r_1)) ]^(1/2) – 1
-
We continue this process recursively for all maturities.
INTERPOLATION (CUBIC SPLINE):
The bootstrapping algorithm only gives discrete points. To get a continuous yield curve, we interpolate using a Cubic Spline (a piecewise polynomial of degree 3). We define r(τ) as a cubic function on each interval [τ_i, τ_{i+1}]:
r(τ) = a_i + b_i * (τ – τ_i) + c_i * (τ – τ_i)^2 + d_i * (τ – τ_i)^3
The coefficients a_i, b_i, c_i, d_i are solved by ensuring:
-
Continuity of r(τ) at the knots.
-
Continuity of the first derivative (r'(τ)) and second derivative (r”(τ)) at the knots.
-
Boundary conditions (e.g., Natural Spline: r”(τ_1) = 0 and r”(τ_n) = 0, or the Nelson-Siegel-Svensson parametric form for a smooth curve).
FORWARD RATES (NO-ARBITRAGE CONDITION):
The forward rate (f_{t1,t2}) is the interest rate agreed upon today for a loan that starts at time t1 and ends at time t2. It is derived from the spot curve using the no-arbitrage condition:
(1 + r_{t2})^{t2} = (1 + r_{t1})^{t1} * (1 + f_{t1,t2})^{t2 – t1}
Solving for f:
f_{t1,t2} = [ (1 + r_{t2})^{t2} / (1 + r_{t1})^{t1} ]^(1/(t2 – t1)) – 1
In continuous terms, the forward rate is simply:
f(t1, t2) = (r_{t2} * t2 – r_{t1} * t1) / (t2 – t1)
The instantaneous forward rate f(t) is the limit as t2 → t1:
f(t) = r(t) + t * r'(t)
This is the derivative of the continuously compounded spot rate curve. Forward rates are critical for pricing interest rate swaps, futures, and exotic derivatives.
9. FLOATING RATE NOTES (FRNS) AND THE PAR CURVE
An FRN pays a coupon that resets periodically to a reference rate (e.g., SOFR, EURIBOR). The coupon at time t_i is set equal to the forward rate from the previous reset date.
PRICING FORMULA: Under the risk-neutral measure, an FRN is always priced at par (face value) on the reset date because the coupon reset ensures the bond’s value returns to par. The price of an FRN is:
P_FRN = PV(Coupon_Stream) + PV(Principal)
In practice, the price is modeled as:
P_FRN = Face_Value * ( (1 + r_0 * d_0) / (1 + r_m * d_m) + Σ_{i=1}^n ( (r_i * d_i) / (1 + r_i * d_i) ) )
Where r_i is the forward rate for the period. FinTech systems use the OIS (Overnight Indexed Swap) curve to discount the cash flows because OIS rates reflect the risk-free rate (collateralized by government securities).