optstockbyeqp

Price stock option from Equal Probabilities binomial tree

Syntax

[Price, PriceTree] = optstockbyeqp(EQPTree, OptSpec, Strike,
Settle, ExerciseDates, AmericanOpt)

Arguments

EQPTree

Stock tree structure created by eqptree.

OptSpec

Number of instruments (NINST)-by-1 cell array of strings 'call' or 'put'.

    Note   The interpretation of the Strike and ExerciseDates arguments depends upon the setting of the AmericanOpt argument. If AmericanOpt = 0, NaN, or is unspecified, the option is a European or Bermuda option. If AmericanOpt = 1, the option is an American option.

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.

American option: NINST-by-1 vector of strike price values for each option.

Settle

NINST-by-1 vector of settlement or trade dates.

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 tree 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 ValuationDate of the stock tree and the single listed ExerciseDate.

Data arguments are NINST-by-1 vectors, scalar, or empty. Fill unspecified entries in vectors with NaN. Only one data argument is required to create the instrument. The others may be omitted or passed as empty matrices [].

Description

[Price, PriceTree] = optstockbyeqp(EQPTree, OptSpec, Strike,
Settle, ExerciseDates, AmericanOpt)
computes the price of a European/Bermuda or American stock option.

Price is a NINST-by-1 vector of expected option prices at time 0.

PriceTree is a tree structure with a vector of instrument prices at each node.

Examples

expand all

Price an American Stock Option Using an EQP Equity Tree

This example shows how to price an American stock option using an EQP equity tree by loading the file deriv.mat, which provides EQPTree. The EQPTree structure contains the stock specification and time information needed to price the American option.

load deriv.mat

OptSpec = 'Call';
Strike = 105;
Settle = '01-Jan-2003';
ExerciseDates = '01-Jan-2006';
AmericanOpt = 1;

Price = optstockbyeqp(EQPTree, OptSpec, Strike, Settle, ...
ExerciseDates, AmericanOpt)
Price =

   12.2632

Price a Bermudan Stock Option Using a EQP Equity Tree

Load the file deriv.mat, which provides EQPTree. The EQPTree structure contains the stock specification and time information needed to price the Bermudan option.

load deriv.mat;

% Option
OptSpec = 'Call';
Strike = 105;
Settle = '01-Jan-2003';
ExerciseDatesBerm={'15-Jan-2004','15-Jul-2004','15-Jan-2005','15-Jul-2005'};

Price the Bermudan option.

Price= optstockbyeqp(EQPTree, OptSpec, Strike, Settle, ExerciseDatesBerm)
Warning: Some ExerciseDates are not aligned with tree nodes. Result will be
approximated. 

Price =

   12.0255

Was this topic helpful?