This example constructs a bond portfolio to hedge the portfolio of Sensitivity of Bond Prices to Interest Rates. It assumes a long position in (holding) the portfolio, and that three other bonds are available for hedging. It chooses weights for these three other bonds in a new portfolio so that the duration and convexity of the new portfolio match those of the original portfolio. Taking a short position in the new portfolio, in an amount equal to the value of the first portfolio, partially hedges against parallel shifts in the yield curve.
Recall that portfolio duration or convexity is a weighted average of the durations or convexities of the individual bonds in a portfolio. As in the previous example, this example uses modified duration in years and convexity in years. The hedging problem therefore becomes one of solving a system of linear equations, which is an easy thing to do in MATLAB® software.
Define three bonds available for hedging the original portfolio.
Specify values for the settlement date, maturity date, face value,
and coupon rate. For simplicity, accept default values for the coupon
payment periodicity (semiannual), end-of-month payment rule (rule
in effect), and day-count basis (actual/actual). Also, synchronize
the coupon payment structure to the maturity date (that is, no odd
first or last coupon dates). Set any inputs for which defaults are
accepted to empty matrices ([]
) as placeholders
where appropriate. The intent is to hedge against duration and convexity
and constrain total portfolio price.
Settle = '19-Aug-1999'; Maturity = ['15-Jun-2005'; '02-Oct-2010'; '01-Mar-2025']; Face = [500; 1000; 250]; CouponRate = [0.07; 0.066; 0.08];
Also, specify the yield curve for each bond.
Yields = [0.06; 0.07; 0.075];
Use Financial Toolbox™ functions to calculate the price, modified duration in years, and convexity in years of each bond.
The true price is quoted (clean price plus accrued interest).
[CleanPrice, AccruedInterest] = bndprice(Yields,CouponRate,... Settle, Maturity, 2, 0, [], [], [], [], [], Face); Durations = bnddury(Yields, CouponRate, Settle, Maturity,... 2, 0, [], [], [], [], [], Face); Convexities = bndconvy(Yields, CouponRate, Settle,... Maturity, 2, 0, [], [], [], [], [], Face); Prices = CleanPrice + AccruedInterest;
Set up and solve the system of linear equations whose solution is the weights of the
new bonds in a new portfolio with the same duration and convexity
as the original portfolio. In addition, scale the weights to sum to 1
;
that is, force them to be portfolio weights. You can then scale this
unit portfolio to have the same price as the original portfolio. Recall
that the original portfolio duration and convexity are 10.3181
and 157.6346
,
respectively. Also, note that the last row of the linear system ensures
that the sum of the weights is unity.
A = [Durations' Convexities' 1 1 1]; b = [ 10.3181 157.6346 1]; Weights = A\b;
Compute the duration and convexity of the hedge portfolio, which should now match the original portfolio.
PortfolioDuration = Weights' * Durations; PortfolioConvexity = Weights' * Convexities;
Finally, scale the unit portfolio to match the value of the original portfolio and find the number of bonds required to insulate against small parallel shifts in the yield curve.
PortfolioValue = 100000; HedgeAmounts = Weights ./ Prices * PortfolioValue;
Compare the results.
As required, the duration and convexity of the new
portfolio are 10.3181
and 157.6346
,
respectively.
The hedge amounts for bonds 1, 2, and 3 are -57.37
, 71.70
,
and 216.27
, respectively.
Notice that the hedge matches the duration, convexity, and value ($100,000) of the original portfolio. If you are holding that first portfolio, you can hedge by taking a short position in the new portfolio.
Just as the approximations of the first example are appropriate only for small parallel shifts in the yield curve, the hedge portfolio is appropriate only for reducing the impact of small level changes in the term structure.
blsdelta
| blsgamma
| blsprice
| blsvega
| bndconvy
| bnddury
| bndkrdur
| bndprice
| zbtprice
| zero2disc
| zero2fwd