主要内容

DoubleBarrier

DoubleBarrier仪对象

描述

创建并定价DoubleBarrier使用此工作流的一个或多个Double Barrier仪器的仪器对象:

  1. 使用fininstrument要创建DoubleBarrier用于一个或多个双屏障仪器的仪器对象。

  2. 使用finmodel要指定BlackScholes,赫斯顿,贝茨,或默顿的模型DoubleBarrier仪对象。

  3. 选择一种定价方法。

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

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

创建

描述

例子

DoubleBarrierOpt= fininstrument (InstrumentType”,罢工“strike_value,”ExerciseDate“exercise_date,”BarrierValue”,barrier_value)创建一个DoubleBarrier为一个或多个双屏障仪器指定的仪器对象InstrumentType并设置属性使用所需的名称-值对参数罢工,ExerciseDate,BarrierValue

例子

DoubleBarrierOpt= fininstrument (___,名称,值设置可选属性在前面的语法中,除了必需的参数外,还使用其他的名-值对参数。例如,DoubleBarrierOpt = fininstrument("DoubleBarrier",'Strike',100,'ExerciseDate',datetime(2019,1,30),'BarrierValue',110,'OptionType',"put",' exercisstyle ',"European",'BarrierType',"DKI",'Name',"doublebarrier_option")创建一个DoubleBarrier欧洲行权的看跌期权。可以指定多个名称-值对参数。

输入参数

全部展开

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

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

名称-值参数

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

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

例子:DoubleBarrierOpt = fininstrument("DoubleBarrier",'Strike',100,'ExerciseDate',datetime(2019,1,30),'BarrierValue',110,'OptionType',"put",' exercisstyle ',"European",'BarrierType',"DKI",'Name',"doublebarrier_option")

要求DoubleBarrier名称-值对参数

全部展开

期权行权价格的价值,由逗号分隔的对组成“罢工”标量非负值或者NINST——- - - - - -1非负值的向量。

数据类型:

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

请注意

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

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

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

双屏障值,指定为逗号分隔对组成“BarrierValue”和一个NINST——- - - - - -1矩阵的数值,其中每个元素是a1——- - - - - -2其中第一列为Barrier(1)(UB),第二列为Barrier(2)(LB)。Barrier(1)必须大于Barrier(2)。

数据类型:

可选DoubleBarrier名称-值对参数

全部展开

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

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

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

请注意

对于一个DoubleBarrier选项时,IkedaKunitomo价格只支持一个金宝app“欧洲”运动和FiniteDifference价格支持金宝app“美国”“欧洲”锻炼。

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

双屏障类型,指定为逗号分隔对组成“BarrierType”标量字符向量或字符串或NINST——- - - - - -1字符向量的单元格数组或具有以下值之一的字符串数组:

  • “DKI”-两次打卡

    “DKI”当标的资产的价格达到其中一个障碍时,期权开始生效。它赋予期权持有人以执行价格买入或卖出标的证券的权利,但没有义务,如果标的资产在期权有效期内高于或低于障碍水平。

  • “DKO”-双淘汰

    “DKO”期权赋予期权持有人以执行价格买入或卖出标的证券的权利,但没有义务,只要标的资产在期权有效期内保持在障碍水平之间。当标的资产的价格超过其中一个障碍时,该期权终止。

选项 障碍类型 跨越任何障碍的收益 没有跨越障碍的回报
电话/把 双敲入 标准电话/把 一文不值
电话/把 双淘汰赛 一文不值 标准电话/把

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

屏障返利,指定为由逗号分隔的对组成“回扣”和一个数字矩阵。

  • 对于敲入选项,退税到期时支付。

  • 要获得最佳选择,请参阅退税如果击中上屏障(1)(UB),则支付第二个值,如果击中下屏障(2)(LB),则支付第二个值。

数据类型:

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

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

属性

全部展开

期权执行价格值,返回为标量非负值或NINST——- - - - - -1非负值的向量。

数据类型:

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

数据类型:datetime

双屏障值,作为数字矩阵返回。

数据类型:

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

数据类型:字符串

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

数据类型:字符串

双屏障类型,返回为标量字符串或NINST——- - - - - -1值为的字符串数组“DKI”“DKO”

数据类型:字符串

壁垒回扣,作为数字矩阵返回。

数据类型:

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

数据类型:字符串

例子

全部折叠

这个例子展示了为一个DoubleBarrier仪器当你使用BlackScholes模型和FiniteDifference定价方法。

创建DoubleBarrier仪对象

使用fininstrument要创建DoubleBarrier仪对象。

DoubleBarrierOpt = fininstrument(“DoubleBarrier”,“罢工”, 75,“ExerciseDate”datetime (2019, 1, 1),“OptionType”,“电话”,“ExerciseStyle”,“美国”,“BarrierType”,“DKO”,“BarrierValue”(110 80),“名字”,“doublebarrier_option”
DoubleBarrierOpt = DoubleBarrier with properties: OptionType: "call" Strike: 75 BarrierValue: [110 80] exercisstyle: "american" ExerciseDate: 01-Jan-2019 BarrierType: "dko" Rebate: [0 0] Name: "doublebarrier_option"

创建BlackScholes模型对象

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

BlackScholesModel = finmodel(“BlackScholes”,“波动”, 0.30)
BlackScholesModel = BlackScholes与属性:波动性:0.3000相关性:1

创建ratecurve对象

创建一个平面ratecurve对象使用ratecurve

Settle = datetime(2018,1,1);成熟度= datetime(2023,1,1);Rate = 0.035;比率曲线(“零”解决,成熟,速度,“基础”, 1)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:1日期:01-Jan-2023利率:0.0350结算:01-Jan-2018 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建FiniteDifference定价的人对象

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

outPricer = finpricer(“FiniteDifference”,“模型”BlackScholesModel,“DiscountCurve”myRC,“SpotPrice”, 100)
outPricer =带有属性的有限差异:DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.]BlackScholes] SpotPrice: 100 GridProperties: [1x1 struct] DividendType: "continuous" DividendValue: 0

价格DoubleBarrier仪器

使用价格来计算的价格和敏感性DoubleBarrier乐器。

[Price, outPR] = Price (outprice,DoubleBarrierOpt,[“所有”])
价格= 25
outPR = priceresult with properties:结果:[1x7表]PricerData: [1x1 struct]
outPR。结果
ans =表1×7价格γδλθρ织女星  _____ _____ _____ ______ __________ ___ ____ 25 1 0 4 2.2737 e-13 0 0

这个例子展示了多重定价的工作流DoubleBarrier仪器,当你使用BlackScholes模型和FiniteDifference定价方法。

创建DoubleBarrier仪对象

使用fininstrument要创建DoubleBarrier仪器对象为三个双屏障仪器。

DoubleBarrierOpt = fininstrument(“DoubleBarrier”,“罢工”, 75;85;95年),“ExerciseDate”datetime([2019年,1,1;2019年,1、2;2019年,1,3]),“OptionType”,“电话”,“ExerciseStyle”,“美国”,“BarrierType”,“DKO”,“BarrierValue”(110 80),“名字”,“doublebarrier_option”
DoubleBarrierOpt =3×1对象3x1带有属性的双屏障数组:OptionType Strike BarrierValue ExerciseStyle ExerciseDate BarrierType Rebate Name

创建BlackScholes模型对象

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

BlackScholesModel = finmodel(“BlackScholes”,“波动”, 0.30)
BlackScholesModel = BlackScholes与属性:波动性:0.3000相关性:1

创建ratecurve对象

创建一个平面ratecurve对象使用ratecurve

Settle = datetime(2018,1,1);成熟度= datetime(2023,1,1);Rate = 0.035;比率曲线(“零”解决,成熟,速度,“基础”, 1)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:1日期:01-Jan-2023利率:0.0350结算:01-Jan-2018 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建FiniteDifference定价的人对象

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

outPricer = finpricer(“FiniteDifference”,“模型”BlackScholesModel,“DiscountCurve”myRC,“SpotPrice”, 100)
outPricer =带有属性的有限差异:DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.]BlackScholes] SpotPrice: 100 GridProperties: [1x1 struct] DividendType: "continuous" DividendValue: 0

价格DoubleBarrier仪器

使用价格计算的价格和敏感性DoubleBarrier仪器。

[Price, outPR] = Price (outprice,DoubleBarrierOpt,[“所有”])
价格=3×125.0000 15.6821 7.8957
outPR =3×1对象带有属性的3x1 priceresult数组
outPR。结果
ans =表1×7价格γδλθρ织女星  _____ _____ _____ ______ __________ ___ ____ 25 1 0 4 2.2737 e-13 0 0
ans =表1×7价格γδλθρ织女星  ______ ______ _______ ______ _______ _____ _______ 15.682 0.7196 0.28626 4.5887 0.88484 6.467 -6.3778
ans =表1×7价格γδλθρ织女星  ______ _______ __________ ______ _________ ______ _______ 7.8957 0.36913 -0.0020435 4.675 -0.057311 4.3022 -6.9367

这个例子展示了为一个对象定价的工作流DoubleBarrier仪器当你使用赫斯顿模型和AssetMonteCarlo定价方法。

创建DoubleBarrier仪对象

使用fininstrument要创建DoubleBarrier仪对象。

DoubleBarrierOpt = fininstrument(“DoubleBarrier”,“罢工”, 75,“ExerciseDate”datetime(2020、9、15),“OptionType”,“电话”,“ExerciseStyle”,“美国”,“BarrierType”,“DKO”,“BarrierValue”(110 80),“名字”,“doublebarrier_option”
DoubleBarrierOpt = DoubleBarrier with properties: OptionType: "call" Strike: 75 BarrierValue: [110 80] exercisstyle: "american" ExerciseDate: 15-Sep-2020 BarrierType: "dko" Rebate: [0 0] Name: "doublebarrier_option"

创建赫斯顿模型对象

使用finmodel要创建赫斯顿模型对象。

HestonModel = finmodel(“赫斯顿”,“半”, 0.032,“ThetaV”, 0.1,“卡巴”, 0.003,“SigmaV”, 0.2,“RhoSV”, 0.9)
HestonModel = Heston with properties: V0: 0.0320 ThetaV: 0.1000 Kappa: 0.0030 SigmaV: 0.2000 RhoSV: 0.9000

创建ratecurve对象

创建一个平面ratecurve对象使用ratecurve

Settle = datetime(2018,9,15);成熟度= datetime(2023,9,15);Rate = 0.035;比率曲线(“零”解决,成熟,速度,“基础”, 12)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:12日期:15-Sep-2023利率:0.0350结算:15-Sep-2018 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建AssetMonteCarlo定价的人对象

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

outPricer = finpricer(“AssetMonteCarlo”,“DiscountCurve”myRC,“模型”HestonModel,“SpotPrice”, 102,“simulationDates”datetime(2020、9、15))
outPricer = HestonMonteCarlo与属性:折扣曲线:[1x1率曲线]SpotPrice: 102仿真日期:15-Sep-2020 NumTrials: 1000 RandomNumbers:[]模型:[1x1 finmodel。Heston]股息类型:"continuous"股息值:0

价格DoubleBarrier仪器

使用价格来计算的价格和敏感性DoubleBarrier乐器。

[Price, outPR] = Price (outprice,DoubleBarrierOpt,[“所有”])
价格= 32.6351
outPR = priceresult with properties:结果:[1x8表]PricerData: [1x1 struct]
outPR。结果
ans =表1×8价格γδλρθVega VegaLT  ______ ___________ __________ __________ _______ ______ _______ _________ 32.635 -0.00089196 -0.0025511 -0.0027878 -76.828 1.1334 -0.2616 -0.002986

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

创建DoubleBarrier仪对象

使用fininstrument要创建DoubleBarrier仪对象。

DoubleBarrierOpt = fininstrument(“DoubleBarrier”,“罢工”, 100,“ExerciseDate”datetime(2020、8、15)“OptionType”,“电话”,“ExerciseStyle”,“美国”,“BarrierType”,“DKO”,“BarrierValue”(110 80),“名字”,“doublebarrier_option”
DoubleBarrierOpt = DoubleBarrier with properties: OptionType: "call" Strike: 100 BarrierValue: [110 80] exercisstyle: "american" ExerciseDate: 15 aug -2020 BarrierType: "dko" Rebate: [0 0] Name: "doublebarrier_option"

创建BlackScholes模型对象

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

BlackScholesModel = finmodel(“BlackScholes”,“波动”,。3)
BlackScholesModel = BlackScholes与属性:波动性:0.3000相关性:1

创建ratecurve对象

创建一个平面ratecurve对象使用ratecurve

Settle = datetime(2017,9,15);成熟度= datetime(2023,9,15);Rate = 0.035;比率曲线(“零”解决,成熟,速度,“基础”, 12)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:12日期:15-Sep-2023利率:0.0350结算:15-Sep-2017 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建AssetMonteCarlo定价的人对象

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

ExerciseDate = datetime(2020,08,15);Settle = datetime(2017,9,15);outPricer = finpricer(“AssetMonteCarlo”,“DiscountCurve”myRC,“模型”BlackScholesModel,“SpotPrice”, 100,“simulationDates”,解决+天(1):天(1):ExerciseDate);

价格DoubleBarrier仪器

使用价格来计算的价格和敏感性DoubleBarrier乐器。

[Price, outPR] = Price (outprice,DoubleBarrierOpt,[“所有”])
价格= 6.9667
outPR = priceresult with properties:结果:[1x7表]PricerData: [1x1 struct]
outPR。结果
ans =表1×7价格γδλρθ织女星  ______ _______ _________ ______ _______ ______ _______ 6.9667 0.26875 -0.096337 3.8576 0.39855 9.5406 -1.2907

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

创建DoubleBarrier仪对象

使用fininstrument要创建DoubleBarrier仪对象。

DoubleBarrierOpt = fininstrument(“DoubleBarrier”,“罢工”, 100,“ExerciseDate”datetime(2020、8、15)“OptionType”,“电话”,“ExerciseStyle”,“欧洲”,“BarrierType”,“DKO”,“BarrierValue”(110 80),“名字”,“doublebarrier_option”
DoubleBarrierOpt = DoubleBarrier with properties: OptionType: "call" Strike: 100 BarrierValue: [110 80] ExerciseStyle: "european" ExerciseDate: "dko" Rebate: [0 0] Name: "doublebarrier_option"

创建BlackScholes模型对象

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

BlackScholesModel = finmodel(“BlackScholes”,“波动”,。3)
BlackScholesModel = BlackScholes与属性:波动性:0.3000相关性:1

创建ratecurve对象

创建一个平面ratecurve对象使用ratecurve

Settle = datetime(2017,9,15);成熟度= datetime(2023,9,15);Rate = 0.035;比率曲线(“零”解决,成熟,速度,“基础”, 12)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:12日期:15-Sep-2023利率:0.0350结算:15-Sep-2017 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建IkedaKunitomo定价的人对象

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

outPricer = finpricer(“分析”,“DiscountCurve”myRC,“模型”BlackScholesModel,“SpotPrice”, 100,“弯曲”(0.03 - -0.03),“DividendValue”, 0.029,“PricingMethod”,“IkedaKunitomo”
outPricer = IkedaKunitomo与属性:折扣曲线:[1x1 ratecurve]模型:[1x1 finmodel。BlackScholes] SpotPrice: 100 DividendValue: 0.0290 DividendType: "continuous" Curvature: [0.0300 -0.0300]

价格DoubleBarrier仪器

使用价格来计算的价格和敏感性DoubleBarrier乐器。

[Price, outPR] = Price (outprice,DoubleBarrierOpt,[“所有”])
价格= 5.6848e-04
outPR = priceresult with properties:结果:[1x7 table] PricerData: []
outPR。结果
ans =表1×7价格γδλ织女星θρ  __________ ___________ ___________ _______ _________ _________ ___________ -0.031332 0.0008912 -0.00035113 -4.2071 0.00056848 - -3.7713 e-05 e-06 -6.6339

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

创建DoubleBarrier仪对象

使用fininstrument要创建DoubleBarrier仪对象。

DoubleBarrierOpt = fininstrument(“DoubleBarrier”,“罢工”, 100,“ExerciseDate”datetime(2020、8、15)“OptionType”,“电话”,“ExerciseStyle”,“欧洲”,“BarrierType”,“DKO”,“BarrierValue”(110 80),“名字”,“doublebarrier_option”
DoubleBarrierOpt = DoubleBarrier with properties: OptionType: "call" Strike: 100 BarrierValue: [110 80] ExerciseStyle: "european" ExerciseDate: "dko" Rebate: [0 0] Name: "doublebarrier_option"

创建BlackScholes模型对象

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

BlackScholesModel = finmodel(“BlackScholes”,“波动”, 0.02)
BlackScholesModel = BlackScholes与属性:波动性:0.0200相关性:1

创建ratecurve对象

创建一个平面ratecurve对象使用ratecurve

Settle = datetime(2019,9,15);成熟度= datetime(2023,9,15);Rate = 0.035;比率曲线(“零”解决,成熟,速度,“基础”, 12)
myRC =带有属性的利率曲线:类型:“零”复合:-1基础:12日期:15-Sep-2023利率:0.0350结算:15-Sep-2019 InterpMethod:“线性”ShortExtrapMethod:“下一个”LongExtrapMethod:“前一个”

创建VannaVolga定价的人对象

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

VolRR = -0.0045;VolBF = 0.0037;RateF = 0.0210;outPricer = finpricer(“VannaVolga”,“DiscountCurve”myRC,“模型”BlackScholesModel,“SpotPrice”, 100,“DividendValue”RateF,“VolatilityRR”VolRR,“VolatilityBF”VolBF)
outPricer = VannaVolga属性:折扣曲线:[1x1 ratecurve]模型:[1x1 finmodel。BlackScholes] SpotPrice: 100 DividendType: "continuous" DividendValue: 0.0210 VolatilityRR: -0.0045 VolatilityBF: 0.0037

价格DoubleBarrier仪器

使用价格来计算的价格和敏感性DoubleBarrier乐器。

[Price, outPR] = Price (outprice,DoubleBarrierOpt,[“所有”])
价格= 1.6450
outPR = priceresult with properties:结果:[1x7表]PricerData: [1x1 struct]
outPR。结果
ans =表1×7价格γδλ织女星θρ  _____ _______ ______ ______ ______ _______ ______ 1.645 0.82818 75.662 50.346 14.697 -1.3145 74.666

更多关于

全部展开

提示

在创建DoubleBarrier具有ExerciseStyle设置为“美国”,可以修改ExerciseStyle属性“欧洲”使用点表示法。

DoubleBarrier。ExerciseStyle= "European"
因为欧式期权有一个标量罢工而且ExerciseDate值,而美式选项有2元素向量罢工而且ExerciseDate值,当您更改为时ExerciseStyle“美国”“欧洲”,罢工而且ExerciseDate值将成为2元素向量中的最后一个元素罢工而且ExerciseDate值。

版本历史

R2020b中介绍