Main Content

Computing Instrument Sensitivities

Sensitivities can be reported either as dollar price changes or percentage price changes. The delta, gamma, and vega sensitivities that the toolbox computes are dollar sensitivities.

The functions hjmsens and bdtsens compute the delta, gamma, and vega sensitivities of instruments using an interest-rate tree. They also optionally return the calculated price for each instrument. The sensitivity functions require the same two input arguments used by the pricing functions (HJMTree and HJMInstSet for HJM; BDTTree and BDTInstSet for BDT).

Sensitivity functions calculate the dollar value of delta and gamma by shifting the observed forward yield curve by 100 basis points in each direction, and the dollar value of vega by shifting the volatility process by 1%. To obtain the per-dollar value of the sensitivities, divide the dollar sensitivity by the price of the corresponding instrument.

HJM Sensitivities

This example shows how to compute price and sensitivity values for Cap and Floor instruments using hjmsens.

Load the data.

load deriv.mat
HJMSubSet = instselect(HJMInstSet,'Type', {'Floor','Cap'});

% Display instrument set
instdisp(HJMSubSet)
Index Type Strike Settle         Maturity       CapReset Basis Principal Name   Quantity
1     Cap  0.03   01-Jan-2000    01-Jan-2004    1        NaN   NaN       3% Cap 30      
 
Index Type  Strike Settle         Maturity       FloorReset Basis Principal Name     Quantity
2     Floor 0.03   01-Jan-2000    01-Jan-2004    1          NaN   NaN       3% Floor 40      
 

Compute price and sensitivity values for the cap and floor instruments using hjmsens.

[Delta, Gamma, Vega, Price] = hjmsens(HJMTree, HJMSubSet)
Delta = 2×1

  294.9700
  -47.1629

Gamma = 2×1
103 ×

    6.8526
    8.4600

Vega = 2×1

   93.6946
   93.6946

Price = 2×1

    6.2831
    0.0486

BDT Sensitivities

This example shows how to compute price and sensitivity values for Cap and Floor instruments using bdtsens.

Load the data.

load deriv.mat
BDTSubSet = instselect(BDTInstSet,'Type', {'Floor','Cap'});

% Display instrument set
instdisp(BDTSubSet)
Index Type Strike Settle         Maturity       CapReset Basis Principal Name    Quantity
1     Cap  0.15   01-Jan-2000    01-Jan-2004    1        NaN   NaN       15% Cap 30      
 
Index Type  Strike Settle         Maturity       FloorReset Basis Principal Name     Quantity
2     Floor 0.09   01-Jan-2000    01-Jan-2004    1          NaN   NaN       9% Floor 40      
 

Compute price and sensitivity values for the cap and floor instruments using bdtsens.

[Delta, Gamma, Vega, Price] = bdtsens(BDTTree, BDTSubSet)
Delta = 2×1

   63.8102
   -4.6395

Gamma = 2×1
103 ×

    1.8535
    0.4374

Vega = 2×1

   12.1674
    2.4984

Price = 2×1

    1.4375
    0.0245

Arrange the sensitivities and prices into a single matrix.

All = [Delta, Gamma, Vega, Price]
All = 2×4
103 ×

    0.0638    1.8535    0.0122    0.0014
   -0.0046    0.4374    0.0025    0.0000

To view the per-dollar sensitivities, divide each dollar sensitivity by the corresponding instrument price.

All = [Delta ./ Price, Gamma ./ Price, Vega ./ Price, Price]
All = 2×4
104 ×

    0.0044    0.1289    0.0008    0.0001
   -0.0189    1.7833    0.0102    0.0000

See Also

| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

Topics