Main Content

cirtree

Build a Cox-Ingersoll-Ross interest-rate tree

Description

example

CIRTree = cirtree(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.

Note

Alternatively, you can use the Cap object to price cap instruments. For more information, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

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]  [1.1275 1.0887 1.0594 1.0390 1.0270]  [1.1905 1.1406 1.1014 1.0718 1.0512 1.0390 1.0350]}
     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.

Version History

Introduced in R2018a