cirtree
Build a Cox-Ingersoll-Ross interest-rate tree
Description
Examples
Create a CIR Tree
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: {1x4 cell}
Connect: {[3x1 double] [3x3 double] [3x5 double]}
Probs: {[3x1 double] [3x3 double] [3x5 double]}
Input Arguments
VolSpec
— Volatility process specification
structure
Volatility process specification, specified using the VolSpec
output obtained from cirvolspec
.
Data Types: struct
TimeSpec
— Time tree layout specification
structure
Time tree layout specification, specified using the TimeSpec
output obtained from cirtimespec
.
Data Types: struct
Output Arguments
CIRTree
— Time and interest-rate information of a recombining tree
structure
Time and interest-rate information of a recombining tree, returned as a structure.
Version History
Introduced in R2018a
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)