Main Content

stttree

Build standard trinomial tree

Description

STTTree = stttree(StockSpec,RateSpec,TimeSpec) builds a standard trinomial (STT) tree.

example

Examples

collapse all

Create a RateSpec.

StartDates = 'Jan-1-2014'; 
EndDates = 'Jan-1-2018'; 
Rates = 0.025; 
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.9048
            Rates: 0.0250
         EndTimes: 4
       StartTimes: 0
         EndDates: 737061
       StartDates: 735600
    ValuationDate: 735600
            Basis: 1
     EndMonthRule: 1

Create a StockSpec.

AssetPrice = 55; 
Sigma = 0.22; 
Div = 0.02; 
StockSpec = stockspec(Sigma, AssetPrice, 'continuous', Div)
StockSpec = struct with fields:
             FinObj: 'StockSpec'
              Sigma: 0.2200
         AssetPrice: 55
       DividendType: {'continuous'}
    DividendAmounts: 0.0200
    ExDividendDates: []

Create a Standard Trinomial Tree (STTTree).

NumSteps = 8;
TimeSpec = stttimespec(StartDates, EndDates, NumSteps);
STTT = stttree(StockSpec, RateSpec, TimeSpec)
STTT = struct with fields:
       FinObj: 'STStockTree'
    StockSpec: [1x1 struct]
     TimeSpec: [1x1 struct]
     RateSpec: [1x1 struct]
         tObs: [0 0.5000 1 1.5000 2 2.5000 3 3.5000 4]
         dObs: [735600 735782 735965 736147 736330 736513 736695 736878 737061]
        STree: {1x9 cell}
        Probs: {[3x1 double]  [3x3 double]  [3x5 double]  [3x7 double]  [3x9 double]  [3x11 double]  [3x13 double]  [3x15 double]}

Input Arguments

collapse all

Stock specification for underlying asset, specified using StockSpec obtained from stockspec. For information on the stock specification, see stockspec.

stockspec can handle other types of underlying assets. For example, stocks, stock indices, and commodities. If dividends are not specified in StockSpec, dividends are assumed to be 0.

Data Types: struct

Interest-rate term specification of initial risk-free rate curve, specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

Data Types: struct

Tree time layout specification, specified using stttimespec to define the observation dates of the standard trinomial (STT) tree.

Data Types: struct

Output Arguments

collapse all

Tree specifying stock and time information for a standard trinomial (STT) tree, returned as a tree structure.

Version History

Introduced in R2015b