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: {[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
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
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)