Financial Derivatives Toolbox | ![]() ![]() |
Sensitivity
The Financial Derivatives Toolbox can calculate two types of derivative price sensitivities, namely delta and gamma. Delta represents the dollar sensitivity of prices to shifts in the observed forward yield curve. Gamma represents the dollar sensitivity of delta to shifts in the observed forward yield curve.
The intenvsens
function computes instrument sensitivities as well as instrument prices. If you need both the prices and sensitivity measures, use intenvsens
. A separate call to intenvprice
is not required.
Example: Sensitivities and Prices
Here is an example of using intenvsens
to calculate both sensitivities and prices.
Display the results in a single matrix in long format.
All = [Delta Gamma Price] All = 1.0e+003 * -0.27264034403478 1.02984451401241 0.09871593902758 -0.34743857788527 1.62265027222659 0.09753338552637 -0.27264034403478 1.02984451401241 0.09871593902758 -0.00104445683331 0.00330878190894 0.10055293001355 -0.28204045553455 1.05962355119047 0.00369230914950
To view the per-dollar sensitivity, divide the first two columns by the last one.
[Delta./Price, Gamma./Price, Price] ans = 1.0e+002 * -0.02761867503065 0.10432403562759 0.98715939027581 -0.03562252822561 0.16636870169834 0.97533385526369 -0.02761867503065 0.10432403562759 0.98715939027581 -0.00010387134748 0.00032905872643 1.00552930013547 -0.76385926561057 2.86981265188338 0.03692309149502
![]() | Pricing | Heath-Jarrow-Morton (HJM) Model | ![]() |