Wednesday, May 28, 2014

Fixed Income Derivatives Pricing In Practice

In this lesson, we wrapped up our discussion of model calibration.

The pricing philosophy is the same for all types of models:

  1. Specify a model under the Q(theta) dynamics where theta is a vector of parameters, such as a(i) and b(i).
  2. Price all securities using the formula:
      3. Choose theta parameters such that the market prices of the liquid securities agree with the model             prices.

These three steps are formally known as the calibration procedure.


The calibration problem usually requires minimizing a sum of squares equation:




where:
P(i)(model) is the model price of the i-th calibration security
P(i)(market) is the model price of the i-th calibration security
w(i) is a positive weight reflecting the importance of the i-th security or the confidence we have in its market price
theta(prev) = previously calibrated model parameters
and lambda is a parameter reflecting relative importance of remaining close to the previous calibration.

Once we have minimized this equation we can use the model to hedge or price more illiquid securities.
One problem, however, is that this equation is very difficult to solve.  It is a non-convex optimization problem with many local minima and therefore many solutions.  As market conditions change from minute-to-minute and hour-to-hour, we may need to recalibrate the model frequently.  If the model was in fact, "right," then we would only need to calibrate once.  So in practice our model is not right, and markets are too complex for there to be a "right model." However, through risk-neutral pricing at the model level, we can extrapolate/interpolate in an arbitrage free manner.  

Tuesday, May 27, 2014

Pricing A Payer Swaption in a BDT Model

In this lesson, we used the BDT model to price a payer swaption.

We are pricing a 2-8 payer swaption.  The 2 and 8 mean that the option is an option to enter an 8 year swap in 2 years time, and since swaps have payments made in arrears, the payments would be made in years 3-10.  The "payer" part of the swaption simply means that if the option is exercised, the exerciser pays the fixed rate and receives the floating rate.  This option would have been extremely profitable if bought at the bottom of the recession, when interest rates were near 0%.   This means we will be using a 10-period lattice.

We will also assume that b(i) = b = 0.005 for all i.  Remember that b(i) is the volatility of the short-rate.  By assuming b=0.005 for all i, we are assuming a constant volatility.  We will change this assumption later.

We are going to assume a notional principal of $1 million.  Let S(2) denote the value of the swap at time t=2.  We can compute this price by starting at the value of the swap at time t=10 and discounting backward from t=10 to t=2.  Once we have the values at time t=2, we determine whether the option will be exercised at t=2 by the value of the swaption: max(0,S(2)).  We then discount these values back to find the swaption price at t=0.

Assuming that we have calibrated the zcb according to the steps above with a b =0.005, we find that the swaption price is $13,339.  If we then doubled b to b=0.010, we find a swaption price of $19,497.  This is about 50% higher than our original price.  This is a very significant difference in the swaption prices.  Swaption prices clearly depend on the volatility of the market.  This is apparent because increasing volatility means that there is increasing upside that the short rate will be higher, and therefore the swaption will be worth more.  However, with increasing volatility there is not increasing downside since the swaption is worth the max(0,S(2)) so if the short-rate is negative then the swaption will simply not be exercised.

Here we can see how important it is to calibrate the BDT model according to different observations of volatility.  We want the calibration to be "close" to the securities we want to price with the calibrated model.  For example a zcb does not depend much on volatility, while caplets and floorlets are much more dependent on the volatility in the model.  More of this will be discussed in later lessons.

Model Calibration

In this lesson, we are taking the previously developed binomial lattice model and calibrating it so that the prices in the model agree with the corresponding market prices.  There are too many free parameters in the model, so we fix some parameters: q = 1-q = 0.50. and some some parametric form for for r(i,j) short-terms.  We will focus on the Black-Derman-Toy (BDT) Model.

The BDT model assumes that the interest rate at node N(i,j) is given by r(i,j) = a(i)*e^(b(i)*j) or in log terms: log(r(i,j)) = log(a(i)) + b(i)*j where log(ai) is a drift parameter for log(r) and b(i) is a volatility parameter for log(r).  Now we need to calibrate the model to the observed term-structure in the market.  This is done by choosing different a(i)'s and b(i)'s to match market models.  We can do this by using the Solver add-in in MS Excel, but we can also do this in Matlab or R.

To start an example, let us assume that we have an n-period binomial lattice, as usual.  We will let s(1)...s(n) be the term-structure of interest rates observed in the market.  We will also assume (for now) that b(i) = b for all i.  This is a very strong assumption and we will change it in the future.

We know that:





since this is just the definition of elementary prices of a zcb.
We can replace the right hand side of this equation with the forward equations from the last lesson:










where the first term is equal to P(i,0,e), the second term is equal to P(i,j,e) when j is between 1 and (i-1) and the third term is equal to P(i,i,e).  We can then begin solving for all the a(i)'s.  We could simply plug in i=1 then i=2 all the way up to i=n.  After simplifying and solving, we would have the formula for a(i) and we would be able to get the spot rate from the formula above: log(r(i,j)) = log(a(i)) + b(i)*j.  We can also use MS Excel Solver add-in to do this for us.  We then did exactly that in this module but I have omitted it from this blog post as an exercise for the reader.

























Monday, May 26, 2014

The Forward Equations

In this lesson, we learned about forward equations.  Forward equations allow us to price elementary securities.  Elementary securities are securities that pay $1 at a specific time i and a specific state j, and pay $0 at every other time and state combination.  By using forward equations, we will be able to price elementary securities very easily.

We will let P(i,j,e) stand for the state price of an elementary security (i is the time, j is the state, and e denotes that it is an elementary security).  We note that P(0,0,e) = 1 since the "price," or value of $1 today is $1.  Using this fact, we can work forward to compute the P(i,j) values at every node.   The following are the equations we would use to move forward in the binomial lattice model:







The equation above would represent moving to the right once in our lattice.







The equation above would represent moving to the right and up diagonally once in our lattice.







The equation above would represent moving to the right once and up an integer between 0 and k+1 times in our lattice.


We then computed the forward prices for our short-rate lattice by using the forward equations and starting with the fact that P(0,0,e) = 1.

Our short-rate lattice:














and our elementary prices lattice corresponding to that:























Using these values, it becomes very easy to calculate derivative prices.
For example: say we want to calculate the price of a zcb at time 0 with maturity 4 and face value of 100.  We simply add the elementary prices for time t=4 and multiply them by 100:
100 * (0.449 + .1868 + .2901 + .1992 + .0511) = 77.22 which is what we calculated before.


Another example:
A forward-start swap that begins at time t=1 and ends at time t=3.  The notional principal is $1 million, the fixed swap rate is 7%, and the payments at time t=2 and t=3 are based on the fixed rate minus the floating rate that prevailed at times t=1 and t=2, respectively.  (this swap is considered "forward-start" because it starts at time t=1 instead of t=0).  The question:  What is the value of the swap today, at time t=0?


To find the value, we do the following calculation:






Although this looks complicated, it is actually quite simple.


  • The values (0.07 - xxx) are the payments received from this swap.  The payments are the fixed rate minus the floating rate at times t=1 and t=2.
  • The divisor underneath (0.07 - xxx) are the discounting factors.  Remember than swap payments are made in arrears so although they payments are made for floating rates at time t=1 and t=2, the payments are made in time periods t=2 and t=3, so they must be discounted accordingly.  
  • The weights given to these cash flows are the corresponding elementary values on the elementary prices lattice. 
The value of the forward-start swap at time t=0 ends up being $5800.  




















Fixed Income Derivatives: Swaps and Swaptions

In this lesson, we learned about pricing swaps and swaptions.  We learned about swaps a few weeks ago.  A swaption is simply an option on a swap contract.

We want to price a swap based on our short-rate, r, lattice.  Once again, here is our lattice:














We want to price an interest rate swap with a fixed strike rate of 5% that expires at time t=6.  The first payment will be made at time t=1 and the final payment will be made at time t=6.  The payment will be (r(i,j) - K) if you are long, and will be -(r(i,j) - K) if you are short.  It will be made in arrears, so this payment will be made at time t=i+1.



To price the swap, we will want to, once again, start from the ending (time t=6), then work backwards.  However, since the payment at time t=6 is based on the short-rate at time t=5, we will simply start at the values for t=5 (discount by 1 period) and work backwards.  The formula for pricing the swap prices at times t=5 is as follows:

(r(5,j) - K) at time t=6 is worth (r(5,j)-K)/(1+r(5,j)) at time t=5 where 1/(1+r(5,j)) is the discounting factor for the difference between periods 5 and 6.

The next step in pricing the swap will be working backwards in the lattice.  In this regard it will differ from what we have done previously since a swap will contain intermediate coupon payments.  So we must use the formula we previously had for risk-neutral pricing with intermediate coupon payments.  This formula is:
S(t) = E[(S(t+1) + C(t+1))/(1+r(t))]
where C(t+1) is simply (r(t,j) - K) at the node in which it is being calculated. An example is provided below the lattice:













And here is the example for node N(2,2):







We then moved on to pricing swaptions.  A swaption is simply an option on a swap.  We priced a swaption on the swap we just developed.  We are going to assume that the option strike is 0% (this is not to be confused with the strike of 5%, or fixed rate, on the underlying swap) and the swaption expiration is at t=3.
Therefore at time t=3, the owner of the swaption has the right to exercise and have ownership of the underlying swap for a strike value of 0.  So the payoff of the swaption is: max(0,S(3)) where S(3) is the underlying swap price.

In order to price this swaption, we will take max(0,S(3)) for time t=3 of the underlying swap, then simply work backwards in our lattice using risk-neutral pricing.  However, we will not be factoring in the intermediate cash flows for this lattice since the holder of the swaption will not get the cash flows until the exercise at time t=3.  Below is the swaption lattice with the values of the swaption replacing the values of the swap in blue:






































Friday, May 23, 2014

Fixed Income Derivatives: Caplets and Floorlets

In this lesson, we learned about caplets and floorlets.  A caplet is similar to a European call option on the short rate interest rate, r(t).  It is usually settled after maturity but can also be settled in advance.  The maturity it thought of in time (tau).  The strike price is c.    The payoff of a caplet with maturity tau and with strike c and settled at time tau is:






The caplet can be thought of as a call option on the short rate prevailing at time (tau) -1, but is settled at time tau.

A floorlet is the caplet except the payoff is:






A cap consists of a sequence of caplets with the same strike.
A floor consists of a sequence of floorlets with the same strike.


Following is the short-rate lattice we have been using for the past few lessons:














u = 1.25 and d = 0.90.  We will now price a caplet using this model.

We assume an expiration of t=6 and a strike of 2%.
Remember that the payment is actually made in time tau = 6, but the payment is made on the rate of (tau) - 1 = 5.  Therefore we will build our lattice based on t=5 instead of t=6.  Also, since we are building our lattice for t=5 instead of t=6, we must discount the payments accordingly.




For example:
On the node N(5,0), the rate is 3.54%.  The caplet is worth: (r(5) - c)/(1+r(5)) = (0.0354-0.02)/(1+0.0354) = 0.15.  Below is the full lattice:















We can then move backwards in the lattice as we usually do using risk-neutral probabilities equation:
S(t) = 1/(1+r(t)) * E[S(t+1)].

The value of the caplet at time t=0 is 0.042.  This is the value of the security that pays off max[0,r(5) - 2%] at time t=6.  This is in the notional value of $1, whereas in practice you would actually buy or sell many thousand of these securities.
























Fixed Income Derivatives: Bond Futures

In this lesson, we learned how to price futures contracts on bond futures.
This is very similar to pricing bond forwards.

Since the forward price must equal the spot price at the expiration time t=n, we can set up the same equality as for bond futures;

S(n-1)/ B(n-1) = E[S(n)/B(n)] where B(n) is the value of the cash account

With forward contracts as with futures contracts, the "price" paid at time t=0 is equal to 0 and we know what S(n) is, we can change this equation to:







Since both B(n) and F(n-1) are known at t=n-1, we can simplify this to:




And by the law of iterated expectations:




And since F(n) = S(n):





This is different from the forward price G(0):





as it does not depend on the cash account, or short-term interest rate.


We then priced the same bond from the previous lesson, but this time pricing a futures contract instead of a forwards contract:














The reason that the price here is different from the forwards contract is because the futures contract is not discounted by the short-term interest rate, since it does not depend on the interest rate.

The futures contract is worth $103.22 and the forwards contract was worth $103.38.  In this case they are not equal but they can be equal in certain circumstances.