Q:

Hedging Ratios for Fixed Income Instruments

If you buy a corporate bond and you want to hedge the interest rate risk, how would you know how many interest rate futures/swaps to hedge the bond with?
The same with an MBS security, if you want to isolate the prepayment risk how do you work on the hedge ratios for the interest rate risk, any (small) credit risk, fx risk?

A:

Hedging with futures 

Calculate DV01 of your corporate bond
Calculate DV01 of the cheapest to deliver of the future contact that is closest to the maturity of your bond
Ratio between DV01 of Cheapest to Deliver and DV01 of your corporate will give you a number of future contract that you will have to sell in order to be hedged.
I.e. if you are long 5 Million corporates with dv01 of 500 per million whereas dv01 of CTD is 400, you will need to sell 62.5 contacts of 5 YEAR future contract :  5*500/400*10 = 62.5; You need to multiply by 10 because futures trade in 100k lots.
Because futures expire every 3 months, you will need to repeat this process every time futures expire.
You may calculate DV01s on the following website: https://www.opencminc.com 
Switch to Bond section in the calculator window panel
Setup term structure of your bond, DV01 will be automatically calculated in the result section.  
Pick cheapest to deliver in the Quick Fixed Rate Bond Section, in-order to calculate its DV01.

Hedging with interest rate swap
Hedging with interest rate swaps is more expensive because you can’t just buy or sell them in-order to delta hedge.  Each trade is a bilateral contact that can be difficult to amend.  You can think of them as insurance policies against the changes in interest rates rather than as securities.   But if you choose to hedge with IRS then you are better of entering the contact against the entire notional of you position.  i.e. if you long 1 million 5 Year note, you want to enter a 5 year interest rate swap contact as a payer of fix rate and a receiver of float with 1 million dollar notional.

Switch to interest rate swap section of the website above
Select 5Y in the Quick Vanilla Swap Calculator section, hit setup
Shift Spread(bps) up and down to see how changes in swap rates with effect NPV of your swap trade, hence offset you P&L in bonds

