| 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 |
[Price, PriceTree] = optembndbyhjm(HJMTree,
CouponRate,
Settle, Maturity, OptSpec, Strike,
ExerciseDates,
'Name1', Value1, 'Name2', Value2,
...)
HJMTree | Interest-rate tree structure created by hjmtree. |
CouponRate | NINST-by-1 matrix for the decimal annual rate. |
Settle | NINST-by-1 matrix for the settlement date. A vector of serial date numbers or date strings. Settle must be earlier than Maturity. |
Maturity | NINST-by-1 matrix for the maturity date. A vector of serial date numbers or date strings. |
OptSpec | NINST-by-1 cell array of strings 'call' or 'put'. |
Strike | European option: NINST-by-1 vector of strike price values. Bermuda option: NINST by number of strikes (NSTRIKES) matrix of strike price values. Each row is the schedule for one option. If an option has fewer than NSTRIKES exercise opportunities, the end of the row is padded with NaNs. For an American option: NINST-by-1 vector of strike price values for each option. |
ExerciseDates | NINST-by-1 (European option) or NINST-by-NSTRIKES (Bermuda option) matrix of exercise dates. Each row is the schedule for one option. For a European option, there is only one exercise date, the option expiry date. For an American option: NINST-by-2 vector of exercise date boundaries. For each instrument, the option can be exercised on any coupon date between or including the pair of dates on that row. If only one non-NaN date is listed, or if ExerciseDates is NINST-by-1, the option can be exercised between the underlying bond Settle and the single listed exercise date. |
(Optional) The name/value pairs are a variable length list of parameters. All optional inputs are specified as matching parameter name/value pairs. The parameter name is specified as a character string, followed by the corresponding parameter value. Parameter name/value pairs may be specified in any order; names are case insensitive and partial string matches are allowed provided no ambiguities exist. Valid parameter names are as follows:
|
Note The Settle date for every bond with embedded option is set to the ValuationDate of the HJM tree; the bond's argument for Settle date is ignored. |
[Price, PriceTree] = optembndbyhjm(HJMTree, CouponRate,Settle, Maturity, OptSpec, Strike, ExerciseDates,'Name1', Value1, 'Name2', Value2, ...) prices bonds with embedded options by an HJM interest-rate tree.
Price is a number of instruments (NINST)-by-1 matrix of expected prices at time 0.
PriceTree is a structure of trees containing vectors of instrument prices and accrued interest, and a vector of observation times for each node. Within PriceTree:
PriceTree.PBush contains the clean prices.
PriceTree.AIBush contains the accrued interest.
PriceTree.tObs contains the observation times.
Create an HJMTree with the following data:
Rates = [0.05;0.06;0.07]; Compounding = 1; StartDates = ['jan-1-2007';'jan-1-2008';'jan-1-2009']; EndDates = ['jan-1-2008';'jan-1-2009';'jan-1-2010']; ValuationDate = 'jan-1-2007';
Create a RateSpec:
RateSpec = intenvset('Rates', Rates, 'StartDates', ValuationDate, 'EndDates', ...
EndDates, 'Compounding', Compounding, 'ValuationDate', ValuationDate);
Specify a VolSpec:
VolSpec = hjmvolspec('Constant', 0.01);Specify a TimeSpec:
TimeSpec = hjmtimespec(ValuationDate, EndDates, Compounding);
Build an HJMTree:
HJMTree = hjmtree(VolSpec, RateSpec, TimeSpec);
To compute the price of an American callable bond that pays a 6% annual coupon and matures and is callable on January 1, 2010:
BondSettlement = 'jan-1-2007';
BondMaturity = 'jan-1-2010';
CouponRate = 0.06;
Period = 1;
OptSpec = 'call';
Strike = [98];
ExerciseDates = '01-Jan-2010';
AmericanOpt = 1;
[PriceCallBond,PT] = optembndbyhjm(HJMTree, CouponRate, BondSettlement, BondMaturity,...
OptSpec, Strike, ExerciseDates, 'Period', 1,'AmericanOp',1)
PriceCallBond =
95.9492
PT =
FinObj: 'HJMPriceTree'
tObs: [0 1 2 3]
PBush: {[95.9492] [1x1x2 double] [1x2x2 double] [98 98 98 98]}hjmprice, hjmtree, instoptembnd
![]() | optembndbybk | optembndbyhw | ![]() |
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 |