To calculate the Macaulay duration and convexity of a bond, we’ll use the following formulas:
Macaulay Duration
The Macaulay duration D is given by:
$$D = \cfrac{\sum_{i=1}^{N} \cfrac{i \cdot C}{(1 + YTM)^i} + \cfrac{N \cdot FV}{(1 + YTM)^N}}{PV}$$
Convexity
The convexity CONV is given by:
$$CONV = \cfrac{\sum_{i=1}^{N} \cfrac{i \cdot (i+1) \cdot C}{(1 + YTM)^{i+2}} + \cfrac{N \cdot (N+1) \cdot FV}{(1 + YTM)^{N+2}}}{PV}$$
Given the bond details from the previous question:
$$\begin{aligned}
FV & = 1000 \\
C & = 0.05 \times 1000 = 50 \\
N & = 10 \\
YTM & = 0.04 \\
PV & \approx 1081.11\end{aligned}$$
Plugging in the values:
$$\begin{aligned}
D & \approx \cfrac{\frac{50}{1.04} + 2 \cdot \frac{50}{1.04^2} + \ldots + 10 \cdot \frac{50}{1.04^{10}} + 10 \cdot \frac{1000}{1.04^{10}}}{1081.11} \\
& \approx \cfrac{48.08 + 92.46 + 133.36 + \ldots + 337.78 + 6755.60}{1081.11} \\
& \approx 7.57\end{aligned}$$
For convexity:
$$\begin{aligned}
CONV & \approx \cfrac{\frac{50}{1.04^2} + 3 \cdot \frac{50}{1.04^3} + \ldots + 110 \cdot \frac{50}{1.04^{12}} + 110 \cdot \frac{1000}{1.04^{12}}}{1081.11} \\
& \approx \cfrac{46.23 + 133.36 + \ldots + 370.86 + 7417.20}{1081.11} \\
& \approx 72.31\end{aligned}$$
Thus, the Macaulay duration of the bond is approximately 7.57 years, and the convexity is approximately 72.31.