| Contents | Index |
[Price, PriceTree] = optstockbylr(LRTree, OptSpec,
Strike,
Settle, ExerciseDates)
[Price, PriceTree] = optstockbylr(LRTree, OptSpec,
Strike,
Settle, ExerciseDates, Name,Value)
[Price, PriceTree] = optstockbylr(LRTree, OptSpec, Strike, Settle, ExerciseDates) computes option prices on stocks using the Leisen-Reimer binomial tree model.
[Price, PriceTree] = optstockbylr(LRTree, OptSpec, Strike, Settle, ExerciseDates, Name,Value) computes option prices on stocks using the Leisen-Reimer binomial tree model with additional options specified by one or more Name,Value pair arguments.
LRTree |
Stock tree structure created by lrtree. |
OptSpec |
NINST-by-1 cell array of strings 'call' or 'put'. |
Strike |
NINST-by-1 (European/American) or NINST-by-NSTRIKES (Bermuda) 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. |
Settle |
NINST-by-1 matrix of settlement or trade dates. |
ExerciseDates |
NINST-by-1 (European/American) or NINST-by-NSTRIKEDATES (Bermuda) matrix of exercise dates. Each row is the schedule for one option. For a European option, there is only one ExerciseDate on the option expiry date. For the American type, the option can be exercised on any tree data between the ValuationDate and tree maturity. The last element of each row must be the same as the maturity of the tree. |
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
'AmericanOpt' |
NINST-by-1 flags with a value of 0 (European/Bermuda) or 1 (American). Default: 0 |
Price |
NINST-by-1 expected prices at time 0. |
PriceTree |
Tree structure with a vector of instrument prices at each node. |
Consider European call and put options with an exercise price of $95 that expire on July 1, 2010. The underlying stock is trading at $100 on January 1, 2010, provides a continuous dividend yield of 3% per annum and has a volatility of 20% per annum. The annualized continuously compounded risk-free rate is 8% per annum. Using this data, compute the price of the options using the Leisen-Reimer model with a tree of 15 and 55 time steps.
AssetPrice = 100;
Strike = 95;
ValuationDate = 'Jan-1-2010';
Maturity = 'July-1-2010';
% Define StockSpec
Sigma = 0.2;
DividendType = 'continuous';
DividendAmounts = 0.03;
StockSpec = stockspec(Sigma, AssetPrice, DividendType, DividendAmounts);
% Define RateSpec
Rates = 0.08;
Settle = ValuationDate;
Basis = 1;
Compounding = -1;
RateSpec = intenvset('ValuationDate', ValuationDate, 'StartDates', Settle, ...
'EndDates', Maturity, 'Rates', Rates, 'Compounding', Compounding, 'Basis', Basis);
% Build the Leisen-Reimer (LR) tree with 15 and 55 time steps
LRTimeSpec15 = lrtimespec(ValuationDate, Maturity, 15);
LRTimeSpec55 = lrtimespec(ValuationDate, Maturity, 55);
% Use the PP2 method
LRMethod = 'PP2';
LRTree15 = lrtree(StockSpec, RateSpec, LRTimeSpec15, Strike, 'method', LRMethod);
LRTree55 = lrtree(StockSpec, RateSpec, LRTimeSpec55, Strike, 'method', LRMethod);
% Price the call and the put options using the LR model:
OptSpec = {'call'; 'put'};
PriceLR15 = optstockbylr(LRTree15, OptSpec, Strike, Settle, Maturity);
PriceLR55 = optstockbylr(LRTree55, OptSpec, Strike, Settle, Maturity);
% Calculate price using the Black-Scholes model (BLS) to compare values with
% the LR model:
PriceBLS = optstockbybls(RateSpec, StockSpec, Settle, Maturity, OptSpec, Strike);
% Compare values of BLS and LR
[PriceBLS PriceLR15 PriceLR55]
ans =
9.7258 9.7252 9.7257
2.4896 2.4890 2.4895Use treeviewer to display the LRTree of 15 time steps:
treeviewer(LRTree15)

Leisen D.P., M. Reimer, "Binomial Models for Option Valuation – Examining and Improving Convergence," Applied Mathematical Finance, Number 3, 1996, pp. 319-346.
instoptstock | lrtree | optstocksensbylr
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-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |