Main Content

compoundbystt

Price compound options using standard trinomial tree

Description

[Price,PriceTree] = compoundbystt(STTTree,UOptSpec,UStrike,USettle,UExerciseDates,UAmericanOpt,COptSpec,CStrike,CSettle,CExerciseDates) prices compound options using a standard trinomial (STT) tree.

example

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

example

Examples

collapse all

Create a RateSpec.

StartDates = datetime(2009,1,1); 
EndDates = datetime(2013,1,1); 
Rates = 0.035; 
Basis = 1; 
Compounding = -1;
RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,...
'EndDates', EndDates, 'Rates', Rates,'Compounding', Compounding, 'Basis', Basis)
RateSpec = struct with fields:
           FinObj: 'RateSpec'
      Compounding: -1
             Disc: 0.8694
            Rates: 0.0350
         EndTimes: 4
       StartTimes: 0
         EndDates: 735235
       StartDates: 733774
    ValuationDate: 733774
            Basis: 1
     EndMonthRule: 1

Create a StockSpec.

AssetPrice = 85; 
Sigma = 0.15; 
StockSpec = stockspec(Sigma, AssetPrice)
StockSpec = struct with fields:
             FinObj: 'StockSpec'
              Sigma: 0.1500
         AssetPrice: 85
       DividendType: []
    DividendAmounts: 0
    ExDividendDates: []

Create an STTTree.

NumPeriods = 4;
TimeSpec = stttimespec(StartDates, EndDates, 4);
STTTree = stttree(StockSpec, RateSpec, TimeSpec)
STTTree = struct with fields:
       FinObj: 'STStockTree'
    StockSpec: [1x1 struct]
     TimeSpec: [1x1 struct]
     RateSpec: [1x1 struct]
         tObs: [0 1 2 3 4]
         dObs: [733774 734139 734504 734869 735235]
        STree: {[85]  [110.2179 85 65.5520]  [142.9174 110.2179 85 65.5520 50.5537]  [185.3182 142.9174 110.2179 85 65.5520 50.5537 38.9870]  [240.2985 185.3182 142.9174 110.2179 85 65.5520 50.5537 38.9870 30.0668]}
        Probs: {[3x1 double]  [3x3 double]  [3x5 double]  [3x7 double]}

Define the compound option and compute the price.

USettle = datetime(2009,1,1);
UExerciseDates = datetime(2012,1,1);
UOptSpec =  'call';
UStrike = 95;
UAmericanOpt = 1;
CSettle = datetime(2009,1,1);
CExerciseDates = datetime(2011,1,1);
COptSpec = 'put';
CStrike = 5;
CAmericanOpt = 1;

Price= compoundbystt(STTTree, UOptSpec, UStrike, USettle, UExerciseDates,...
UAmericanOpt, COptSpec, CStrike, CSettle,CExerciseDates, CAmericanOpt)
Price = 
1.7090

Input Arguments

collapse all

Stock tree structure for standard trinomial tree, specified by using stttree.

Data Types: struct

Definition of underlying option, specified as 'call' or 'put' using a character vector.

Data Types: char

Underlying option strike price value, specified with a nonnegative integer using a 1-by-1 vector.

Data Types: double

Underlying option settlement date or trade date, specified as a 1-by-1 vector using a datetime array, string array, or date character vectors.

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

Underlying option exercise date, specified as a datetime array, string array, or date character vectors:

  • For a European option, use a1-by-1 vector of the underlying exercise date. For a European option, there is only one ExerciseDates on the option expiry date.

  • For an American option, use a 1-by-2 vector of the underlying exercise date boundaries. The option can be exercised on any tree date. If only one non-NaN date is listed, or if ExerciseDates is 1-by-1, the option can be exercised between ValuationDate of the stock tree and the single listed ExerciseDates.

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

Underlying option type, specified as NINST-by-1 positive integer scalar flags with values:

  • 0 — European

  • 1 — American

If UAmericanOpt is a NaN or is unspecified, the option is a European option.

Data Types: single | double

Definition of compound option, specified as 'call' or 'put' using a character vector or a cell array of character vectors with values 'call' or 'put'.

Data Types: char | cell

Compound option strike price values for a European and American option, specified with a nonnegative integer using a NINST-by-1 matrix. Each row is the schedule for one option.

Data Types: double

Compound option settlement date or trade date, specified as a 1-by-1 vector using a datetime array, string array, or date character vectors.

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

Compound option exercise dates, specified as a datetime array, string array, or date character vectors:

  • For a European option, use aNINST-by-1 matrix of the compound exercise dates. Each row is the schedule for one option. For a European option, there is only one ExerciseDates on the option expiry date.

  • For an American option, use a NINST-by-2 vector of the compound 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 ValuationDate of the stock tree and the single listed ExerciseDates.

To support existing code, compoundbystt 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 = compoundbystt(STTTree,UOptSpec,UStrike,USettle,UExerciseDates,UAmericanOpt,COptSpec,CStrike,CSettle,CExerciseDates,'CAmericanOpt',1)

Compound option type, specified as the comma-separated pair consisting of 'CAmericanOpt' and a NINST-by-1 positive integer scalar flags with values:

  • 0 — European

  • 1 — American

Data Types: single | double

Output Arguments

collapse all

Expected prices for compound options at time 0, returned as a NINST-by-1 vector.

Structure with a vector of compound option prices at each node, returned as a tree structure.

PriceTree is a MATLAB® structure of trees containing vectors of instrument prices and a vector of observation times for each node.

PriceTree.PTree contains the prices.

PriceTree.tObs contains the observation times.

PriceTree.dObs contains the observation dates.

More About

collapse all

Compound Option

A compound option is basically an option on an option; it gives the holder the right to buy or sell another option.

With a compound option, a vanilla stock option serves as the underlying instrument. Compound options thus have two strike prices and two exercise dates. For more information, see Compound Option.

Version History

Introduced in R2015b

expand all