Tutorials › Exam FM - Financial Mathematics › Cash-Flow Derivatives Behind Duration and Convexity

Exam FM · Redington Immunization · Tutorial 621 of 998

Cash-Flow Derivatives Behind Duration and Convexity

See how yield derivatives turn each dated cash flow into duration and convexity contributions, and practice calculating and interpreting the resulting measures.

Advanced 11 min read

What You'll Learn

  • Differentiate a finite present-value sum with respect to an annual effective yield
  • Distinguish Macaulay duration from modified duration
  • Derive annual-compounding convexity from the second price derivative
  • Interpret present-value weights for positive and signed cash flows
  • Check derivative-based measures against the cash-flow schedule

Why Cash-Flow Derivatives Matter

Duration and convexity are often introduced as summary measures of how a price responds to a yield change. Their source is a simple operation: differentiate the present value of each dated payment with respect to the yield, then combine the results. This makes the role of payment time explicit. A later payment contributes more to the first and second derivatives than an otherwise equal earlier payment.

The formulas below use an annual effective yield \(y>-1\), with annual compounding. The cash flows are fixed, deterministic amounts paid at specified integer times. They do not change when the yield changes, and the finite schedule has no embedded options or other yield-dependent behavior. Cash flows may be positive or signed; when all are positive, the present-value weights have a particularly direct interpretation.

Definition: For fixed cash flows \(C_t\) at times \(t=1,\ldots,n\), the price at annual effective yield \(y\) is \(P(y)=\sum_{t=1}^{n}C_t(1+y)^{-t}\). Define the present value of the time-\(t\) cash flow as \(PV_t=C_t(1+y)^{-t}\). If \(P(y)\ne0\), its present-value weight is \(w_t=PV_t/P(y)\), so \(\sum_{t=1}^{n}w_t=1\).

For a portfolio of ordinary positive cash flows, \(P(y)>0\) and the weights are nonnegative, so they sum to one like the weights in a weighted average. For signed cash flows, some weights may be negative. They still sum to one when price is nonzero, but they are not probabilities and a duration calculated from them need not lie between the earliest and latest payment times.

First Derivative: Duration

Differentiate one discounted payment while holding its amount \(C_t\) fixed. The power rule gives

$$ \frac{d}{dy}\left[C_t(1+y)^{-t}\right] =-tC_t(1+y)^{-t-1} =-\frac{t}{1+y}PV_t. $$

Because the schedule is finite, the derivative of the sum is the sum of the derivatives. Thus the price slope is

$$ P'(y)=-\frac{1}{1+y}\sum_{t=1}^{n}tPV_t. $$

The weighted average payment time is Macaulay duration. Dividing its time-weighted present value by price gives the definition below. The price's proportional first-derivative sensitivity is modified duration.

Definition: When \(P(y)\ne0\), Macaulay duration is \(D_{\mathrm{Mac}}=\sum_{t=1}^{n}tw_t=\frac{\sum tPV_t}{P(y)}\). Modified duration under annual compounding is \(D_{\mathrm{mod}}=-\frac{P'(y)}{P(y)}=\frac{D_{\mathrm{Mac}}}{1+y}\). Therefore \(P'(y)=-P(y)D_{\mathrm{mod}}\).

The minus sign is important: for positive fixed cash flows, an increase in yield reduces price, so \(P'(y)<0\). Macaulay duration is measured in years when payments are annual; modified duration is the local proportional price sensitivity per unit change in annual yield. The derivative is with respect to \(y\) expressed as a decimal, not a percentage-point number. These definitions use annual compounding; with another yield convention, first write the matching price formula and differentiate it rather than reusing the annual formula without adjustment.

Worked Example: Reading Duration From Present Values

A hypothetical bond pays \(\$105\) at the end of year 1 and \(\$231.525\) at the end of year 3. Its annual effective yield is \(5\%\). Find its price, Macaulay duration, and modified duration. Use the present-value-weight method, and avoid treating payment amounts as duration weights.

At \(y=0.05\), the discount factors for years 1 and 3 are \(1/1.05\) and \(1/(1.05)^3\). The present values are

$$ PV_1=\frac{105}{1.05}=100,\qquad PV_3=\frac{231.525}{(1.05)^3} =\frac{231.525}{1.157625}=200. $$

The price is \(P=100+200=\$300\). The present-value weights are \(w_1=100/300=1/3\) and \(w_3=200/300=2/3\); they sum to 1. Hence

$$ D_{\mathrm{Mac}}=1\left(\frac13\right)+3\left(\frac23\right) =\frac73=2.3333\text{ years}, \qquad D_{\mathrm{mod}}=\frac{7/3}{1.05} =2.2222. $$

As a derivative check, \(P'=-(100+3\cdot200)/1.05=-700/1.05=-666.6667\). Then \(-P'/P=666.6667/300=2.2222\), matching modified duration. The method uses discounted values, not the undiscounted payments \(\$105\) and \(\$231.525\); using those amounts directly would give the wrong weights.

Second Derivative: Convexity

Differentiate each discounted payment a second time. Applying the power rule twice gives

$$ \frac{d^2}{dy^2}\left[C_t(1+y)^{-t}\right] =t(t+1)C_t(1+y)^{-t-2} =\frac{t(t+1)}{(1+y)^2}PV_t. $$

Summing over the finite schedule yields

$$ P''(y)=\frac{1}{(1+y)^2}\sum_{t=1}^{n}t(t+1)PV_t. $$

Annual-compounding convexity is the second price derivative relative to price. Substituting the present-value weights gives its cash-flow form.

Definition: For \(P(y)\ne0\), annual-compounding convexity is \(\mathcal{C}=\frac{P''(y)}{P(y)}=\frac{1}{(1+y)^2}\sum_{t=1}^{n}t(t+1)w_t\). Equivalently, \(P''(y)=P(y)\mathcal{C}\).

The factor \(t(t+1)\) comes from differentiating the discount factor twice; it is not \(t^2\). Convexity is not simply the weighted average of squared payment times under this convention. The additional \(t\) in \(t(t+1)\) and the factor \((1+y)^{-2}\) are both required. For positive cash flows, \(P''(y)>0\), so the price curve is locally convex as a function of yield. Signed cash flows can make the second derivative positive, zero, or negative.

Worked Example: Calculating Convexity From a Three-Payment Schedule

A hypothetical security pays \(\$110\) at year 1, \(\$242\) at year 2, and \(\$399.30\) at year 3. Its annual effective yield is \(10\%\). Find price, Macaulay duration, modified duration, and annual-compounding convexity. Use the derivative formulas and avoid applying a convexity formula that omits the second-derivative factor.

Discount each payment at \(y=0.10\):

$$ PV_1=\frac{110}{1.1}=100,\qquad PV_2=\frac{242}{(1.1)^2}=\frac{242}{1.21}=200,\qquad PV_3=\frac{399.30}{(1.1)^3}=\frac{399.30}{1.331}=300. $$

Therefore \(P=100+200+300=\$600\), with weights \(1/6,\ 1/3,\ 1/2\). The weighted payment time and modified duration are

$$ D_{\mathrm{Mac}} =\frac{1(100)+2(200)+3(300)}{600} =\frac{1400}{600} =\frac73=2.3333, \qquad D_{\mathrm{mod}}=\frac{7/3}{1.1} =\frac{70}{33}=2.1212. $$

For the second derivative, the time factors are \(1(2)=2\), \(2(3)=6\), and \(3(4)=12\). Their present-value-weighted sum is

$$ 2(100)+6(200)+12(300)=200+1200+3600=5000. $$

Thus \(P''=5000/(1.1)^2=5000/1.21=4132.2314\), and

$$ \mathcal{C}=\frac{4132.2314}{600} =\frac{5000/600}{1.21} =\frac{2500}{363}=6.8871. $$

As a direct check, \(P''=P\mathcal{C}=600(6.8870523)=4132.2314\). The displayed duration and convexity are rounded to four decimal places. In particular, the year-3 payment contributes \(12PV_3\) to the unscaled second-derivative sum, not \(9PV_3\); using only \(t^2\) would be a different and incorrect calculation for this definition.

Signed Cash Flows and Interpretation

The same differentiation works for a net stream containing receipts and payments, provided each signed amount is fixed as yield varies. This is useful when forming the present value of an asset-minus-liability surplus. But if the net present value is zero, the ratios \(D_{\mathrm{mod}}=-P'/P\) and \(\mathcal{C}=P''/P\) are undefined. Even when price is nonzero, signed present-value weights can make the resulting ratios unintuitive. In those cases, the derivatives \(P'\) and \(P''\) themselves remain the direct quantities to calculate.

Worked Example: Derivatives of a Signed Net Cash-Flow Stream

At an annual effective yield of \(5\%\), a hypothetical net stream receives \(\$315\) at year 1, pays \(\$110.25\) at year 2, and receives \(\$243.10125\) at year 4. Receipts are positive and the payment is negative. Find its price, first and second price derivatives, modified-duration ratio, and convexity ratio. Use signed present values, avoiding the mistake of discarding the liability outflow.

Discount the signed amounts:

$$ PV_1=\frac{315}{1.05}=300,\qquad PV_2=-\frac{110.25}{(1.05)^2}=-100,\qquad PV_4=\frac{243.10125}{(1.05)^4}=200. $$

The price is \(P=300-100+200=\$400\), and the signed weights are \(3/4,\ -1/4,\ 1/2\). Their sum is 1. The time-weighted sum is \(1(300)+2(-100)+4(200)=900\), so

$$ P'=-\frac{900}{1.05}=-857.1429,\qquad -\frac{P'}{P}=\frac{900}{1.05(400)}=2.1429. $$

For the second derivative, the signed sum is \(2(300)+6(-100)+20(200)=4000\). Therefore

$$ P''=\frac{4000}{(1.05)^2} =\frac{4000}{1.1025}=3628.1179,\qquad \mathcal{C}=\frac{P''}{P}=9.0703. $$

The direct checks are \(P(-P'/P)=857.1429=-P'\) and \(P\mathcal{C}=3628.1179=P''\). Ratios are rounded to four decimal places. The negative year-2 present value reduces both weighted sums. Treating it as a positive amount would change the stream rather than merely simplify the calculation.

Calculation Checks and Limits

These derivative identities are exact for the stated finite fixed-cash-flow model. They do not require a small yield change. A local price approximation may use the derivatives, but it is a separate step: the derivative formulas alone do not guarantee that an approximation remains accurate for a large rate movement. For this tutorial, the essential checks are that the same yield and compounding convention are used throughout, each payment is discounted to obtain its weight, and the \(t(t+1)\) factor is retained for the second derivative.

For positive cash flows, duration is a present-value-weighted average time and convexity is positive. For signed cash flows, the weighted-average interpretation and positivity need not hold. A zero or negative net price also prevents the usual normalized ratios from having their standard price-sensitivity interpretation. State the cash-flow signs and verify the price before reporting those ratios.

1
Fix the yield model.
Write the annual-compounding price as a finite sum and specify the yield at which derivatives are evaluated.
2
Discount every dated amount.
Calculate signed \(PV_t\) values, then add them to find \(P\).
3
Form the derivative sums.
Use \(tPV_t\) for the first derivative and \(t(t+1)PV_t\) for the second.
4
Normalize only when appropriate.
If \(P\ne0\), divide the first and second derivatives by price to obtain the usual ratios; interpret them with care for signed streams.
Key takeaway: Payment time enters through differentiation of the discount factor: \(t\) for the first derivative and \(t(t+1)\) for the second. Present-value weights combine these contributions, while the annual yield factors \(1+y\) and \((1+y)^2\) convert them to modified duration and annual-compounding convexity.

Check Your Understanding

For each problem, use the annual-compounding definitions above. Round reported ratios to four decimal places unless an exact value is requested.

  1. A hypothetical note pays \(\$104\) at year 1 and \(\$216.32\) at year 2. The annual effective yield is \(4\%\). Find its price, Macaulay duration, modified duration, and convexity. (Answer: \(P=\$300\), \(D_{\mathrm{Mac}}=1.6667\), \(D_{\mathrm{mod}}=1.6026\), \(\mathcal{C}=4.3146\).)
  2. A fund receives \(\$110.25\) at year 2 and \(\$231.525\) at year 3. Its annual effective yield is \(5\%\). Find its price, modified duration, and convexity. (Answer: \(P=\$300\), \(D_{\mathrm{mod}}=2.5397\), \(\mathcal{C}=9.0703\).)
  3. A security pays \(\$110\), \(\$242\), and \(\$399.30\) at the ends of years 1, 2, and 3, respectively. At a \(10\%\) annual effective yield, find price, Macaulay duration, modified duration, and convexity. (Answer: \(P=\$600\), \(D_{\mathrm{Mac}}=2.3333\), \(D_{\mathrm{mod}}=2.1212\), \(\mathcal{C}=6.8871\).)
  4. A signed net stream at a \(5\%\) annual effective yield has present values \(+\$300\) at year 1, \(-\$100\) at year 2, and \(+\$200\) at year 4. Find its price and the ratios \(-P'/P\) and \(P''/P\). (Answer: \(P=\$400\), \(-P'/P=2.1429\), \(P''/P=9.0703\).)
  5. A positive-cash-flow portfolio has total present value \(\$400\) at a \(5\%\) annual effective yield. Its only payments occur at years 1 and 4, and its Macaulay duration is 2.5 years. Find the present value assigned to each payment time, modified duration, and convexity. (Answer: year 1 present value \(=\$200\), year 4 present value \(=\$200\), \(D_{\mathrm{mod}}=2.3810\), \(\mathcal{C}=9.9773\).)
Clinical Biostats