主要内容

FixedBondOption

FixedBondOption仪对象

描述

创建和定价FixedBondOption一个或多个固定债券期权工具的工具对象,使用以下工作流:

  1. 使用fininstrument创建一个FixedBondOption一个或多个固定债券期权工具的工具对象。

  2. 使用finmodel指定一个HullWhiteBlackKarasinskiBraceGatarekMusielaSABRBraceGatarekMusiela,或LinearGaussian2F模型FixedBondOption仪对象。

  3. 选择一种定价方法。

    • 当使用一个HullWhiteBlackKarasinski模型,使用finpricer指定一个IRTree一个或多个的定价方法FixedBondOption仪器。

    • 当使用一个HullWhiteBraceGatarekMusielaSABRBraceGatarekMusiela,或LinearGaussian2F模型,使用finpricer指定一个IRMonteCarlo一个或多个的定价方法FixedBondOption仪器。

有关此工作流的更多信息,请参见开始使用基于对象的框架为金融工具定价的工作流

欲了解更多关于a的可用模型和定价方法的信息FixedBondOption仪器,看选择仪器、型号和定价

创建

描述

例子

FixedBondOptionObj= fininstrument (InstrumentType”,罢工“strike_value,”ExerciseDate“exercise_date,”债券”,bond_obj)创建一个FixedBondOption为一个或多个固定债券期权工具指定InstrumentType并设置属性用于指定的名称-值对参数罢工ExerciseDate,债券

FixedBondOption工具支持欧洲或美国期权金宝app。有关更多信息,请参见更多关于

例子

FixedBondOptionObj= fininstrument (___名称,值设置可选属性除了前面语法中要求的参数外,还使用了其他的名称-值对。例如,FixedBondOptionObj = fininstrument(“FixedBondOption”、“罢工”,100年,“ExerciseDate”,datetime(2019, 30),“债券”,bond_obj,‘OptionType’,‘把’,‘ExerciseStyle’,“美国”、“名称”、“fixed_bond_option”)创建一个FixedBondOption一种打击为100的仪器和一种美国演习。可以指定多个名称-值对参数。

输入参数

全部展开

仪器类型,指定为值为的字符串“FixedBondOption”的字符向量“FixedBondOption”,一个NINST——- - - - - -1值为的字符串数组“FixedBondOption”,或者一个NINST——- - - - - -1值为的字符向量单元格数组“FixedBondOption”

数据类型:字符|细胞|字符串

FixedBondOption名称-值对的观点

指定必需的和可选的逗号分隔的对名称,值参数。的名字参数名和价值为对应值。的名字必须出现在引号内。可以以任意顺序指定多个名称和值对参数Name1, Value1,…,的家

例子:FixedBondOptionObj = fininstrument(“FixedBondOption”、“罢工”,100年,“ExerciseDate”,datetime(2019, 30),“债券”,bond_obj,‘OptionType’,‘把’,‘ExerciseStyle’,“美国”、“名称”、“fixed_bond_option”)
要求FixedBondOption名称-值对的观点

全部展开

选项的strike值,指定为逗号分隔的对,由“罢工”和一个标量非负的数字或NINST——- - - - - -1非负数字向量。

数据类型:

选项执行日期,指定为逗号分隔对,由“ExerciseDate”和标量日期时间、串行日期号、日期字符向量、日期字符串或NINST——- - - - - -1日期时间向量、连续日期号、日期字符向量的单元格数组或日期字符串数组。

  • 对于欧洲来说,只有一个选择ExerciseDate在期权到期日。

  • 对于百慕大的选择,有一个1——- - - - - -NSTRIKES运动日期向量。

  • 对于美式期权,期权可以在两者之间行使解决ratecurve单列的ExerciseDate

如果使用日期字符向量或日期字符串,则格式必须是可识别的datetime因为ExerciseDate属性存储为datetime

数据类型:|字符|细胞|字符串|datetime

潜在的FixedBond指定为逗号分隔对的仪器,由“债券”和一个标量FixedBond对象或一个NINST——- - - - - -1向量的FixedBond对象。

数据类型:对象

可选FixedBondOption名称-值对的观点

全部展开

选项类型,指定为逗号分隔的对,由“OptionType”标量字符串或字符向量或NINST——- - - - - -1字符向量或字符串数组的单元格数组。

数据类型:字符|细胞|字符串

选项练习样式,指定为逗号分隔对组成“ExerciseStyle”标量字符串或字符向量或NINST——- - - - - -1字符向量的单元格数组或值为的字符串数组“欧洲”“美国”,或“百慕大”

数据类型:字符串|细胞|字符

多个仪器中的一个用户定义的名称,指定为逗号分隔对,由“名字”标量字符串或字符向量或NINST——- - - - - -1字符向量或字符串数组的单元格数组。

数据类型:字符|细胞|字符串

属性

全部展开

选项的strike值,返回为标量非负数值或NINST——- - - - - -1非负值的数值向量。

数据类型:

选项执行日期,返回标量日期时间或NINST——- - - - - -1向量的日期时间。

数据类型:datetime

选项类型,作为标量字符串或NINST——- - - - - -1值为的字符串数组“电话”“把”

数据类型:字符串

选项练习样式,返回为标量字符串或NINST——- - - - - -1值为的字符串数组“欧洲”“美国”

数据类型:字符串

潜在的FixedBond仪器,作为标量返回FixedBond对象或一个NINST——- - - - - -1向量的FixedBond对象。

数据类型:对象

仪器的用户定义名称,返回为标量字符串或NINST——- - - - - -1字符串数组。

数据类型:字符串

对象的功能

setExercisePolicy 为…制定运动政策FixedBondOptionFloatBondOption,或香草仪器

例子

全部折叠

这个例子展示了定价a的工作流程FixedBondOption当你使用HullWhite模型和一个IRTree定价方法。

创建FixedBond仪对象

使用fininstrument创建一个FixedBond作为基础债券的工具对象。

BondInst = fininstrument (“FixedBond”“成熟”datetime(2029、9、15),“CouponRate”.021,“时间”,1,“名字”“bond_instrument”
BondInst = FixedBond with properties: CouponRate: 0.0210 Period: 1 Basis: 0 EndMonthRule: 1 Principal: 100 DaycountAdjustedCashFlow: 0 BusinessDayConvention:“实际”假期:NaT issueddate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate: NaT Maturity: 15- september 2029名称:“bond_instrument”

创建FixedBondOption仪的对象

使用fininstrument创建三个可调用对象FixedBondOption与欧洲、美国和百慕大人的运动相抵触。

FixedBOptionEuro = fininstrument (“FixedBondOption”“ExerciseDate”datetime(2025、9、15),“罢工”, 98,“债券”BondInst,“OptionType”“电话”“ExerciseStyle”“欧洲”“名字”“fixed_bond_option_european”
FixedBOptionEuro = FixedBondOption with properties: OptionType: "call" exercisstyle: "european" exercisdate: 15- september -2025 Strike: 98FixedBond)名称:“fixed_bond_option_european”
FixedBOptionAmerican = fininstrument (“FixedBondOption”“ExerciseDate”datetime(2025、9、15),“罢工”, 98,“债券”BondInst,“OptionType”“电话”“ExerciseStyle”“美国”“名字”“fixed_bond_option_american”
FixedBOptionAmerican = FixedBondOption with properties: OptionType: "call" exercisstyle: "american" exercisdate: 15-Sep-2025 Strike: 98 Bond: [1x1 fininstrument。FixedBond)名称:“fixed_bond_option_american”
FixedBOptionBermudan = fininstrument (“FixedBondOption”“ExerciseDate”[datetime(2025、9、15),datetime(2025、11、15)),“罢工”(98、1000),“债券”BondInst,“OptionType”“电话”“ExerciseStyle”“百慕大”“名字”“fixed_bond_option_bermudan”
fixedboptionbermuda = FixedBondOption with properties: OptionType: "call" exercisstyle: "bermuda " exercisdate: [98 1000] Strike: [98 1000] Bond: [1x1 fininstrument.]FixedBond)名称:“fixed_bond_option_bermudan”

创建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]';zeroates = Settle + ZeroTimes;myRC = ratecurve (“零”、结算、ZeroDates ZeroRates)
myRC = ratecurve with properties: Type: "zero" compound: -1 Basis: 0 date: [10x1 datetime] Rates: [10x1 double] Settle: 15-Sep-2019 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"

创建一个HullWhite模型对象

使用finmodel创建一个HullWhite模型对象。

HullWhiteModel = finmodel (“HullWhite”“α”, 0.01,“σ”, 0.05)
HullWhiteModel = HullWhite属性:Alpha: 0.0100 Sigma: 0.0500

创建IRTree定价的人对象

使用finpricer创建一个IRTree对象,并使用ratecurve对象的“DiscountCurve”名称-值对的论点。

HWTreePricer = finpricer (“IRTree”“模型”HullWhiteModel,“DiscountCurve”myRC,“TreeDates”ZeroDates)
HWTreePricer = HWBKTree with properties: Tree: [1x1 struct] TreeDates: [10x1 datetime] Model: [1x1 finmodel. HWTreePricer = HWBKTree折现曲线:[1x1率曲线]
HWTreePricer。树
ans =结构体字段:dObs: [0 1 1.9973 2.9945 3.9918 4.9918 5.9891 6.9863 7.9836 8.9836]CFlowT: {1x10 cell} Probs: {1x9 cell} Connect: {1x9 cell} FwdTree: {1x10 cell} rattree: {1x10 cell}

价格FixedBondOption仪器

使用价格来计算两者的价格和敏感性FixedBondOption仪器。

[Price, outPR] = Price (HWTreePricer,FixedBOptionEuro,[“所有”])
价格= 10.7571
outPR = pricerresult with properties: Results: [1x4 table]
outPR。结果
ans =1×4表价格织女星γδ  ______ ______ ______ _______ 10.757 308.87 2207.3 -178.78
[Price, outPR] = Price (HWTreePricer,FixedBOptionAmerican,[“所有”])
价格= 19.2984
outPR = pricerresult with properties: Results: [1x4 table]
outPR。结果
ans =1×4表价格织女星γδ  ______ ______ ______ _______ 19.298 437.32 4977.1 -459.06
[Price, outPR] = Price (HWTreePricer, fixedboption百慕大,[“所有”])
价格= 11.1241
outPR = pricerresult with properties: Results: [1x4 table]
outPR。结果
ans =1×4表价格织女星γδ  ______ ______ ______ _______ 11.124 322.94 2243.7 -182.44

这个例子展示了定价倍数的工作流程FixedBondOption当你使用HullWhite模型和一个IRTree定价方法。

创建FixedBond仪对象

使用fininstrument创建一个FixedBond作为基础债券的工具对象。

BondInst = fininstrument (“FixedBond”“成熟”datetime(2029、9、15),“CouponRate”.021,“时间”,1,“名字”“bond_instrument”
BondInst = FixedBond with properties: CouponRate: 0.0210 Period: 1 Basis: 0 EndMonthRule: 1 Principal: 100 DaycountAdjustedCashFlow: 0 BusinessDayConvention:“实际”假期:NaT issueddate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate: NaT Maturity: 15- september 2029名称:“bond_instrument”

创建FixedBondOption仪的对象

使用fininstrument创建一个FixedBondOption欧洲行使三种固定债券期权工具的工具对象。

FixedBOptionEuro = fininstrument (“FixedBondOption”“ExerciseDate”datetime([2025、9、15;2025、10、15;2025、11、15]),“罢工”, 98;100;102年),“债券”BondInst,“OptionType”“电话”“ExerciseStyle”“欧洲”“名字”“fixed_bond_option_european”
FixedBOptionEuro =3×1对象3x1 FixedBondOption数组带有属性:OptionType exercisstyle exercisdate Strike Bond名称

创建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]';zeroates = Settle + ZeroTimes;myRC = ratecurve (“零”、结算、ZeroDates ZeroRates)
myRC = ratecurve with properties: Type: "zero" compound: -1 Basis: 0 date: [10x1 datetime] Rates: [10x1 double] Settle: 15-Sep-2019 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"

创建一个HullWhite模型对象

使用finmodel创建一个HullWhite模型对象。

HullWhiteModel = finmodel (“HullWhite”“α”, 0.01,“σ”, 0.05)
HullWhiteModel = HullWhite属性:Alpha: 0.0100 Sigma: 0.0500

创建IRTree定价的人对象

使用finpricer创建一个IRTree对象,并使用ratecurve对象的“DiscountCurve”名称-值对的论点。

HWTreePricer = finpricer (“IRTree”“模型”HullWhiteModel,“DiscountCurve”myRC,“TreeDates”ZeroDates)
HWTreePricer = HWBKTree with properties: Tree: [1x1 struct] TreeDates: [10x1 datetime] Model: [1x1 finmodel. HWTreePricer = HWBKTree折现曲线:[1x1率曲线]
HWTreePricer。树
ans =结构体字段:dObs: [0 1 1.9973 2.9945 3.9918 4.9918 5.9891 6.9863 7.9836 8.9836]CFlowT: {1x10 cell} Probs: {1x9 cell} Connect: {1x9 cell} FwdTree: {1x10 cell} rattree: {1x10 cell}

价格FixedBondOption仪器

使用价格来计算价格和敏感度FixedBondOption仪器。

[Price, outPR] = Price (HWTreePricer,FixedBOptionEuro,[“所有”])
价格=3×110.7571 10.5781 10.0178
outPR =3×1对象3x1带有属性的pricerresult数组
outPR。结果
ans =1×4表价格织女星γδ  ______ ______ ______ _______ 10.757 308.87 2207.3 -178.78
ans =1×4表价格织女星γδ  ______ ______ ______ ______ 10.578 314.43 2205.2 -177.6
ans =1×4表价格织女星γδ  ______ ______ ______ _______ 10.018 305.41 2164.2 -172.53

这个例子展示了定价a的工作流程FixedBondOption阶梯式仪器FixedBond当你使用HullWhite模型和一个IRTree定价方法。

创建了FixedBond仪对象

使用fininstrument创建一个阶梯式FixedBond作为基础债券的工具对象。

成熟= datetime(2027、1、1);时间= 1;cdate = datetime([2022,1,1;2027年,1,1);箱= [.022;.027];CouponRate =时间表(CDates、箱);SBond = fininstrument (“FixedBond”“成熟”成熟,“CouponRate”CouponRate,“时间”期,“名字”“stepped_bond_instrument”
SBond = FixedBond with properties: CouponRate: [2x1时间表]Period: 1 Basis: 0 EndMonthRule: 1 Principal: 100 DaycountAdjustedCashFlow: 0 BusinessDayConvention: "实际"假期:NaT issueddate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate: NaT Maturity: 01-Jan-2027名称:"stepped_bond_instrument"

创建FixedBondOption仪对象

使用fininstrument创建一个FixedBondOption仪器对象与欧洲的运动。

FixedBOption = fininstrument (“FixedBondOption”“ExerciseDate”datetime (2026, 1, 1),“罢工”, 90,“债券”SBond,“OptionType”“电话”“ExerciseStyle”“欧洲”“名字”“fixed_bond_option_european”
FixedBOption = FixedBondOption with properties: OptionType: "call" exercisstyle: "european" exercisdate: 01-Jan-2026 Strike: 90 Bond: [1x1 fininstrument。FixedBond)名称:“fixed_bond_option_european”

创建ratecurve对象

创建一个ratecurve对象使用ratecurve

解决= datetime(2018、1、1);ZeroTimes = calyears(1:10)”;ZeroRates = [0.0055 0.0063 0.0071 0.0083 0.0099 0.0131 0.0178 0.0262 0.0343 0.0387]';zeroates = Settle + ZeroTimes;复合= 1;ZeroCurve = ratecurve (“零”、结算、ZeroDates ZeroRates,“复合”、复合);

创建HullWhite模型对象

使用finmodel创建一个HullWhite模型对象。

VolCurve = 0.15;AlphaCurve = 0.03;HWModel = finmodel (“HullWhite”“α”AlphaCurve,“σ”VolCurve)
HWModel = HullWhite属性:Alpha: 0.0300 Sigma: 0.1500

创建IRTree定价的人对象

使用finpricer创建一个IRTree对象,并使用ratecurve对象的“DiscountCurve”名称-值对的论点。

HWTreePricer = finpricer (“IRTree”“模型”HWModel,“DiscountCurve”ZeroCurve,“TreeDates”ZeroDates)
HWTreePricer = HWBKTree with properties: Tree: [1x1 struct] TreeDates: [10x1 datetime] Model: [1x1 finmodel. HWTreePricer = HWBKTree折现曲线:[1x1率曲线]
HWTreePricer。树
ans =结构体字段:[01 2 3.0027 4.0027 5.0027 6.0027 7.0055 8.0055 9.0055][01- 1- 2018 01- 1- 2019 01- 1- 2020…CFlowT: {1x10 cell} Probs: {1x9 cell} Connect: {1x9 cell} FwdTree: {1x10 cell} rattree: {1x10 cell}

价格FixedBondOption仪器

使用价格来计算价格和敏感度FixedBondOption乐器。

[Price, outPR] = Price (HWTreePricer,FixedBOption,“所有”
价格= 12.2717
outPR = pricerresult with properties: Results: [1x4 table]
outPR。结果
ans =1×4表价格织女星γδ  ______ ______ ______ ______ 12.272 100.91 1438.4 -130.1

这个例子展示了定价a的工作流程FixedBondOption仪器在使用时HullWhite模型和一个IRMonteCarlo定价方法。

创建FixedBond仪对象

使用fininstrument创建一个FixedBond作为基础债券的工具对象。

BondInst = fininstrument (“FixedBond”“成熟”datetime(2022、9、15),“CouponRate”.021,“时间”,1,“名字”“bond_instrument”
BondInst = FixedBond with properties: CouponRate: 0.0210 Period: 1 Basis: 0 EndMonthRule: 1 Principal: 100 DaycountAdjustedCashFlow: 0 BusinessDayConvention:“实际”假期:NaT issueddate: NaT FirstCouponDate: NaT LastCouponDate: NaT StartDate: NaT Maturity: 15- september 2022名称:“bond_instrument”

创建FixedBondOption仪对象

使用fininstrument创建一个FixedBondOption仪对象。

FixedBOptionEuro = fininstrument (“FixedBondOption”“ExerciseDate”datetime (2020 3 15),“罢工”, 98,“债券”BondInst,“OptionType”“电话”“ExerciseStyle”“欧洲”“名字”“fixed_bond_option_european”
FixedBOptionEuro = FixedBondOption with properties: OptionType: "call" exercisstyle: "european" exercisdate: 15- march -2020 Strike: 98FixedBond)名称:“fixed_bond_option_european”

创建HullWhite模型对象

使用finmodel创建一个HullWhite模型对象。

HullWhiteModel = finmodel (“HullWhite”“α”, 0.32,“σ”, 0.49)
HullWhiteModel = HullWhite与性质:阿尔法:0.3200西格玛:0.4900

创建ratecurve对象

创建一个ratecurve对象使用ratecurve

解决= datetime(2019、1、1);类型=“零”;ZeroTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])]';ZeroRates = [0.0052 0.0055 0.0061 0.0073 0.0094 0.0119 0.0168 0.0222 0.0293 0.0307]';zeroates = Settle + ZeroTimes;myRC = ratecurve (“零”、结算、ZeroDates ZeroRates)
myRC = ratecurve with properties: Type: "zero" compound: -1 Basis: 0 date: [10x1 datetime] Rates: [10x1 double] Settle: 01-Jan-2019 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"

创建IRMonteCarlo定价的人对象

使用finpricer创建一个IRMonteCarlo对象,并使用ratecurve对象的“DiscountCurve”名称-值对的论点。

outPricer = finpricer (“IRMonteCarlo”“模型”HullWhiteModel,“DiscountCurve”myRC,“SimulationDates”datetime (2019 3 15) + calmonths(0:6:48)”)
outPricer = HWMonteCarlo with properties: NumTrials: 1000 RandomNumbers: [] DiscountCurve: [1x1 ratecurve] SimulationDates: [15-Mar-2019 15- 9 -2019 15-Mar-2020…模型:[1x1 finmodel.]HullWhite]

价格FixedBondOption仪器

使用价格来计算价格和敏感度FixedBondOption乐器。

(价格、outPR) =价格(outPricer, FixedBOptionEuro“所有”])
价格= 24.0750
outPR = pricerresult with properties: Results: [1x4 table]
outPR。结果
ans =1×4表价格三角洲伽马织女星  ______ _______ ______ ______ 24.075 -166.42 1456.2 20.329

更多关于

全部展开

提示

在创建一个FixedBondOption仪器对象,可以使用setExercisePolicy更改选项的大小。例如,如果你有以下仪器:

FixedBOption = fininstrument(“FixedBondOption”、“ExerciseDate”,datetime(2022、9、15),“罢工”,98年,“债券”,BondInst,“OptionType”、“电话”,“ExerciseStyle”,“欧洲”)
修改FixedBondOption仪器的大小通过改变ExerciseStyle“欧洲”“美国”,使用setExercisePolicy
FixedBOption = setExercisePolicy(FixedBOption,[datetime(2021,1,1) datetime(2022,1,1)],100,'American')

介绍了R2020a