| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Derivatives Toolbox |
| Contents | Index |
| Learn more about Financial Derivatives Toolbox |
[Delta, Gamma, Vega, Price] = bksens(BKTree,
InstSet,
Options)
BKTree | Interest-rate tree structure created by bktree. |
InstSet | Variable containing a collection of NINST instruments. Instruments are categorized by type. Each type can have different data fields. The stored data field is a row vector or string for each instrument. |
Options | (Optional) Derivatives pricing options structure created with derivset. |
[Delta, Gamma, Vega, Price] = bksens(BKTree, InstSet, Options) computes instrument sensitivities and prices for instruments using an interest-rate tree created with the bktree function. NINST instruments from a financial instrument variable, InstSet, are priced. bksens handles instrument types: 'Bond', 'CashFlow', 'OptBond', 'OptEmBond', 'Fixed', 'Float', 'Cap', 'Floor', 'Swap'. See instadd for information on instrument types.
Delta is an NINST-by-1 vector of deltas, representing the rate of change of instrument prices with respect to changes in the interest rate. Delta is computed by finite differences in calls to bktree. See bktree for information on the observed yield curve.
Gamma is an NINST-by-1 vector of gammas, representing the rate of change of instrument deltas with respect to the changes in the interest rate. Gamma is computed by finite differences in calls to bktree.
Vega is an NINST-by-1 vector
of vegas, representing the rate of change of instrument prices with
respect to the changes in the volatility
. Vega is
computed by finite differences in calls to bktree.
See bkvolspec for information
on the volatility process.
Note All sensitivities are returned as dollar sensitivities. To find the per-dollar sensitivities, divide by the respective instrument price. |
Price is an NINST-by-1 vector of prices of each instrument. The prices are computed by backward dynamic programming on the interest-rate tree. If an instrument cannot be priced, NaN is returned.
Delta and Gamma are calculated based on yield shifts of 100 basis points. Vega is calculated based on a 1% shift in the volatility process.
Load the tree and instruments from a data file. Compute Delta and Gamma for the cap and bond instruments contained in the instrument set.
load deriv.mat;
BKSubSet = instselect(BKInstSet,'Type', {'Bond', 'Cap'});
instdisp(BKSubSet)
Index Type CouponRate Settle Maturity Period Name
...
1 Bond 0.03 01-Jan-2004 01-Jan-2007 1 3% Bon
d
2 Bond 0.03 01-Jan-2004 01-Jan-2008 1 3% Bon
d
Index Type Strike Settle Maturity CapReset... Name ...
3 Cap 0.04 01-Jan-2004 01-Jan-2008 1 4% Cap
[Delta, Gamma] = bksens(BKTree, BKSubSet)
Delta =
-285.7151
-365.7048
189.5319
Gamma =
1.0e+003 *
0.8456
1.4345
6.9999
bkprice, bktree, bkvolspec, instadd
![]() | bkprice | bktimespec | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |