Financial Derivatives Toolbox | ![]() ![]() |
Calculating Prices and Sensitivities
The function bdtsens
computes the delta, gamma, and vega sensitivities of instruments using an interest rate tree created with bdttree
. It also optionally returns the calculated price for each instrument. bdtsens
requires the same two input arguments used by bdtprice
, namely BDTTree
and BDTInstSet
.
bdtsens
calculates 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.
The calling syntax for the function is
Use the previous example data to calculate the price of instruments.
load deriv.mat [Delta, Gamma, Vega, Price] = bdtsens(BDTTree, BDTInstSet); Warning: Not all cash flows are aligned with the tree. Result will be approximated.
Note The warning appears because some of the cash flows for the second bond do not fall exactly on a tree node. This situation was discussed in HJM Pricing Options Structure. |
You can conveniently examine the sensitivities and the prices by arranging them into a single matrix.
All = [Delta, Gamma, Vega, Price] All = 1.0e+003 * -0.2327 0.8037 -0.0000 0.0955 -0.2811 1.1819 -0.0000 0.0939 -0.0505 0.2460 0.0053 0.0018 -0.2327 0.8037 0 0.0955 0.0000 0.0021 0.0014 0.1006 0.0784 0.7490 0.0135 0.0015 -0.0044 0.3821 0.0025 0.0000 -0.2541 0.8642 -0.0014 0.0073
As with the prices, each row of the sensitivity vectors corresponds to the similarly indexed instrument in BDTInstSet
. To view the per-dollar sensitivities, divide each dollar sensitivity by the corresponding instrument price.
All = [Delta ./ Price, Gamma ./ Price, Vega ./ Price, Price] All = 1.0e+004 * -0.0002 0.0008 -0.0000 0.0096 -0.0003 0.0013 -0.0000 0.0094 -0.0029 0.0139 0.0003 0.0002 -0.0002 0.0008 0 0.0096 0.0000 0.0000 0.0000 0.0101 0.0053 0.0504 0.0009 0.0001 -0.0178 1.5577 0.0102 0.0000 -0.0035 0.0118 -0.0000 0.0007
![]() | BDT Pricing Options Structure | Hedging Portfolios | ![]() |