DocumentationHelp Center
Specify time structure for standard trinomial tree
TimeSpec = stttimespec(ValuationDate,Maturity,NumPeriods)
example
TimeSpec = stttimespec(ValuationDate,Maturity,NumPeriods) creates a time spec for a standard trinomial (STT) tree.
TimeSpec
ValuationDate
Maturity
NumPeriods
collapse all
Create a RateSpec.
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.
StockSpec
AssetPrice = 110; Sigma = 0.22; Div = 0.02; StockSpec = stockspec(Sigma, AssetPrice, 'continuous', Div)
StockSpec = struct with fields: FinObj: 'StockSpec' Sigma: 0.2200 AssetPrice: 110 DividendType: {'continuous'} DividendAmounts: 0.0200 ExDividendDates: []
Create a STTTimespec and STTTree.
STTTimespec
STTTree
NumPeriods = length(cfdates(StartDates,EndDates,12)); TimeSpec = stttimespec(StartDates, EndDates, NumPeriods)
TimeSpec = struct with fields: FinObj: 'STTTimeSpec' ValuationDate: 735600 Maturity: 737061 NumPeriods: 48 Basis: 0 EndMonthRule: 1 tObs: [1x49 double] dObs: [1x49 double]
STTT = stttree(StockSpec, RateSpec, TimeSpec)
STTT = struct with fields: FinObj: 'STStockTree' StockSpec: [1x1 struct] TimeSpec: [1x1 struct] RateSpec: [1x1 struct] tObs: [1x49 double] dObs: [1x49 double] STree: {1x49 cell} Probs: {1x48 cell}
Date marking the pricing date and first observation in the tree, specified as a scalar using a serial date number or date character vector.
Data Types: double | char
double
char
Date marking the depth of the tree, specified as a scalar using a serial date number or date character vector.
Determines how many time steps are in tree, specified as a scalar using a nonnegative integer value.
Data Types: double
Time layout for standard trinomial (STT) tree, returned as a structure.
stttree
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office