Main Content

stttree

Build standard trinomial tree

Description

example

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

Examples

collapse all

创建一个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

创建一个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: []

创建一个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 ... ] STree: {1x9 cell} Probs: {1x8 cell}

Input Arguments

collapse all

Stock specification for underlying asset, specified usingStockSpecobtained fromstockspec. For information on the stock specification, seestockspec.

stockspeccan handle other types of underlying assets. For example, stocks, stock indices, and commodities. If dividends are not specified inStockSpec, dividends are assumed to be0.

Data Types:struct

Interest-rate term specification of initial risk-free rate curve, specified by theRateSpecobtained fromintenvset. For information on the interest-rate specification, seeintenvset.

Data Types:struct

Tree time layout specification, specified usingstttimespecto 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.

版本History

Introduced in R2015b