| Financial Derivatives Toolbox™ | ![]() |
[Price, PriceTree] = bdtprice(BDTTree,
InstSet, Options)
BDTTree | Interest-rate tree structure created by bdttree. |
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. |
[Price, PriceTree] = bdtprice(BDTTree, InstSet, Options) computes arbitrage-free prices for instruments using an interest-rate tree created with bdttree. All instruments contained in a financial instrument variable, InstSet, are priced.
Price is a number of instruments (NINST)-by-1 vector of prices for each instrument. The prices are computed by backward dynamic programming on the interest-rate tree. If an instrument cannot be priced, NaN is returned.
PriceTree is a MATLAB® structure of trees containing vectors of instrument prices and accrued interest, and a vector of observation times for each node.
PriceTree.PTree contains the clean prices.
PriceTree.AITree contains the accrued interest.
PriceTree.tObs contains the observation times.
bdtprice handles instrument types: 'Bond', 'CashFlow', 'OptBond', 'OptEmBond', 'Fixed', 'Float', 'Cap', 'Floor', 'Swap'. See instadd to construct defined types.
Related single-type pricing functions are
bondbybdt: Price a bond from a BDT tree.
capbybdt: Price a cap from a BDT tree.
cfbybdt: Price an arbitrary set of cash flows from a BDT tree.
fixedbybdt: Price a fixed-rate note from a BDT tree.
floatbybdt: Price a floating-rate note from a BDT tree.
floorbybdt: Price a floor from a BDT tree.
optbndbybdt: Price a bond option from a BDT tree.
optembndbybdt: Price a bond with embedded option by a BDT tree.
swapbybdt: Price a swap from a BDT tree.
swaptionbybdt: Price a swaption from a BDT tree.
Load the BDT tree and instruments from the data file deriv.mat. Price the cap and bond instruments contained in the instrument set.
load deriv.mat;
BDTSubSet = instselect(BDTInstSet,'Type', {'Bond', 'Cap'});
instdisp(BDTSubSet)
Index Type CouponRate Settle Maturity Period Name ...
1 Bond 0.1 01-Jan-2000 01-Jan-2003 1 10% bond
2 Bond 0.1 01-Jan-2000 01-Jan-2004 2 10% bond
Index Type Strike Settle Maturity CapReset... Name ...
3 Cap 0.15 01-Jan-2000 01-Jan-2004 1 15% Cap
[Price, PriceTree] = bdtprice(BDTTree, BDTSubSet);
Warning: Not all cash flows are aligned with the tree. Result will
be approximated.
Price =
95.5030
93.9079
1.4863
You can use treeviewer to see the prices of these three instruments along the price tree.

bdtsens, bdttree, instadd, intenvprice, intenvsens
![]() | barrierbyitt | bdtsens | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |