Friday, May 30, 2014

Pricing Credit Default Swaps

In this lesson, we continued the last lesson of pricing credit default swaps.

The value of the CDS to a buyer is going to be the risk-neutral value of the protection they receive when the bond defaults - the risk-neutral values of the premiums they pay.  We are going to assume that the default event is evenly distributed on the premium interval delta.

Now we will break apart these two factors that make up the value of the CDS.


The risk-neutral value of a single premium payment is: 
Remember that I(t(k)) shows that there is no default and B(t(k)) is the discounting factor (or the cash account or the value of a zcb).  Once again, as in the last lesson, we can break this down into simpler terms.

The risk-neutral value of of all the premium payments is just the sum of the above statement:

The risk-neutral value of the accrued interest if there is a default event between tau = (t(k-1), t(k)] is:
Since the default event is uniformly distributed on delta, the expected value of the uniform distribution of delta is simply (delta/2) which is how we get the above statement.


Therefore combining these values, the risk-neutral value of the premium and the accrued interest is:
We next moved on to the value of the protection.
The risk-neutral value of the protection is:
In this pricing, we assume that R is known, but in reality R is known only on default.  So we are assuming that these CDSs have been around for a while so we know what R will be.

The par spread, or S(par), is that makes the value of the spread that makes the contract equal to zero. S(par) is:
This is simply found by taking the value of the protection minus the value of the premium and accrued interest, setting this equal to zero, and solving for S. 

We then suppose that q(t(k)) = (1-h)*q(t(k) - 1).  We can then approximate the par spread to be:






























Thursday, May 29, 2014

Credit Default Swaps

In this lesson, we we introduced to credit default swaps.  We were introduced to how credit default swaps give us information about default probability and how these quantities can be used for hedging, investment, and speculation.

The seller of a credit default swap agrees to compensate the buyer in the event of a loan default or some other credit event on a reference entity in return for periodic premium payments.
The buyer pays period payments of d*S*N where:

  • N is the notional principle amount of credit protection
  • S is the coupon or the spread and
  • d is a fraction of a year (d*S is the total coupon that has accumulated over the years)
this keeps on going until some credit event happens (usually a default).  At the next coupon date after this happens, the buyer has to pay the accrued interest d*S.  Also, the seller has to pay (1-R)*N where R is the recovery rate.  


Example:
Consider a 2-year CDS on a notional amount of $1 million with a spread S of 160 basis points (1.6%) and quarterly premium payments. 
Suppose a default occurs in month 16 of the 24 month protection plan and the recovery rate, R, is 45%.

The buyer:
The buyer pays fixed premiums in months 3,6,9,12,15 = (S*N)/4 = $4000
The accrued interest in month 18 (the next coupon date) is (S*N)/12 = $1333.33

The seller:
The default contingent protection payment in month 18 = (1-R)*N = $550,000

The basic model for CDS cash flows is as follows:
Let {t(k) = delta*k = 1,...,t(n)} denote the time of the coupon payments.  For quarterly payments delta = 1/4
If the reference entity is not in default at time t(k), the buyer pays the premium delta*S*N
If the reference entity defaults at time tau contained in (t(k-1), t(k)], then the contract terminates at time t(k).  The buyer pays the accrued interest (t(k) - tau)*S*N and the buyer receives (1-R)*N.  In the last example, the contract terminated at month 18 since default occurred at time tau=16 months between month 15 and month 18.

We then learned about CDS contract details.  CDS contract details were standardized by the International Swaps and Derivatives Association in 1999.  Changes were made in 2003, and 2009, and may happen again if CDS derivates lead to a financial global recession again.  There are so many different details in a contract because there are many difficult issues: how to determine if a credit event occurred, the recovery rate, the spread set for different bonds, when the coupon is paid (advance vs. arrears), and how the spread is quoted.  

The CDS spread S is approximates (1-R)*h where h is the hazard rate, or the conditional probability of default.  For fixed R, CDS spreads are directly proportional to the hazard rate h.  Thus CDS spreads, along with the recovery rate can help determine what the probability of default is for a given defaultable bond.

We then learned about the development and application history of CDS as well as their impact on the financial crisis and the sovereign debt crisis.  I have omitted this portion from this post. 


























Pricing Defaultable Bonds

In this lesson, we extended the last lesson on pricing defaultable bonds to pricing coupon-bearing defaultable bonds as well as calibrating them.

We are assuming that the hazard rates, h(i,j) are state independent. This ensures that the default event is independent of the interest rate dynamics. We also let q(t) be the risk-neutral probability that the bond will survive until date t.  We then combine q(t) and h(i,j) into;



so as we can define the probability for survival in the next period based on survival up to that period.

Let I(t) denote the indicator variable that the bond survives up to time t;




The indicator variable that the default will occur at time t is I(t-1) - I(t).  It therefore follows that;
E[I(t)] = q(t).

Again, we assume that the random recovery rate, R, is independent of the interest rate dynamics as we did previously.  R denotes the fraction of the face value, F, paid on default.

We are going to assume the following information for the pricing process;

  1. The current date is 0: t=0.
  2. {t(1)...t(n)} are the futures dates at which the coupons are paid out
  3. The coupon is paid on date t(k) only if I(t(k)) = 1.  Therefore the random cash flows associated with the coupon payment on dates t(k) is c*I(t(k))
  4. The face value F is paid on date t(n) only if I(t(n)) = 1. Therefore the random cash flow associated with the face value payment on date t(n) is F*I(t(n)). 
  5. The recovery R(t(k))*F is paid on date t(k) if the bond defaults on date t(k).  Therefore the random cash flow associated with the recovery on date t(k) is R(t(k))*F*[I(t(k-1)) - I(t(k))], where R is the recovery fraction, F is the face value, and the quantity [I(t(k-1)) - I(t(k))] denotes that the bond has defaulted.
Now that we have all these cash flows, we can price the bond by simply discounting all of the cash flows with respect to the correct risk-neutral probabilities. 

The price of the defaultable fixed coupon bond at time t=0 is given by:





The first term in the expectation, 




denotes the cash flow paid at time t(k) so they must be discounted at time t(k), which is what the B(t(k)) in the denominator represents (remember that B(t) is simply the value of the cash account at time t.

The second term in the expectation,




denotes the cash flow from the face value payment of the bond at time t(n), which is the B(t(n)) in the denominator.  B(t) is simply 1 since at time t=0, the value of the cash account is 1.

The third term in the expectation, 




is the random cash flow associated with the recovery if the bond defaults, discounted at time B(t(k)).  This quantity will equal 0 unless the bond defaults at time t(k).  

Since we assumed that the default is independent of interest rate dynamics, we can split the expectation up according to whether it is the expectation of default or the expectation of the interest rate dynamic.  In the following equation, each term in the equation above has been split into two expectations multiplied by each other.  The first expectation is the expectation of default and the second is the expectation of interest rate dynamics;







We can then substitute q for the expectation of default and we can substitute Z(0,t(k)) (zcb price) for the expectation of the short rate:





We can further simplify this equation by simply substituting out the zcb prices (Z(0,t(k)) for the discount rate up to time t(k):







Next we are going to calibrate the hazard rates.  First, we assume that the interest rate is deterministic and known (and even if it was not, we are able to calibrate it, as we did in previous lessons).  
We then denote the model price of the defaultable bonds as P(h) as a function of h = {h(0)...h(n-1)}.
We then denote the market price for the defaultable bonds as P(market).

For model calibration, take the model prices and the market prices, get the pricing error between them:





and minimize it:




We then did this numerically in an excel spreadsheet.  



































Wednesday, May 28, 2014

Modeling Defaultable Bonds

In this lesson, we looked at defaultable bonds and how to model them.  In a later lesson, we will look at pricing them.

A defaultable bond is characterized by a coupon rate, c, a face value, F, and a recovery value, R, which is a random fraction of the value value recovered when the bond defaults.  We will model the term-structure of default using a 1-step default probability:



and we will calibrate h(t) to market prices. h(t) is the conditional probability that the bond will default over the period t to t+1, given the information available at time t: (F(t)).


When we previously modeled the binomial lattice, we had two parameters for each node: i and j.  The i parameter indicated the date: i=0...n and the j parameter indicated the state j=0...i for each time parameter.  For defaultable bonds we will "split" each node (i,j) by introducing a variable that encodes whether or not default has occurred before time i.  For example:

  • (i,j,0) <- state j at time i with default time tau > i
  • (i,j,1) <- state j at time i with default time tau ≤ i


Now we need to define the new risk-neutral transition probabilities for the binomial lattice.  
Here is one example of the possible transitions for one lattice:















and here are the transitions from no-default state (i,j,0):









and here are the transitions from default state (i,j,1):







Notice that there are much fewer transitions because a bond that has already defaulted cannot be un-defaulted.


We started modeling these bonds with the most simple example:
a default-free zero-coupon bond with expiration date T.  This bond pays $1 in every state at the expiration date T, and no default is possible.
The price of such a bond is Z(i,j,eta,T) where i is the date, j is the state, eta is the default state, and T is the expiration date.  Since default events do not effect default-free bonds: Z(i,j,1,T) = Z(i,j,0,T) = Z(i,j,T) with no default state.
By risk-neutral pricing:





which is exactly what we had previously.

We can calibrate the short-rate lattice using the market prices of default-free zcbs and other default-free instruments.


We then moved on to zero coupon bonds that are defaultable, but have no recovery.  These bonds pay $1 in every state at expiration T, provided that default has not occurred at any date t ≤T.  If default occurs at t≤T, then the bond pays $0.
By risk-neutral pricing:









which means that:





and approximately:



In this case E[i,Qbar] is the expectation of risk-neutral default-free probability.
The price of a zcb is set by discounting the expected value by (r(i,j) + h(i,j)), where h(i,j) is the 1-period credit spread.  The conditional probability of default h(i,j) is also called the hazard rate.  This is the probability of default given that no default has occurred up to time i.


We then moved on to zero coupon bonds that are defaultable and have recovery.  We assumed that the recovery R is random and independent of the default and the interest dynamics.
By risk-neutral pricing:








This makes sense, because here we will recover R instead of zero (like we did one example above).

In the next lesson we will talk about general bonds and how to use these general bonds to estimate the hazard rate.























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.