compoundbystt

Price compound options using standard trinomial tree

Description

example

[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.

Examples

collapse all

Create a RateSpec.

StartDates = 'Jan-1-2009'; 
EndDates = 'Jan-1-2013'; 
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: {1x5 cell}
        Probs: {[3x1 double]  [3x3 double]  [3x5 double]  [3x7 double]}

Define the compound option and compute the price.

USettle = '1/1/09';
UExerciseDates = '1/1/12';
UOptSpec =  'call';
UStrike = 95;
UAmericanOpt = 1;
CSettle = '1/1/09';
CExerciseDates = '1/1/11';
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 serial date number or character vector.

Data Types: double | char

Underlying option exercise date, specified as a serial date number or date character vector:

  • 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.

Data Types: double | char

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 serial date number or date character vector.

Data Types: double | char

Compound option exercise dates, specified as serial date numbers 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.

Data Types: double | char

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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.

Introduced in R2015b