主要内容

掉期期权

掉期期权仪对象

描述

创建并定价掉期期权一个或多个Swaption工具的instrument对象,使用此工作流:

  1. 使用fininstrument要创建掉期期权一个或多个Swaption工具的instrument对象。

  2. 使用finmodel要指定HullWhiteBlackKarasinski黑色的正常的SABR,或LinearGaussian2F的模型掉期期权仪对象。

  3. 选择一种定价方法。

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

有关a的可用型号和定价方法的更多信息掉期期权仪器,看选择仪器,模型和价格

创建

描述

例子

SwaptionInstrument= fininstrument (InstrumentType,'罢工“strike_value,”ExerciseDate”,exercice_date)创建一个掉期期权对象用于一个或多个Swaption工具InstrumentType并设置属性用于所需的名-值对参数罢工而且ExerciseDate.有关a的更多信息掉期期权仪器,看更多关于

例子

SwaptionInstrument= fininstrument (___名称,值设置可选属性在前面的语法中,除了必需的参数之外,还使用其他的名称-值对。例如,SwaptionInstrument = fininstrument("Swaption",'Strike',0.67,'ExerciseDate',datetime(2019,1,30),'Swap',Swap_obj,'OptionType',"put",' exercisstyle ',"European",'Name',"swaption_instrument")创建一个掉期期权看跌工具为0.67,欧洲演练。可以指定多个名称-值对参数。

输入参数

全部展开

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

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

名称-值参数

指定必需的和可选的参数对为Name1 = Value1,…,以=家,在那里的名字参数名称和价值对应的值。名称-值参数必须出现在其他参数之后,但对的顺序无关紧要。

在R2021a之前,使用逗号分隔每个名称和值,并将其括起来的名字在报价。

例子:SwaptionInstrument = fininstrument("Swaption",'Strike',.67,'ExerciseDate',datetime(2019,1,30),'Swap',Swap_obj,'OptionType',"put",' exercisstyle ',"European",'Name',"swaption_instrument")

要求掉期期权名称-值对实参

全部展开

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

数据类型:

期权行权日期,由逗号分隔的对组成“ExerciseDate”和标量日期时间,串行日期编号,日期字符向量,日期字符串或NINST——- - - - - -1日期时间向量、序列号、日期字符向量的单元格数组或日期字符串数组。

请注意

至于欧洲选项,只有一个ExerciseDate在期权到期日。

如果使用日期字符向量或日期字符串,格式必须由datetime因为ExerciseDate属性存储为日期时间。

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

潜在的交换对象,指定为逗号分隔的对,由“交换”一个标量交换对象或NINST——- - - - - -1向量的交换对象。

数据类型:对象

可选掉期期权名称-值对实参

全部展开

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

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

选项练习样式,指定为由逗号分隔的对组成“ExerciseStyle”标量字符串或字符向量或NINST——- - - - - -1字符向量或字符串数组的单元格数组。

请注意

当您指定交换作为标的资产的工具掉期期权仪器和使用正常的SABR黑色的,或HullWhite定价的人,交换仪器LegType必须(“固定”、“浮动”)(“浮动”,“固定”)掉期期权仪器ExerciseStyle必须“欧洲”

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

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

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

属性

全部展开

选项执行值,作为非负小数或标量返回NINST——- - - - - -1非负小数向量。

数据类型:

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

数据类型:datetime

交换对象,作为标量返回交换对象或NINST——- - - - - -1向量的交换对象。

数据类型:对象

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

数据类型:字符串

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

数据类型:字符串

用户定义的仪器名称,以字符串或NINST——- - - - - -1字符串数组。

数据类型:字符串

例子

全部折叠

这个例子展示了为一个对象定价的工作流掉期期权仪器当你使用SABR模型和SABR定价方法。

创建ratecurve对象

创建一个ratecurve对象使用ratecurve

Settle = datetime(2018,9,15);类型=“零”;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]';ZeroDates = Settle + ZeroTimes;比率曲线(“零”、结算、ZeroDates ZeroRates)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:0日期:[10x1 datetime]利率:[10x1 double]结算:15-Sep-2018 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建交换仪对象

使用fininstrument创建底层交换仪对象。

互换= fininstrument(“交换”“成熟”datetime (2027 3 15),“LegRate”[0 0],“LegType”...“浮动”“固定”),“名义上”, 100,StartDate可以的datetime (2022 3 15),“名字”“swap_instrument”
Swap = Swap with properties: leggrate: [0 0] LegType: ["float" "fixed"] Reset: [2 2] Basis: [0 0] Notional: 100 LatestFloatingRate: [NaN NaN] ResetOffset: [0 0] DaycountAdjustedCashFlow: [0 0] ProjectionCurve: [0x0 ratecurve] BusinessDayConvention: ["actual" "actual"] Holidays: NaT EndMonthRule: [1 1] StartDate: 15- mar2022成熟度:15- mar2027 Name: "swap_instrument"

创建掉期期权仪对象

使用fininstrument要创建掉期期权仪对象。

互换=仪器(“掉期期权”“罢工”, 0.02,“ExerciseDate”datetime (2022 3 15),“交换”交换,“名字”“swaption_option”
Swaption = Swaption与属性:OptionType: "call" exercisstyle: "european" ExerciseDate: 15 mar -2022 Strike: 0.0200 Swap: [1x1 fininstrument.]交换]名称:"swaption_option"

创建SABR模型对象

使用finmodel要创建SABR模型对象。

SabrModel = finmodel(“SABR”“α”, 0.032,“β”, 0.04,的ρ、。08“怒”, 0.49,“转变”, 0.002)
SabrModel = SABR与属性:Alpha: 0.0320 Beta: 0.0400 Rho: 0.0800 Nu: 0.4900 Shift: 0.0020挥发性类型:“黑色”

创建SABR定价的人对象

使用finpricer要创建SABRprice对象和使用ratecurve对象的“DiscountCurve”名称-值对参数。

outPricer = finpricer(“分析”“模型”SabrModel,“DiscountCurve”myRC)
outPricer = SABR with properties: DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.]SABR]

价格掉期期权仪器

使用价格来计算的价格掉期期权乐器。

价格=价格(outPricer,Swaption)
价格= 10.8558

这个例子展示了多重定价的工作流掉期期权仪器当你使用SABR模型和SABR定价方法。

创建ratecurve对象

创建一个ratecurve对象使用ratecurve

Settle = datetime(2018,9,15);类型=“零”;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]';ZeroDates = Settle + ZeroTimes;比率曲线(“零”、结算、ZeroDates ZeroRates)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:0日期:[10x1 datetime]利率:[10x1 double]结算:15-Sep-2018 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建交换仪对象

使用fininstrument创建底层交换仪对象。

互换= fininstrument(“交换”“成熟”datetime (2027 3 15),“LegRate”[0 0],“LegType”...“浮动”“固定”),“名义上”, 100,StartDate可以的datetime (2022 3 15),“名字”“swap_instrument”
Swap = Swap with properties: leggrate: [0 0] LegType: ["float" "fixed"] Reset: [2 2] Basis: [0 0] Notional: 100 LatestFloatingRate: [NaN NaN] ResetOffset: [0 0] DaycountAdjustedCashFlow: [0 0] ProjectionCurve: [0x0 ratecurve] BusinessDayConvention: ["actual" "actual"] Holidays: NaT EndMonthRule: [1 1] StartDate: 15- mar2022成熟度:15- mar2027 Name: "swap_instrument"

创建掉期期权仪对象

使用fininstrument要创建掉期期权三个Swaption仪器的仪器对象。

互换=仪器(“掉期期权”“罢工”, (0.02;0.03;0.04),“ExerciseDate”datetime([2022年,3,15;2022年,4,15;2022、5、15]),“交换”交换,“名字”“swaption_option”
掉期期权=3×1对象3x1交换数组,属性:OptionType ExerciseStyle ExerciseDate罢工交换名称

创建SABR模型对象

使用finmodel要创建SABR模型对象。

SabrModel = finmodel(“SABR”“α”, 0.032,“β”, 0.04,的ρ、。08“怒”, 0.49,“转变”, 0.002)
SabrModel = SABR与属性:Alpha: 0.0320 Beta: 0.0400 Rho: 0.0800 Nu: 0.4900 Shift: 0.0020挥发性类型:“黑色”

创建SABR定价的人对象

使用finpricer要创建SABRprice对象和使用ratecurve对象的“DiscountCurve”名称-值对参数。

outPricer = finpricer(“分析”“模型”SabrModel,“DiscountCurve”myRC)
outPricer = SABR with properties: DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.]SABR]

价格掉期期权仪器

使用价格来计算的价格掉期期权仪器。

价格=价格(outPricer,Swaption)
价格=3×110.8558 9.0442 7.4883

这个例子展示了为一个对象定价的工作流掉期期权仪器当你使用黑色的模型和黑色的定价方法。

创建ratecurve对象

创建一个ratecurve对象使用ratecurve

Settle = datetime(2018,9,15);类型=“零”;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]';ZeroDates = Settle + ZeroTimes;比率曲线(“零”、结算、ZeroDates ZeroRates)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:0日期:[10x1 datetime]利率:[10x1 double]结算:15-Sep-2018 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建交换仪对象

使用fininstrument创建底层交换仪对象。

互换= fininstrument(“交换”“成熟”datetime (2027 3 15),“LegRate”[0 0],“LegType”...“浮动”“固定”),“名义上”, 100,StartDate可以的datetime (2022 3 15),“名字”“swap_instrument”
Swap = Swap with properties: leggrate: [0 0] LegType: ["float" "fixed"] Reset: [2 2] Basis: [0 0] Notional: 100 LatestFloatingRate: [NaN NaN] ResetOffset: [0 0] DaycountAdjustedCashFlow: [0 0] ProjectionCurve: [0x0 ratecurve] BusinessDayConvention: ["actual" "actual"] Holidays: NaT EndMonthRule: [1 1] StartDate: 15- mar2022成熟度:15- mar2027 Name: "swap_instrument"

创建掉期期权仪对象

使用fininstrument要创建掉期期权仪对象。

互换=仪器(“掉期期权”“罢工”, 0.02,“ExerciseDate”datetime (2022 3 15),“交换”交换,“名字”“swaption_option”
Swaption = Swaption与属性:OptionType: "call" exercisstyle: "european" ExerciseDate: 15 mar -2022 Strike: 0.0200 Swap: [1x1 fininstrument.]交换]名称:"swaption_option"

创建黑色的模型对象

使用finmodel要创建黑色的模型对象。

BlackModel = finmodel(“黑色”“波动”, 0.032,“转变”, 0.002)
BlackModel =黑色属性:波动性:0.0320 Shift: 0.0020

创建黑色的定价的人对象

使用finpricer要创建黑色的price对象和使用ratecurve对象的“DiscountCurve”名称-值对参数。

outPricer = finpricer(“分析”“模型”BlackModel,“DiscountCurve”myRC)
outprice =黑色属性:模型:[1x1 finmodel。黑色]折现曲线:[1x1率曲线]

价格掉期期权仪器

使用价格来计算的价格掉期期权乐器。

价格=价格(outPricer,Swaption)
价格= 3.3116

这个例子展示了为一个对象定价的工作流掉期期权仪器当你使用HullWhite模型和IRTree定价方法。

创建ratecurve对象

创建一个ratecurve对象使用ratecurve

Settle = datetime(2018,9,15);类型=“零”;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]';ZeroDates = Settle + ZeroTimes;比率曲线(“零”、结算、ZeroDates ZeroRates)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:0日期:[10x1 datetime]利率:[10x1 double]结算:15-Sep-2018 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建交换仪对象

使用fininstrument创建底层交换仪对象。

互换= fininstrument(“交换”“成熟”datetime (2027 3 15),“LegRate”[0 0],“LegType”...“浮动”“固定”),“名义上”, 100,StartDate可以的datetime (2022 3 15),“名字”“swap_instrument”
Swap = Swap with properties: leggrate: [0 0] LegType: ["float" "fixed"] Reset: [2 2] Basis: [0 0] Notional: 100 LatestFloatingRate: [NaN NaN] ResetOffset: [0 0] DaycountAdjustedCashFlow: [0 0] ProjectionCurve: [0x0 ratecurve] BusinessDayConvention: ["actual" "actual"] Holidays: NaT EndMonthRule: [1 1] StartDate: 15- mar2022成熟度:15- mar2027 Name: "swap_instrument"

创建掉期期权仪对象

使用fininstrument要创建掉期期权仪对象。

互换=仪器(“掉期期权”“罢工”, 0.02,“ExerciseDate”datetime (2022 3 15),“交换”交换,“名字”“swaption_option”
Swaption = Swaption与属性:OptionType: "call" exercisstyle: "european" ExerciseDate: 15 mar -2022 Strike: 0.0200 Swap: [1x1 fininstrument.]交换]名称:"swaption_option"

创建HullWhite模型对象

使用finmodel要创建HullWhite模型对象。

HullWhiteModel = finmodel(“HullWhite”“α”, 0.032,“σ”, 0.04)
HullWhiteModel = HullWhite属性:阿尔法:0.0320西格玛:0.0400

创建IRTree定价的人对象

使用finpricer要创建IRTreeprice对象和使用ratecurve对象的“DiscountCurve”名称-值对参数。

outPricer = finpricer(“IRTree”“模型”HullWhiteModel,“DiscountCurve”myRC,“TreeDates”ZeroDates)
outPricer = HWBKTree with properties: Tree: [1x1 struct] TreeDates: [10x1 datetime] Model: [1x1 finmodel。折扣曲线:[1x1率曲线]

价格掉期期权仪器

使用价格来计算的价格和敏感性掉期期权乐器。

[Price, outPR] = Price (outprice,Swaption,[“所有”])
价格= 14.6581
outPR = priceresult with properties:结果:[1x4表]PricerData: [1x1 struct]
outPR。结果
ans =1×4表价格织女星γδ  ______ ______ _______ _____ 14.658 321.44 -2261.6 142.2

这个例子展示了为一个对象定价的工作流掉期期权仪器在使用LinearGaussian2F模型和IRMonteCarlo定价方法。

创建ratecurve对象

创建一个ratecurve对象使用ratecurve

Settle = 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]';ZeroDates = Settle + ZeroTimes;比率曲线(“零”、结算、ZeroDates ZeroRates)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:0日期:[10x1 datetime]利率:[10x1 double]结算:01- 01- 2019 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“上一个”

创建交换仪对象

使用fininstrument创建底层交换仪对象。

互换= fininstrument(“交换”“成熟”datetime (2022, 1, 1),“LegRate”[0.05, 0.04],“名字”“swap_instrument”
Swap = Swap with properties: leggrate: [0.0500 0.0400] LegType: ["fixed" "float"] Reset: [2 2] Basis: [0 0] Notional: 100 LatestFloatingRate: [NaN NaN] ResetOffset: [0 0] DaycountAdjustedCashFlow: [0 0] ProjectionCurve: [0x0 ratecurve] BusinessDayConvention: ["actual" "actual"] Holidays: NaT EndMonthRule: [1 1] StartDate: NaT Maturity: 01-Jan-2022 Name: "swap_instrument"

创建掉期期权仪对象

使用fininstrument要创建掉期期权仪对象。

互换=仪器(“掉期期权”“罢工”, 0.02,“ExerciseDate”datetime (2021 7 1),“交换”交换,“名字”“swaption_option”
交换=交换属性:OptionType: "call" exercisstyle: "european" ExerciseDate: 01- july -2021 Strike: 0.0200 Swap: [1x1 fininstrument.]交换]名称:"swaption_option"

创建LinearGaussian2F模型对象

使用finmodel要创建LinearGaussian2F模型对象。

线性高斯2fmodel = finmodel(“LinearGaussian2F”“α”, 0.07,“Sigma1”, 0.01,“Alpha2”, 0.5,“Sigma2”, 0.006,“相关”, -0.7)
线性高斯2fmodel =线性高斯2f与属性:Alpha1: 0.0700 Sigma1: 0.0100 Alpha2: 0.5000 Sigma2: 0.0060相关性:-0.7000

创建IRMonteCarlo定价的人对象

使用finpricer要创建IRMonteCarloprice对象和使用ratecurve对象的“DiscountCurve”名称-值对参数。

simDates = datetime(2019,7,1)+calmonths(0:6:30);outPricer = finpricer(“IRMonteCarlo”“模型”LinearGaussian2FModel,“DiscountCurve”myRC,“SimulationDates”simDates)
outPricer = G2PPMonteCarlo with properties: NumTrials: 1000 RandomNumbers: [] DiscountCurve: [1x1 ratecurve] SimulationDates: [01- july -2019 01-Jan-2020 01- july -2020…型号:[1x1 finmodel。]LinearGaussian2F]

价格掉期期权仪器

使用价格来计算的价格和敏感性掉期期权乐器。

[Price,outPR] = Price (outprice,Swaption,[“所有”])
价格= 1.5065
outPR = priceresult with properties:结果:[1x4表]PricerData: [1x1 struct]
outPR。结果
ans =1×4表价格三角洲伽马织女星  ______ ______ ______ _________________ 1.5065 44.746 -257.2 1.6729 -2.0015

这个例子展示了如何校准移位SABR的模型参数掉期期权仪器当你使用SABR定价方法。

负荷市场数据

%零曲线ValuationDate =日期时间(“5 - 3月- 2016“场所”“en_US”);ZeroDates = datemnth(ValuationDate,[1 2 3 6 9 12*[1 2 3 4 5 6 7 8 9 10 12]])';ZeroRates = [-0.33 -0.28 -0.24 -0.12 -0.08 -0.03 0.015 0.028...0.033 0.042 0.056 0.095 0.194 0.299 0.415 0.525]'/100;复利= 1;零曲线=利率曲线(“零”, ZeroDates ValuationDate ZeroRates,“复合”复合)
ZeroCurve =带有属性的利率曲线:类型:“零”复合:1基础:0日期:[16x1 datetime]利率:[16x1 double]结算:05- mar6-2016 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”
定义交换SwaptionSettle = datetime(“5 - 3月- 2016“场所”“en_US”);SwaptionExerciseDate =日期时间(“5 - 3月- 2017“场所”“en_US”);SwaptionStrikes = (-0.6:0.01:1.6)'/100;%包括负面打击SwapMaturity = datetime(“5 - 3月- 2022“场所”“en_US”);标的掉期期限%OptSpec =“电话”

通过创建计算正向交换速率交换仪器

使用fininstrument要创建交换仪对象。

LegRate = [0 0];互换= fininstrument(“交换”“成熟”SwapMaturity,“LegRate”LegRate,“LegType”,[“固定”“浮动”),...“ProjectionCurve”ZeroCurve,“StartDate可以”SwaptionExerciseDate)
Swap = Swap with properties: leggrate: [0 0] LegType: ["fixed" "float"] Reset: [2 2] Basis: [0 0] Notional: 100 LatestFloatingRate: [NaN NaN] ResetOffset: [0 0] DaycountAdjustedCashFlow: [0 0] ProjectionCurve: [1x2 ratecurve] BusinessDayConvention: ["actual" "actual"] Holidays: NaT EndMonthRule: [1 1] StartDate: 05-Mar-2017 Maturity: 05-Mar-2022 Name: ""
ForwardValue = parswaprate(交换,零曲线)
ForwardValue = 7.3271e-04

加载市场隐含波动率数据

市场掉期波动率以移位的黑色波动率表示0.8百分比变化。

StrikeGrid = [-0.5;-0.25;-0.125;0;0.125;0.25;0.5;1.0;1.5) / 100;MarketStrikes =远期价值+ StrikeGrid; Shift = 0.008;0.8%的变化marketshiftedblackvolatility = [21.1;15.3;14.0;14.6;16.0;17.7;19.8;23.9;26.2) / 100;ATMShiftedBlackVolatility = marketshiftedblackvolatility (StrikeGrid==0);

调整了SABR模型参数

β参数在0.5.使用波动计算隐含波动率。

Beta = 0.5;校准Alpha, Rho和NuobjFun = @(X) marketshiftedblackvolatility -波动性(finpricer(“分析”“模型”...finmodel (“SABR”“α”X (1),“β”,β,的ρ, X (2),“怒”, X (3),“转变”转变)...“DiscountCurve”,零曲线),SwaptionExerciseDate,远期价值,市场罢工);X = lsqnonlin(objFun, [0.5 0 0.5], [0 -1 0], [Inf 1 Inf]);
局部最小值。Lsqnonlin停止了,因为最终平方和相对于其初始值的变化小于函数公差的值。
Alpha = X(1);罗= X(2);Nu = X(3);

创建SABR使用校准参数建模

使用finmodel要创建SABR模型对象。

SABRModel = finmodel(“SABR”“α”α,“β”,β,的ρρ,“怒”ν,“转变”转变)
SABRModel = SABR属性:Alpha: 0.0135 Beta: 0.5000 Rho: 0.4654 Nu: 0.4957 Shift: 0.0080挥发性类型:“黑色”

创建SABR使用校准的价格SABR建模和计算挥发性

使用finpricer要创建SABRprice对象和使用ratecurve对象的“DiscountCurve”名称-值对参数。

sabrprice = finpricer(“分析”“模型”SABRModel,“DiscountCurve”ZeroCurve)
SABRPricer = SABR与属性:折扣曲线:[1x1率曲线]模型:[1x1 finmodel。SABR]
sabrshiftedblackvolatility =波动性(SABRPricer, SwaptionExerciseDate, ForwardValue, SwaptionStrikes)
SABRShiftedBlackVolatilities =221×10.2978 0.2911 0.2848 0.2787 0.2729 0.2673 0.2620 0.2568 0.2518 0.2470对应
图;情节(MarketStrikes MarketShiftedBlackVolatilities,“o”...SwaptionStrikes SABRShiftedBlackVolatilities);H = gca;线([0],[min (h.YLim), max (h.YLim)],“线型”“——”);Ylim ([0.13 0.31]) xlabel(“罢工”);传奇(“市场报价”“转移SABR”“位置”“东南”);标题([“平移黑色波动率(”num2str(* 100)转变,百分比变化)]);

图中包含一个轴对象。标题为Black Volatility (0.8% shift)的axes对象包含3个类型为line的对象。这些对象表示市场报价,移位的SABR。

价格掉期期权使用校准仪器SABR模型和SABR定价的人

创建交换工具NumInst =长度(SwaptionStrikes);Swaptions(NumInst, 1) = fininstrument(“掉期期权”...“罢工”SwaptionStrikes (1)“ExerciseDate”SwaptionExerciseDate (1)“交换”、交换);k = 1:NumInst Swaptions(k) = fininstrument(“掉期期权”“罢工”SwaptionStrikes (k),...“ExerciseDate”SwaptionExerciseDate,“交换”交换,“OptionType”, OptSpec);结束掉期期权
掉期期权=221×1对象16x1交换数组,属性:OptionType ExerciseStyle ExerciseDate Strike Swap Name `
%使用SABR定价器进行价格交换SwaptionPrices = price(sabrprice,Swaptions);图;情节(SwaptionStrikes SwaptionPrices,“r”);H = gca;线([0],[min (h.YLim), max (h.YLim)],“线型”“——”);包含(“罢工”);标题(“掉期期权价格”);

图中包含一个轴对象。标题为Swaption Price的axes对象包含2个类型为line的对象。

更多关于

全部展开

版本历史

R2020a中引入