stttimespec
Specify time structure for standard trinomial tree
Description
creates
a time spec for a standard trinomial (STT) tree.TimeSpec
= stttimespec(ValuationDate
,Maturity
,NumPeriods
)
Examples
Create a stttimespec to Build a STTTree
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 = 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
.
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: [0 0.0833 0.1667 0.2500 0.3333 0.4167 0.5000 0.5833 ... ]
dObs: [735600 735630 735660 735691 735721 735752 735782 ... ]
STTT = stttree(StockSpec, RateSpec, TimeSpec)
STTT = struct with fields:
FinObj: 'STStockTree'
StockSpec: [1x1 struct]
TimeSpec: [1x1 struct]
RateSpec: [1x1 struct]
tObs: [0 0.0833 0.1667 0.2500 0.3333 0.4167 0.5000 0.5833 ... ]
dObs: [735600 735630 735660 735691 735721 735752 735782 735813 ... ]
STree: {1x49 cell}
Probs: {1x48 cell}
Input Arguments
ValuationDate
— Date marking the pricing date and first observation tree
serial date number | date character vector
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
Maturity
— Date marking the depth of tree
serial date number | date character vector
Date marking the depth of the tree, specified as a scalar using a serial date number or date character vector.
Data Types: double
| char
NumPeriods
— Determines how many time steps are in tree
nonnegative integer
Determines how many time steps are in tree, specified as a scalar using a nonnegative integer value.
Data Types: double
Output Arguments
TimeSpec
— Time layout for standard trinomial (STT) tree
structure
Time layout for standard trinomial (STT) tree, returned as a structure.
Version History
See Also
Abrir ejemplo
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)