Execution of the home task on Term Structure (Pricing, Vasicek Model, Monte Carlo Simulation, Bond Option,) with all the results produced in Matlab program including the doc report on the project Vasicek model
1) Vasicek model. Compute the price of a zero-coupon bonds with the Vasicek model. Use the function vbond.m with the following initial values:
• ro - initial short rate = 0.05
• k - speed of mean reversion = 0.025
• theta - long run risk-neutral mean short rate = 0.15
• sigma - annual volatility of short rate = 0.012
• t - time to evaluate price at = 0
• T - maturity of bond = 1, 2, 3„ 30 years
function P=vbond(ro,k,theta,sigma,t,T)
B=(1-exp(-k.*(T-t)))/k; A=exp((theta-sigma*sigma/2/k/k).*(B-(T-t))-sigma*sigma.*B.*B/4/k); V]=vrate(ro, k, theta, sigma, t);
P=A.*exp(-B.*M +.5.*B.*B.*V);
Exercise 1 Plot the term structure of interest rates - remember that the y(t, T) = -1/T-t log P(t, T). Describe the term structure.
Exercise 2 Compute the term structure of interest rates with the value of ro= 0.17. What is the difference between the two term structures? Why?
Exercise 3 Compare the 10-year bond price obtained with the exact formula and that with Monte Carlo. Do the same for the 5-year bond.
Exercise 4 Price with 200 Monte Carlo simulations the price of a 10-year bond with the CIR model, i.e.
drt = k(0 - rt)dt + σ√rtdWt
Remember that for the CIR we have
E[rt] = roe-kt + θ(1 - e-kt)
Var[rt] = rooσ2/k (e-kt e-2kt) + θσ2/2k(1 e-kt)2
and
rt˜c.Χ2 (4kθ/σ2, rte-kt/c)
where c = (1-ekT)σ2/4k, and Χ2 (.) is a non-central chi-Squared distribution with 4kθ/σ2 degrees of freedom and non-centrality parameter rte-kt/c. Use the Matlab function ncx2rnd(4kθ/σ2, rte-kt/c).
Exercise 5 ADDITIONAL POINTS. Simulate the distribution. Compare the exact price
P(t, T) = A(t, T) exp(- B (t,T) . rt)
where
A(t,T) = ((2h exp(k + h)(T - t)/2)/(2h + (k + h)(exp(T - t)h) - 1)2kθ/σ2
B(t,T) = (2 (exp((T - t)h) - 1))/ (2h+ (k + h)(exp(T - t)h) - 1)
h = √k2 +2σ2
you can also use the Matlab built-in functions, with the Monte Carlo price ob¬tained in the previous exercise.
Exercise 6 Consider a call option on a 10-year bond, with strike equal to the 5-year bond price (see exercise above). The option expires in 5 years. Use a Monte Carlo simulation to price this call option and compare it with the exact pricing (use the function vbondop . m) .
Exercise 7 Do the same exercise with strikes = 0.5, 0.7, 0.9 (i.e. in-the-money and out-of-the money). See what happens with different strikes.