IRTree
创建IRTree
定价的人对象帽
,地板上
,交换
,掉期期权
,FloatBond
,FixedBond
,FixedBondOption
,FloatBondOption
,OptionEmbeddedFixedBond
,或OptionEmbeddedFloatBond
仪器
描述
创建和价格帽
,地板上
,交换
,掉期期权
,FloatBond
,FixedBond
,FixedBondOption
,FloatBondOption
,OptionEmbeddedFixedBond
,或OptionEmbeddedFloatBond
工具对象HullWhite
或BlackKarasinski
模型和一个IRTree
使用此工作流定价方法:
使用
fininstrument
创建一个帽
,地板上
,掉期期权
,交换
,FloatBond
,FixedBond
,FixedBondOption
,FloatBondOption
,OptionEmbeddedFixedBond
,或OptionEmbeddedFloatBond
仪对象。使用
finmodel
指定一个HullWhite
或BlackKarasinski
模型帽
,地板上
,掉期期权
,交换
,FixedBond
,FloatBond
,FixedBondOption
,FloatBondOption
,OptionEmbeddedFixedBond
,或OptionEmbeddedFloatBond
仪对象。使用
finpricer
指定一个IRTree
定价的人对象BK或HW三叉树模型帽
,地板上
,掉期期权
,交换
,FixedBond
,FloatBond
,FixedBondOption
,FloatBondOption
,OptionEmbeddedFixedBond
,或OptionEmbeddedFloatBond
仪对象。
此工作流的更多信息,请参阅开始使用工作流使用基于对象的金融工具定价的框架。
在可用的工具的更多信息,模型,和定价方法帽
,地板上
,掉期期权
,交换
,FixedBond
,FloatBond
,FloatBondOption
,OptionEmbeddedFixedBond
,或OptionEmbeddedFloatBond
仪器,看选择工具、模型和定价的人。
创建
描述
创建一个IRTreePricerObj
= finpricer (PricerType
”,模型
“model_type,”DiscountCurve
“ratecurve_obj,”TreeDates
”,tree_dates)IRTree
定价的人通过指定对象PricerType
和所需的参数名称-值对模型
,DiscountCurve
,TreeDates
设置属性使用名称-值对参数。例如,IRTreePricerObj = finpricer (“IRTree”、“模型”,HullWhite DiscountCurve, ratecure_obj,“TreeDates”, [1 - 30 - 2018, ' 1 - 30 - 2019 '])
创建一个IRTree
定价的人对象。
输入参数
PricerType
- - - - - -定价的人类型
字符串值“IRTree”
|特征向量和价值“IRTree”
定价的人类型,指定为一个字符串的值“IRTree”
或者一个特征向量的值“IRTree”
。
数据类型:字符
|字符串
需要对参数指定为Name1 = Value1,…,以=家
,在那里的名字
参数名称和吗价值
相应的价值。名称-值参数必须出现在其他参数,但对的顺序无关紧要。
R2021a之前,用逗号来分隔每一个名称和值,并附上的名字
在报价。
例子:IRTreePricerObj = finpricer (“IRTree”、“模型”,HullWhite DiscountCurve, ratecure_obj,“TreeDates”, [1 - 30 - 2018, ' 1 - 30 - 2019 '])
模型
- - - - - -模型类型
HullWhite
对象|BlackKarasinski
对象
模型类型,指定为逗号分隔组成的“模型”
和先前创建的名称HullWhite
或BlackKarasinski
模型对象。创建模型对象使用finmodel
。
请注意
当你使用HullWhite
模型中,IRTree
定价的人使用HW2000算法[1]。
数据类型:对象
DiscountCurve
- - - - - -ratecurve
对象创建IRTree
和折现现金流
ratecurve
对象
TreeDates
- - - - - -日期标记树的现金流的日期
向量
日期标记树的现金流日期,指定为逗号分隔组成的“TreeDates”
和一个NLEVELS
——- - - - - -1
向量的日期。现金流与这些日期将落在树节点。的TreeDates
参数确定的数量水平,或深度,树的。日期在增加订单列表。
数据类型:双
|细胞
|datetime
属性
树
- - - - - -HW或BK三叉树
struct HW和BK树
HW或BK三叉树,作为struct返回以下属性:
则
包含树的每一层的时间因素。强加于人
包含树的每一层的日期。聚合氯化铝
包含的单元阵列3
——- - - - - -N
数值数组的,中期,概率树的每个节点除了最后的水平。细胞从根节点单元阵列中的命令。数组是3
——- - - - - -N
与第一行对应于一个向上移动,中期行中设置,等等。数组的每一列代表一个节点从顶部节点给定的水平。CFlowT
是一个单元阵列和尽可能多的元素树的水平。每个单元格数组元素包含时间因素(则
)相应的树和那些领先的水平。聚合氯化铝
包含概率数组。细胞数组的每个元素包含起来,中间,和向下跃迁概率为每个节点的水平。连接
包含一个单元阵列与树的每个节点的连接信息。类似的安排聚合氯化铝
,除了它在每个单元只有一行。代表了节点数中间分支连接到下一个层次。分支连接到顶部上面的值(- 1)和较低的分支连接到下面的值(+ 1)。FwdTree
包含了即期汇率从一个节点到另一个。远期现货汇率定义为折现系数的倒数。RateTree
包含利率从一个节点到另一个。
数据类型:结构体
TreeDates
- - - - - -树的日期
datetime
树的日期,作为标量datetime或datetime数组返回。
数据类型:datetime
模型
- - - - - -模型类型
HullWhite
对象或BlackKarasinski
对象
模型类型,返回一个对象。
数据类型:对象
DiscountCurve
- - - - - -ratecurve
对象创建IRTree
和折现现金流
ratecurve
对象
对象的功能
价格 |
计算价格的利率工具IRTree 定价的人 |
例子
使用Hull-White树定价的人和Hull-White模型价格FixedBondOption乐器
这个例子显示了工作流价格FixedBondOption
当你使用工具HullWhite
模型和一个IRTree
定价方法。
创建FixedBond
仪对象
使用fininstrument
创建一个FixedBond
仪对象作为底层的债券。
BondInst = fininstrument (“FixedBond”,“成熟”datetime (2029、9、15),“CouponRate”,0.025,“时间”,1“名字”,“fixed_bond_instrument”)
BondInst = FixedBond属性:CouponRate: 0.0250期:1基础:0 EndMonthRule: 1主要:100 DaycountAdjustedCashFlow: 0 BusinessDayConvention:“实际”假期:NaT IssueDate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate可以:NaT成熟度:15 - 9 - 2029的名字:“fixed_bond_instrument”
创建FixedBondOption
仪对象
使用fininstrument
创建一个FixedBondOption
仪对象。
FixedBOption = fininstrument (“FixedBondOption”,“ExerciseDate”datetime (2025、9、15),“罢工”,98,“债券”BondInst,“名字”,“fixed_bond_option_instrument”)
FixedBOption = FixedBondOption属性:OptionType:“叫“ExerciseStyle:“欧洲”ExerciseDate: 15 - 9月- 2025年罢工:98年邦德:[1 x1 fininstrument。FixedBond)名称:“fixed_bond_option_instrument”
创建ratecurve
对象
创建一个ratecurve
对象使用ratecurve
。
解决= datetime (2019、9、15);类型=“零”;ZeroTimes = [calyears ([1:10])] ';ZeroRates = [0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307 0.0310) ';ZeroDates = + ZeroTimes定居;myRC = ratecurve (“零”、结算、ZeroDates ZeroRates)
myRC = ratecurve属性:类型:“零”组合:1基础:0日期:x1 datetime[10]利率:x1双[10]解决:15 - 9 - 2019 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“以前”
创建HullWhite
模型对象
使用finmodel
创建一个HullWhite
模型对象。
HullWhiteModel = finmodel (“HullWhite”,“α”,0.01,“σ”,0.05)
HullWhiteModel = HullWhite属性:α:0.0100σ:0.0500
创建IRTree
定价的人对象
使用finpricer
创建一个IRTree
定价的人对象和使用ratecurve
对象的“DiscountCurve”
名称-值对的论点。
HWTreePricer = finpricer (“irtree”,“模型”HullWhiteModel,“DiscountCurve”myRC,“TreeDates”ZeroDates)
HWTreePricer = HWBKTree属性:树:[1 x1 struct] TreeDates: [10 x1 datetime)模型:[1 x1 finmodel。HullWhite] DiscountCurve: [1 x1 ratecurve]
HWTreePricer.Tree
ans =结构体字段:则:[0 1 1.9973 2.9945 3.9918 4.9918 5.9891 6.9863 7.9836 8.9836]罗伯特:[15 - - - - 2019年9月15日- 2021年9月- 2020年9月15 - -…]CFlowT: {1 x10细胞}聚合氯化铝:}{1 x9细胞连接:{1 x9细胞}FwdTree: {1 x10细胞}RateTree: {1 x10细胞}
价格FixedBondOption
仪器
使用价格
来计算的价格和敏感性FixedBondOption
乐器。
(价格、outPR) =价格(HWTreePricer, FixedBOption“所有”])
价格= 11.1739
outPR = priceresult属性:结果:[1 x4表]PricerData: [1 x1 struct]
outPR.Results
ans =1×4表价格看上去织女星γδ长得一样11.174 243.09 3667.6 -272.19
使用Black-Karasinski树定价的人和Black-Karasinski模型价格FixedBondOption乐器
这个例子显示了工作流价格FixedBondOption
当你使用工具BlackKarasinski
模型和一个IRTree
定价方法。
创建FixedBond
仪对象
使用fininstrument
创建一个FixedBond
仪对象作为底层的债券。
BondInst = fininstrument (“FixedBond”,“成熟”datetime (2029、9、15),“CouponRate”,0.025,“时间”,1“名字”,“fixed_bond_instrument”)
BondInst = FixedBond属性:CouponRate: 0.0250期:1基础:0 EndMonthRule: 1主要:100 DaycountAdjustedCashFlow: 0 BusinessDayConvention:“实际”假期:NaT IssueDate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate可以:NaT成熟度:15 - 9 - 2029的名字:“fixed_bond_instrument”
创建FixedBondOption
仪对象
使用fininstrument
创建一个FixedBondOption
仪对象。
FixedBOption = fininstrument (“FixedBondOption”,“ExerciseDate”datetime (2025、9、15),“罢工”,100,“债券”BondInst,“名字”,“fixed_bond_option”)
FixedBOption = FixedBondOption属性:OptionType:“叫“ExerciseStyle:“欧洲”ExerciseDate: 15 - 9月- 2025年罢工:100年邦德:[1 x1 fininstrument。FixedBond)名称:“fixed_bond_option”
创建ratecurve
对象
创建一个ratecurve
对象使用ratecurve
。
解决= datetime (2019、9、15);类型=“零”;ZeroTimes = [calyears ([1:10])] ';ZeroRates = [0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307 0.0310) ';ZeroDates = + ZeroTimes定居;myRC = ratecurve (“零”、结算、ZeroDates ZeroRates)
myRC = ratecurve属性:类型:“零”组合:1基础:0日期:x1 datetime[10]利率:x1双[10]解决:15 - 9 - 2019 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“以前”
创建BlackKarasinski
模型对象
使用finmodel
创建一个BlackKarasinski
模型对象。
BlackKarasinskiModel = finmodel (“BlackKarasinski”,“α”,0.02,“σ”,0.34)
BlackKarasinskiModel = BlackKarasinski属性:α:0.0200σ:0.3400
创建IRTree
定价的人对象
使用finpricer
创建一个IRTree
定价的人对象和使用ratecurve
对象的“DiscountCurve”
名称-值对的论点。
BKTreePricer = finpricer (“IRTree”,“模型”BlackKarasinskiModel,“DiscountCurve”myRC,“TreeDates”ZeroDates)
BKTreePricer = HWBKTree属性:树:[1 x1 struct] TreeDates: [10 x1 datetime)模型:[1 x1 finmodel。BlackKarasinski] DiscountCurve: [1 x1 ratecurve]
BKTreePricer.Tree
ans =结构体字段:则:[0 1 1.9973 2.9945 3.9918 4.9918 5.9891 6.9863 7.9836 8.9836]罗伯特:[15 - - - - 2019年9月15日- 2021年9月- 2020年9月15 - -…]CFlowT: {1 x10细胞}聚合氯化铝:}{1 x9细胞连接:{1 x9细胞}FwdTree: {1 x10细胞}RateTree: {1 x10细胞}
价格FixedBondOption
仪器
使用价格
来计算的价格和敏感性FixedBondOption
乐器。
(价格、outPR) =价格(BKTreePricer, FixedBOption“所有”])
价格= 0.5814
outPR = priceresult属性:结果:[1 x4表]PricerData: [1 x1 struct]
outPR.Results
ans =1×4表价格织女星γδ累积专攻0.58143 2.793 45.702 -15.842
使用Hull-White树定价的人和Hull-White模型价格香草FixedBond乐器
这个例子显示了香草工作流价格FixedBond
当你使用工具HullWhite
模型和一个IRTree
定价方法。
创建FixedBond
仪对象
使用fininstrument
创建一个FixedBond
仪对象。
成熟= datetime (2024、1、1);时间= 1;VBond = fininstrument (“FixedBond”,“成熟”成熟,“CouponRate”,0.025,“时间”期)
VBond = FixedBond属性:CouponRate: 0.0250期:1基础:0 EndMonthRule: 1主要:100 DaycountAdjustedCashFlow: 0 BusinessDayConvention:“实际”假期:NaT IssueDate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate可以:NaT成熟度:01 - 1月- 2024的名字:“
创建ratecurve
对象
创建一个ratecurve
对象使用ratecurve
。
解决= datetime (2018、1、1);ZeroTimes = calyears (1:10)”;ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307) ';ZeroDates = + ZeroTimes定居;复合= 1;ZeroCurve = ratecurve (“零”、结算、ZeroDates ZeroRates,“复合”、复合);
创建HullWhite
模型对象
使用finmodel
创建一个HullWhite
模型对象。
VolCurve = 0.01;AlphaCurve = 0.1;HWModel = finmodel (“HullWhite”,“α”AlphaCurve,“σ”,VolCurve);
创建IRTree
定价的人对象
使用finpricer
创建一个IRTree
定价的人对象和使用ratecurve
对象的“DiscountCurve”
名称-值对的论点。
HWTreePricer = finpricer (“IRTree”,“模型”HWModel,“DiscountCurve”ZeroCurve,“TreeDates”ZeroDates)
HWTreePricer = HWBKTree属性:树:[1 x1 struct] TreeDates: [10 x1 datetime)模型:[1 x1 finmodel。HullWhite] DiscountCurve: [1 x1 ratecurve]
价格FixedBond
仪器
使用价格
计算价格和香草的敏感性FixedBond
乐器。
(价格、outPR) =价格(HWTreePricer, VBond“所有”])
价格= 107.7023
outPR = priceresult属性:结果:[1 x4表]PricerData: [1 x1 struct]
outPR.Results
ans =1×4表价格织女星γδ_____ _____ _____ 107.7 0 4086.4 - -602.56
使用Hull-White树定价的人和Hull-White模型价格香草FloatBond乐器
这个例子显示了香草工作流价格FloatBond
当你使用工具HullWhite
模型和一个IRTree
定价方法。
创建ratecurve
对象
创建一个ratecurve
对象使用ratecurve
。
解决= datetime (2018、1、1);ZeroTimes = calyears (1:10)”;ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307) ';ZeroDates = + ZeroTimes定居;复合= 1;ZeroCurve = ratecurve (“零”、结算、ZeroDates ZeroRates,“复合”、复合);
创建FloatBond
仪对象
使用fininstrument
创建一个香草FloatBond
仪对象。
传播= 0.03;重置= 1;成熟= datetime (2024、1、1);时间= 1;浮动= fininstrument (“FloatBond”,“成熟”成熟,“传播”传播,“重置”重置,“ProjectionCurve”ZeroCurve)
浮动= FloatBond属性:传播:0.0300 ProjectionCurve: [1 x1 ratecurve] ResetOffset: 0重置:1基础:0 EndMonthRule: 1主要:100 DaycountAdjustedCashFlow: 0 BusinessDayConvention:“实际”LatestFloatingRate:南假日:NaT IssueDate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate可以:NaT成熟度:01 - 1月- 2024的名字:“
创建HullWhite
模型对象
使用finmodel
创建一个HullWhite
模型对象。
VolCurve = 0.01;AlphaCurve = 0.1;HWModel = finmodel (“HullWhite”,“α”AlphaCurve,“σ”,VolCurve);
创建IRTree
定价的人对象
使用finpricer
创建一个IRTree
定价的人对象和使用ratecurve
对象的“DiscountCurve”
名称-值对的论点。
HWTreePricer = finpricer (“IRTree”,“模型”HWModel,“DiscountCurve”ZeroCurve,“TreeDates”ZeroDates)
HWTreePricer = HWBKTree属性:树:[1 x1 struct] TreeDates: [10 x1 datetime)模型:[1 x1 finmodel。HullWhite] DiscountCurve: [1 x1 ratecurve]
价格FloatBond
仪器
使用价格
计算价格和香草的敏感性FloatBond
乐器。
价格(价格、outPR) = (HWTreePricer、浮点数、“所有”])
价格= 117.4686
outPR = priceresult属性:结果:[1 x4表]PricerData: [1 x1 struct]
outPR.Results
ans =1×4表价格看上去织女星γδ辩得一样117.47 0 315.09 - -60.007
引用
[1]船体、约翰和艾伦·怀特。“将军Hull-White模型和Supercalibration。”金融分析师期刊卷,57号2001年11月6日,34-43页。
版本历史
MATLAB命令
你点击一个链接对应MATLAB命令:
运行该命令通过输入MATLAB命令窗口。Web浏览器不支持MATLAB命令。万博1manbetx
你也可以从下面的列表中选择一个网站:
表现最好的网站怎么走吗
选择中国网站(中文或英文)最佳站点的性能。其他MathWorks国家网站不优化的访问你的位置。