Financial Toolbox | ![]() ![]() |
Constructing a Bond Portfolio to Hedge Against Duration and Convexity
This example constructs a bond portfolio to hedge the portfolio of Sensitivity of Bond Prices to Changes in 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.
ftspex2.m
.
Step 1.
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 (semi-annual), end-of-month payment rule (rule in effect), and day-count basis (actual/actual). Also, synchronize the coupon payment structure to the maturity date (i.e., 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 as well as 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];
Step 2. 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;
Step 3.
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 the sum of the weights is unity.
A = [Durations' Convexities' 1 1 1]; b = [ 10.3181 157.6346 1]; Weights = A\b;
Step 4. Compute the duration and convexity of the hedge portfolio, which should now match the original portfolio.
PortfolioDuration = Weights' * Durations; PortfolioConvexity = Weights' * Convexities;
Step 5. 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;
Step 6.
Compare the results. (Verify the analysis results by running the example M-file ftspex2.m
.)
10.3181
and 157.6346
, respectively.
-57.37
, 71.70
, and 216.27
, respectively.
![]() | Common Problems in Finance | Sensitivity of Bond Prices to Parallel Shifts in the Yield Curve | ![]() |