# Pricing Interest Rate Risk Derivatives Using Binomial Trees with MATLAB

Seminar Paper 2017 32 Pages

## Excerpt

## Contents

1 Abstract

2 A Binomial Approximation of Vasicek’s Term Structure Model

3 Valuation of Bonds and Derivatives

3.1 Part I

3.2 Part II

4 Conclusion

Appendices

References

## 1 Abstract

In this assignment we approximate Oldrich Vasicek’s (1977) term structure model with a binomial approach and show that it is convenient to use a recombining bino- mial tree to value interest rate derivatives in the Vasicek model. First, we illustrate that our applied binomial approximations converge to the dy- namic continuous-time Vasicek model with an increasing number of time steps (sub- periods). Furthermore, we apply the binomial approach to value a Discount Bond, Coupon Bond and a Futures Contract on both a Discount and Coupon Bond. The resulting approximations will be compared to the respective analytical solution, which we use as a benchmark.

Thirdly, we determine the fair value of both an European and American Call and Put on a Discount Bond and Coupon Bond, respectively. We demonstrate that our estimated binomial prices converge with an increasing number of time steps. More- over, we analyze both the behaviour of a Sraddle on a Discount Bond and the Early Exercise Premium of the considered American Options as a function of spot interest rates.

We obtain all results shown in this report from the software * M atlab*. Hence, the submitted * m.f iles* should be taken as a reference for a better understanding of the calculation procedures described in this report (Relevant Code is depicted in the Appendices).

Furthermore, to reduce computational effort and required time to run our code we apply a joint calculation of specific approximations rather than run a code individu- ally for each Task. This is mainly because some specific securities and interest rate derivatives require the same underlying and identical matrices of the interest rates and transition probabilities from the binomial trees for the approximation procedure. This approach is suitable because we apply the identical number of subperiods for specific Tasks and, thus, for the respective securities and or derivatives.

## 2 A Binomial Approximation of Vasicek’s Term Structure Model

To price a contingent claim, we first need to specify the driving process of the respective underlying source of uncertainty. Hence, in our case of interest rate- contingent claims we need a dynamic model for the term strucuture of interest spot rates. In the following, we will apply Oldrich Vasicek (1977) dynamic model. In this model the spot interest rate * r* (*t*) follows the so-called Ornstein-Uhlenbeck (or mean-reverting Wiener model^{1} ) process *dr* (*t*) = *κ* (*μ − r* (*t*)) *dt* + *σ dw* (*t*) (1) with the constant parameters *κ* (mean reversion factor) *μ* (long-run average of the interest rate) and *σ* (interest rate volatility). Basically *κ* reflects the adjustment speed of the interest rate towards *μ*. The speed of adjustment is greater for higher values of *κ* and vice versa. If *r > μ* then the drift is negative, and when *r < μ* is present, the drift is positive (Ritchken (1996), p.543).

For an interest rate at time *t* 0 (*r* (0) = *r* 0), the spot interest rate at time T (*r* (*T*)) is normally distributed with mean (Vasicek (1977), p. 185)

*E* [ *r* (*t*) *| r* 0] = *μ* + (*r* 0 *− μ*) *e −κ* (*t − t* ^{0} ) (2)

and variance

*σ* ^{2}

*V ar* [ *r* (*t*) *| r* 0] =

2 *κ* (^{1} *− e −* ^{2} *κ* (*t − t* ^{0} )) *.*

(3)

As the interest rates are normally distributed, we could obtain negative interest rates with this process. However, when * t* 0 *→ −∞*, the distribution becomes stationary with * E* [ *r* (*t*)] = *μ* and * V ar* [ *r* (*t*)] = *σ* ^{2} */* 2 *κ*. As a result, the probability that interest rates become negative is largely mitigated (Ritchken (1996), p. 543). In the following, we want to approximate the term structure model of Vasicek (1977) with a binomial approach. First, we discretize the time to maturity (*T − t* 0) into * n * subperiods with width

Δ *t* =

*T − t* 0

*n*

(4)

Over each time increment, the interest rate can either increase to a specific level or decrease to another one with step size

*√*

*r* + *σ* Δ *t* = *ru*

*r*

*√*

*r −σ* Δ *t* = *rd*

*Figure 1: Step Size of Interest Rate r.*

As a result, we get a recombining binomial tree with the transition probability of an upward move (u)

1 *κ* (*μ − r*) *√*

*q* (*r*) =

2+^{2} *σ*

Δ *t * (5)

and the transition probability of a downward move (d)

*p* (*r*) =

2 *−* ^{2} *κ* (*σ*

*√*

Δ *t. * (6)

Both probabilities depend on the state variable r, thus, they are not constant over time. Moreover, we settle the transition probabilities q and p to the interval *I* = [0 *, . . . ,* 1] if they end up out of *I* and, in turn, obtain censored probabilities. We compute the whole process in the function "*Binomial* _ *T ree.m*" (see Binomial_Tree.m) in the lines 6-21 by typing ” *′ r, q, p ′*” (as a mode-type) as an inputvariable in our function in. This is helpful because we can access the same calculationprocess for r, q and p with only one line in the master-file "*Assignment.m*" (see Assignment.m) through the mentioned function.

With Matlab we calculate r, q, p and all other approximations with a lower triangular matrix approach as depicted exemplary below:

Abbildung in dieser Leseprobe nicht enthalten

*Figure 2: Exemplary Matlab Binomial Tree.*

*f* is a generic value and represents the respective result for the individual nodes for all of our approximation values and matrices r, q, p and w examined here. In general, the upper diagonal in Figure (2) represents the pure up-moves and the left-handed vertical side the sole down-moves of the binomial tree. Each node is weighted with its respective transition probability *q* (see eq. (5)) or *p* (see eq. (6)). The dots illustrate the continued zero-values.

To obtain our approximations we use backward induction. We start at the expiration date * T* and determine the terminal values from the binomial tree for each state of the respective security. Subsequently, we value the respective price at each intermediate subperiod working backward in time until we reach *t* 0. Thus, the respective price at each node in time *t* is calculated as follows:

*ft* = *e − r t* Δ *t* (*fu t* +Δ *t · qr t* + *fd t* +Δ *t · p r t*) *.* (7)

However, for the approximation of the Futures Contract Value we do not discount the second term with * exp* (*− rt* Δ *t*) in (7) to obtain the final estimation. Hence, our initial point or the aproximation result for * t* 0 is always stored in the node (1,1). On the one hand, the matrix can become considerably large for increasing numbers of * n* and contains many zero-values, which are not relevant for our calcula- tion of the approximations. This can increase the computational effort significantly. More than the higher accuracy we would obtain as * n* increases. On the other hand, this approach enables us to use the computational power of Matlab more efficiently because we do not need to start our binomial tree in the middle of the matrix, which would create an even bigger matrix.

To gain a recombining binomial tree of the spot interest rates called ’ *r* ’ we use *n* = 10 subperiods and the following data:

Abbildung in dieser Leseprobe nicht enthalten

*Table 1: Parameter Values.*

In general, the parameter values are comprehensively relevant for all of our approx- imations.

The resulting matrix *r* contains both negative and positive interest spot rates. Overall, the lowest value is *−* 37 *.* 50% and the highest is 42 *.* 50%.

We also determine the state-dependent transition probabilities * q* and * p*, and the total probability * w* to hit any point (j,k) of the binomial matrix in Matlab starting from * t* 0 (see for calculation process * Binomial* _ *T ree.m*, Lines 40-48). To access the calculation of * w* in our function * Binomial* _ *T ree.m* we need to type in "’ *r, q, p, w* ’" as a mode-type. The function then distinguishes the mode-type (Line 23) and leads us to the demanded calculation procedure and returns the matrices for * r*, * q*, * p* and *w* as output variables.

We observe for increasing values of * n* that the frequency distribution of the interest rate converges to a normal distribution at time * T* as depicted below in Figure (3).

Abbildung in dieser Leseprobe nicht enthalten

*Figure 3: Frequency Distribution at T of Interest Rate r.*

Therefore, we can show that for increasing values of * n* and, hence, diminishing Δ *t* (see equation (eq.) (4)) the binomial procedure converges to the continous- time Vasicek model because the increments of the Ornstein-Uhlenbock process are normally distributed (Vasicek (1977), p. 185). This observation is also true when we compare the analytical solution for the expectation (eq. (2)) and variance (eq. (3)) of spot interest rates with our numerical approximations for varying numbers of subperiods. In total, our both approximations converge for higher values of *n* and coincide significantly already for *n* = 100, respectively, as Table (2) shows.

Abbildung in dieser Leseprobe nicht enthalten

*Table 2: Numerical Approximation: Expectation and Variance.*

## 3 Valuation of Bonds and Derivatives

### 3.1 Part I

In this section, we first approximate the closed-form solution for a Discount Bond, Coupon Bond, both Forwards and Futures on Discount Bond, as well as Futures on Coupon Bonds. Subsequently, we approximate the fair value of both European Call and Put Options on Discount Bonds and of a Straddle on a Discount Bond. We obtain all approximations with a binomial approach as outlined in chapter 2.

Our analytical solution for a Discount Bond is provided by Vasicek (1977), pp. 185,186:

*D* (*r, t, T* = *exp* (*− A* (*t, T*) *· r* (*t*) *− B* (*t, T*)) (8)

*A* (*t, T*) =

*κ* (^{1} *− e − κ* (*T − t*))

*σ*

(9)

*B* (*t, T*) = *− A* (*t, T*) *· R* + (*T − t*) *· R* +

with

*σ*

4 *κ* ^{3} (^{1} *− e − κ* (*T − t*))^{2}

(10)

(11)

*R* = *μ−*

2 *κ* ^{2}

(12)

Closed-form solution (11) is implemented in the Matlab-function "*D.m*". We also use the provided functions from class to obtain analytical solutions for the residual securities such as *B.m* for a Coupon Bond, *G.m* for a Forward on Discount Bonds and *H.m* for Futures on Discount Bonds (as the mentioned functions were already given, codes are not depicted).

We implemented all required binomial pricing procedures in the function "*Binomial* _ *P rice.m*" (see Binomial_Price.m). To access the individual approach we type in one of our defined types, e.g. "*′ DiscountBond ′*" for the approximation procedure of a Discount Bond, and the function accesses the respective calculations. In general, for the bi- nomial approximation, we first predefine the size of the binomial matrix and the terminal values for each state of the respective security in dependence on param- eter * n* (see * Binomial* _ *P rice.m*, Lines 11,12 as an example for a Discount Bond). Thereupon the backward induction process follows as described above in chapter 2. The resulting matrix or matrices are the output variables (*′ Bin* 1 *′*, *′ Bin* 2 *′*) of our Matlab-function.

Moreover, in the case of a Coupon Bond we additionally need to specify the coupon payment dates in dependence of the number of chosen subperiods. Therefore we check in "*Binomial* _ *P rice.m*" for every row * j* if the payment date is due with a combined if-condition (see Line 64). We use for this purpose the implemented Matlab-function "*mod* (*•*)". For every coupon-payment date-row * j* the mod-function returns the value 1 (for instance if * n* = 120 and * T* = 12 we get for the first coupon- payment date * mod* (11 *,* (120 */* 12)) = 1) and we add the cash-flow amount of the considered coupon to the Coupon Bond value in the respective nodes (see Line 65). Otherwise, the mod-function returns a value greater or smaller one. In order to prevent that we add a coupon if * n* = 1 (*mod* (1 *,* (120 */* 12)) = 1), and thus in * t* 0, we additionally review if the row-number of * j* is greater than 1 (see for whole loop- structure * Binomial* _ *P rice.m*, Lines 61-70). We want to stress that this approach returns appropriate approximation values only for * n ≥* 120 and simultaneously * n* - values which are multiples of 12, such as * n* = [120 *,* 360 *,* 2400 *,* 3600].

Furthermore, we need to define for the Futures Contract and the considered Options the exact row-line *j*, in which the respective security terminates for *TSecurity < TUnderlying* or *T < TU*.

Hence, we calculate

*cc* =

*T − t* 0

*TU − t* 0

*· n * (13)

which gives us the exact row-line in which the security terminates during the time to maturity of the underlying in dependence of *n*. For the case of *T* = 2 *.* 5 and *TU* = 10 the number of subperiods must be a multiple of 4 to obtain an integer for *cc*, which is essential for Matlab and for not biased results. If elsewise *TU* = 12 is present, *n* needs to be a multiple of (5 */* 24).

Abbildung in dieser Leseprobe nicht enthalten

*Figure 4: Binomial Approximation for increasing n.*

Figure (4) illustrates our approximation results for a Discount Bond (4(a)) and both a Futures and Forward Contract on a Discount Bond (4(b)). The analytical solution for the Discount Bond with *T* = 10 and a face value *F* = 1000 is ” *D* _ *Exact*” = 750 *.* 3073. We obtain for the Futures Contract ” *H* _ *Exact*” = 803 *.* 4832 and for the Forward ” *G* _ *Exact*” = 804 *.* 0997. Both contracts are written on the considered Discount Bond and have a time to maturity of *T* = 2 *.* 5 years.

We observe that the approximation of all three securities approaches from below to the analytical price and distinctly deviates from it for * n <* 1000. However, for * n ≥* 1000 all considered approximations in Figure (4) clearly converge to the closed-form solution. For instance, the absolute deviation of our Discount Bond price estimation (” *D* _ *Approx*” = 750 *.* 2993") to the exact value is 0.008 with * n* = 3020. The respective differences to the closed-form solution of our Futures Contract (” *H* _ *Approx*” = 803 *.* 4755) is 0.0077 and of the Forward (” *G* _ *Approx*” = 804 *.* 0909) 0.0088.

The fair value of a Coupon Bond with * T* = 12, face value * F* = 60000, a coupon rate of * c* = 3 *.* 0% and a constant interest rate * r* = * r* 0 = 0 *.* 025 is * B* = 62304 *.* 0633. The Bond’s price is above par because its fixed coupon rate exceeds the prevailing market rate (*r* 0).

**[...]**

^{1} see Ritchken (1996), p. 543.

## Details

- Pages
- 32
- Year
- 2017
- ISBN (eBook)
- 9783668726376
- ISBN (Book)
- 9783668726383
- File size
- 998 KB
- Language
- English
- Catalog Number
- v429036
- Institution / College
- University of Tubingen
- Grade
- 1,00
- Tags
- Pricing Interest Rate Derivatives Matlab in Finance Finance BWL Derivate Binomial Approximation Term Structure