Main Content

crrtimespec

Specify time structure for Cox-Ross-Rubinstein tree

Description

example

TimeSpec = crrtimespec(ValuationDate,Maturity,NumPeriods) sets the number of levels and node times for a CRR binomial tree (crrtree).

Examples

collapse all

This example shows how to specify a four-period CRR tree with time steps of 1 year.

ValuationDate = datetime(2002,7,1);
Maturity = datetime(2006,7,1);
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]

Input Arguments

collapse all

Pricing date and first observation in the crrtree, specified as a scalar datetime, string, or date character vector.

To support existing code, crrtimespec also accepts serial date numbers as inputs, but they are not recommended.

Date marking the depth of the crrtree binomial tree, specified as scalar datetime, string, or date character vector.

To support existing code, crrtimespec also accepts serial date numbers as inputs, but they are not recommended.

Number of time steps in the crrtree binomial tree, specified as scalar integer value.

Data Types: double

Output Arguments

collapse all

Specification for the time layout for crrtree, returned as a structure.

Version History

Introduced before R2006a

expand all