Present value on a parametric yield curve¶
Problem¶
The yield curve is given by a quadratic function of maturity. Use it to price a five-year bond paying an annual 6% coupon.
Method¶
The yield to maturity at date \(s\) and the corresponding annual rate are:
\[
h(s) = \alpha + \beta s + \gamma s^2, \qquad i(s) = e^{h(s)} - 1
\]
with \(\alpha = 0.0024\), \(\beta = 0.0097\), \(\gamma = 0.0033\). The price is \(\sum_k F_k\,(1 + i(s_k))^{-s_k}\).
Code¶
clear all, clc
% Point 1
% Parameters
F = [6, 6, 6, 6, 106];
s = [1, 2, 3, 4, 5];
alpha = 0.0024;
beta = 0.0097;
gamma = 0.0033;
% Present Value Calculation
Present_value = F_es53(s, F, alpha, beta, gamma)
% xlswrite('CashFlows2.xls', Present_Value_F);
function [valore_attuale_flussi] = F_es53(s, F, alpha, beta, gamma)
% inputs: s := schedule
% F := the flows
% output: present_value
% s and F must have the same dimension
h_sk = alpha + beta * s + gamma * s.^2; % yield to maturity
i_sk = exp(h_sk) - 1; % rate of interest
valore_attuale_flussi = F * ((1 + i_sk).^(-s))'; % present value of the cash flow (flows times discount factors)
end
import numpy as np
# %% function F_es53
def F_es53(s, F, alpha, beta, gamma):
# inputs: s := schedule
# F := the flows (same length as s)
# output: present value of the flows
h_sk = alpha + beta * s + gamma * s**2 # yield to maturity
i_sk = np.exp(h_sk) - 1 # rate of interest
valore_attuale_flussi = F @ ((1 + i_sk) ** (-s)) # flows times discount factors
return valore_attuale_flussi
# %% Point 1
F = np.array([6, 6, 6, 6, 106])
s = np.array([1, 2, 3, 4, 5])
alpha = 0.0024
beta = 0.0097
gamma = 0.0033
Present_value = F_es53(s, F, alpha, beta, gamma)
print("Present_value =", Present_value)
Results¶
Present value: 75.02.
The curve rises steeply: the annual rate is 1.55% at 1 year and 14.27% at 5 years, so the final payment of 106 is discounted heavily.
Takeaways¶
- A parametric curve gives a rate for any maturity with three numbers; the quadratic term dominates at long maturities.
- A 6% bond priced at 75 is consistent with the curve: at 5 years the rate is far above the coupon.