Hedging MBS in HJM Framework

This section gives a detailed implementation of our hedging algorithm. Security to be hedged: MBS

Hedging Instruments: Portfolio of {MBS, Treasury bonds with different maturities} Hedging Method: Dynamic hedging using PCA duration. vs. Conventional duration and convexity hedging

Hedging Parameters: PCA duration

Hedging Error: The net present value of the portfolio, which has initial value of zero Hedging Efficiency: Reduce hedging Error

Hedging Strategy: Construct a portfolio, consisting of MBS and various T-notes, bonds, with 0 face value. Duration matched to 0. Rebalance at each time period to match the hedging parameters; compare the results with duration and convexity hedging. There are two issues we need to pay special attention to, in order to effectively execute the hedging strategy.

Issue 1: With the coupon payment and prepayment of MBS, what needs to be done with this extra cash flow?

Answer: Use this cash flow to rebalance the portfolio, basically to change the weights of Treasury bonds holdings. If the position is short in MBS, and long in Treasury bonds, we need to sell the Treasury bonds to honor the MBS payment.

Issue 2: Some Treasury bonds used to hedging the MBS will expire before the MBS maturity date. This will hurt the capacity of available hedging instruments.

Answer: We only hedge the MBS for a short period of time, e.g. 3 years, and then we can use Treasury bonds with greater or equal to 3 years maturities. Another solution is to introduce on extra hedging instrument when there is one expiring at that period. Hedging Framework

  1. At time 0, get the MBS price, gradients (PCA duration) by simulation (360x300 simulation needed). Zero coupon Treasury bonds price and gradients should be directly available from the yield curve, and the PCA factors;
  2. Construct the portfolio, by shorting MBS to finance Treasury bonds; match the duration, and get the corresponding weights;
  3. At time 1, use HJM model to update the yield curve, then get the new price and gradients of MBS as well as those of Treasury bonds;
  4. Use MBS payment to rebalance portfolio (MBS payment is deterministic upon the last period yield curve);
  5. Repeat 3, 4 for next month, till the end of hedging period;
  6. Check the effectiveness of hedging strategy. Implementation of Hedging MBS with Treasury Bonds


Get mortgage information;


Get historical yield curve data;


Get Principal Components Factors;


Start clock for hedging period: m=0


Calculate MBS_Price(m), MBS_Duration(m)4xi, Payment(m),


  1. Choose hedging instrument: Treas_Portfolio=[12 36 60 84 120], each element represent months to maturity;
  2. Calculate Treasury bond price Treas_Price(m)5x1, 5 hedging components are needed because of 5 factors to hedge: Price, and Duration4x1. Treas_Duration(m)4x5.
  3. Solving for hedging ratio W(m):

Treas _ price(m)' W(m -1) - MBS _ payment(m -1) MBS _ Duration(m)

9. Calculate hedging error:

error (m) = MBS _ price(m) - Treas _ price(m)' W(m -1) + MBS _ payment(m -1)

  1. Update loan.UPB=loan.UPB-PrincipalPayment(m);
  2. Update loan.WAM=loan.WAM-1/12;
  3. Update Treas_Portfolio=Treas_Portfolio-1;
  4. m=m+1, go back to 5 until hedging period ends.

Was this article helpful?

+1 0
Credit Reports Inside Out

Credit Reports Inside Out

Powerful Tips For Legally Improving Your Credit Score

Get My Free Ebook


  • wilcome
    How to hedge an MBS portoflio?
    9 years ago
  • holfast took-took
    What is zero duration hedging strategies?
    9 years ago

Post a comment