Main Content

cirtree

Build a Cox-Ingersoll-Ross interest-rate tree

Description

example

CIRTree = cirvolspec(VolSpec,RateSpec,TimeSpec) builds a Cox-Ingersoll-Ross (CIR) interest-rate tree. The CIR tree uses a CIR++ model with the Nawalka-Beliaeva (NB) approach.

Examples

collapse all

Create a RateSpec using the intenvset function.

Rates = [0.035; 0.042147; 0.047345; 0.052707]; 
Dates = {'Jan-1-2017'; 'Jan-1-2018'; 'Jan-1-2019'; 'Jan-1-2020'; 'Jan-1-2021'}; 
ValuationDate = 'Jan-1-2017'; 
EndDates = Dates(2:end)'; 
Compounding = 1; 
RateSpec = intenvset('ValuationDate', ValuationDate, 'StartDates', ValuationDate, 'EndDates',EndDates,'Rates', Rates, 'Compounding', Compounding); 

Create a CIR tree.

NumPeriods = length(EndDates); 
Alpha = 0.03; 
Theta = 0.02;  
Sigma = 0.1;   
Settle = '01-Jan-2017'; 
Maturity = '01-Jan-2021'; 
CIRTimeSpec = cirtimespec(Settle, Maturity, NumPeriods); 
CIRVolSpec = cirvolspec(Sigma, Alpha, Theta); 

CIRT = cirtree(CIRVolSpec, RateSpec, CIRTimeSpec)
CIRT = struct with fields:
      FinObj: 'CIRFwdTree'
     VolSpec: [1x1 struct]
    TimeSpec: [1x1 struct]
    RateSpec: [1x1 struct]
        tObs: [0 1 2 3]
        dObs: [736696 737061 737426 737791]
     FwdTree: {[1.0350]  [1.0790 1.0500 1.0298]  [1x5 double]  [1x7 double]}
     Connect: {[3x1 double]  [3x3 double]  [3x5 double]}
       Probs: {[3x1 double]  [3x3 double]  [3x5 double]}

Input Arguments

collapse all

Volatility process specification, specified using the VolSpec output obtained from cirvolspec.

Data Types: struct

Interest-rate specification for initial risk-free rate curve, specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

Data Types: struct

Time tree layout specification, specified using the TimeSpec output obtained from cirtimespec.

Data Types: struct

Output Arguments

collapse all

Time and interest-rate information of a recombining tree, returned as a structure.

Introduced in R2018a