Main Content

optstockbylr

Price options on stocks using Leisen-Reimer binomial tree model

Description

example

[Price,PriceTree] = optstockbylr(LRTree,OptSpec,Strike,Settle,ExerciseDates) computes option prices on stocks using the Leisen-Reimer binomial tree model.

Note

Alternatively, you can use the Vanilla object to price vanilla options. For more information, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

example

[Price,PriceTree] = optstockbylr(___,Name,Value) adds an optional name-value pair argument for AmericanOpt.

Examples

collapse all

This example shows how to price options on stocks using the Leisen-Reimer binomial tree model. 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 = datetime(2010,1,1);
Maturity = datetime(2010,6,1); 

% 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 = 2×3

    9.0870    9.0826    9.0831
    2.2148    2.2039    2.2044

% use treeviewer to display LRTree of 15 time steps
treeviewer(LRTree15)

Figure Tree Viewer contains 2 axes objects and other objects of type uicontrol. Axes object 1 contains 376 objects of type line. Axes object 2 is empty.

Input Arguments

collapse all

Stock tree structure, specified by lrtree.

Data Types: struct

Definition of the option as 'call' or 'put', specified as a NINST-by-1 cell array of character vectors with values 'call' or 'put'.

Data Types: char | cell

Option strike price value, specified with nonnegative integer:

  • For a European option, use a NINST-by-1 vector of strike prices.

  • For a Bermuda option, use a NINST-by-NSTRIKES vector of strike prices. 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, use a NINST-by-1 vector of strike prices.

Data Types: double

Settlement or trade date, specified as an NINST-by-1 vector using a datetime array, string array, or date character vectors.

To support existing code, optstockbylr also accepts serial date numbers as inputs, but they are not recommended.

Option exercise dates, specified as a NINST-by-1 vector using a datetime array, string array, or date character vectors, where each row is the schedule for one option and the last element of each row must be the same as the maturity of the tree.

  • For a European option, use a NINST-by-1 vector of dates. For a European option, there is only one ExerciseDate on the option expiry date.

  • For a Bermuda option, use a NINST-by-NSTRIKEDATES vector of dates.

  • For an American option, use a NINST-by-1 vector of exercise dates. For the American type, the option can be exercised on any tree data between the ValuationDate and tree maturity.

To support existing code, optstockbylr also accepts serial date numbers as inputs, but they are not recommended.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: [Price,PriceTree] = optstockbylr(LRTree,OptSpec,Strike,Settle,ExerciseDates,'AmericanOpt','1')

Option type, specified as the comma-separated pair consisting of 'AmericanOpt' and a NINST-by-1 vector of flags with values:

  • 0 — European or Bermuda

  • 1 — American

Data Types: double

Output Arguments

collapse all

expected prices at time 0, returned as a NINST-by-1 vector.

Tree structure, returned as a vector of instrument prices at each node. Values are:

  • PriceTree.PTree contains the clean prices.

  • PriceTree.tObs contains the observation times.

  • PriceTree.dObs contains the observation dates.

More About

collapse all

Vanilla Option

A vanilla option is a category of options that includes only the most standard components.

A vanilla option has an expiration date and straightforward strike price. American-style options and European-style options are both categorized as vanilla options.

The payoff for a vanilla option is as follows:

  • For a call: max(StK,0)

  • For a put: max(KSt,0)

where:

St is the price of the underlying asset at time t.

K is the strike price.

For more information, see Vanilla Option.

References

[1] Leisen D.P., M. Reimer. “Binomial Models for Option Valuation – Examining and Improving Convergence.” Applied Mathematical Finance. Number 3, 1996, pp. 319–346.

Version History

Introduced in R2010b

expand all