Specify time structure for Cox-Ross-Rubinstein tree
TimeSpec = crrtimespec(ValuationDate,Maturity,NumPeriods)
example
TimeSpec = crrtimespec(ValuationDate,Maturity,NumPeriods) sets the number of levels and node times for a CRR binomial tree (crrtree).
TimeSpec
ValuationDate
Maturity
NumPeriods
crrtree
collapse all
This example shows how to specify a four-period CRR tree with time steps of 1 year.
ValuationDate = '1-July-2002'; Maturity = '1-July-2006'; TimeSpec = crrtimespec(ValuationDate, Maturity, 4)
TimeSpec = struct with fields: FinObj: 'BinTimeSpec' ValuationDate: 731398 Maturity: 732859 NumPeriods: 4 Basis: 0 EndMonthRule: 1 tObs: [0 1 2 3 4] dObs: [731398 731763 732128 732493 732859]
Pricing date and first observation in the crrtree, specified as a scalar date using a serial date number or date character vector.
Data Types: double | char
double
char
Date marking the depth of the crrtree binomial tree, specified as scalar serial date number or date character vector.
Number of time steps in the crrtree binomial tree, specified as scalar integer value.
Data Types: double
Specification for the time layout for crrtree, returned as a structure.
crrtree | stockspec
stockspec
You have a modified version of this example. Do you want to open this example with your edits?