Main Content

贝茨

Create贝茨model object for香草,,,,Asian,,,,障碍,,,,DoubleBarrier,,,,回望,,,,PartialLookback,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制乐器

Description

Create and price a香草,,,,Asian,,,,障碍,,,,DoubleBarrier,,,,回望,,,,PartialLookback,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制乐器object with a贝茨使用此工作流的模型:

  1. Usefininstrument创建一个香草,,,,障碍,,,,回望,,,,PartialLookback,,,,Asian,,,,DoubleBarrier,,,,集团,,,,二进制,,,,Touch, 或者DoubleTouch乐器object.

  2. Usefinmodel指定贝茨model object for the香草,,,,Asian,,,,障碍,,,,DoubleBarrier,,,,回望,,,,PartialLookback,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制乐器object.

  3. Usefinpricer指定FiniteDifference,,,,数值整合, 或者FFT定价方法香草乐器object.

    Usefinpricer指定nAssetMonteCarlo定价方法香草,,,,Asian,,,,障碍,,,,DoubleBarrier,,,,回望,,,,PartialLookback,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制乐器object.

For more information on this workflow, see使用基于对象的框架来定价金融工具开始工作流程

For more information on the available pricing methods for a香草,,,,Asian,,,,障碍,,,,DoubleBarrier,,,,回望,,,,PartialLookback,,,,Touch,,,,DoubleTouch, 或者二进制乐器,,,,see选择仪器,模型和定价商

创建

Description

例子

贝茨Obj= finmodel(模型类型,,,,'v0',V0_value,'Thetav',thetav_value,'Kappa',kappa_value,'SigmaV',sigmav_value,'Rhosv',rhosv_value, 'MeanJ',sunj_value,'jumpVol',jumpvol_value,'jumpFreq',JumpFreq_Value)创建一个贝茨object by specifying模型类型and the required name-value pair argumentsv0,,,,Thetav,,,,Kappa,,,,SigmaV,,,,Rhosv,,,,MeanJ,,,,jumpVol,,,,andjumpFreq。所需的名称值对参数集特性。For example,贝茨Obj = finmodel("Bates",'V0',0.032,'ThetaV',0.1,'Kappa',0.003,'SigmaV',0.2,'RhoSV',0.9,'MeanJ',0.11,'JumpVol',.023,'JumpFreq',0.02)创建一个贝茨model object.

Input Arguments

expand all

Model type, specified as a string with the value of"Bates"或具有价值的角色向量'Bates'

Data Types:char|细绳

贝茨姓名-Value Pair Arguments

指定所需的逗号分隔对姓名,,,,Valuearguments.姓名是参数名称和Valueis the corresponding value.姓名must appear inside quotes. You can specify several name and value pair arguments in any order as姓名1,Value1,...,NameN,ValueN

Example:贝茨= finmodel("Bates",'V0',0.032,'ThetaV',0.1,'Kappa',0.003,'SigmaV',0.2,'RhoSV',0.9,'MeanJ',0.11,'JumpVol',.023,'JumpFreq',0.02)

基础资产的初始差异,指定为逗号分隔对'V0'和标量数值。

Data Types:double

Long-term variance of the underlying asset, specified as the comma-separated pair consisting of'ThetaV'和标量数值。

Data Types:double

基础资产的平均修订速度,指定为逗号分隔对'Kappa'和标量数值。

Data Types:double

Volatility of the variance of the underlying asset, specified as the comma-separated pair consisting of'SigmaV'和标量数值。

Data Types:double

Correlation between the Weiner processes for the underlying asset and its variance, specified as the comma-separated pair consisting of'RhoSV'和标量数值。

Data Types:double

随机跳跃大小的平均值(j),指定为逗号分隔对'sunj'and a scalar decimal value wherelog(1+j)is normally distributed with mean (log(1+MeanJ)-0.5*jumpVol^2) and the standard deviationjumpVol

Data Types:double

标准偏差log(1+j), 在哪里j是随机百分比跳跃大小,指定为逗号分隔对'JumpVol'and a scalar decimal value.

Data Types:double

Annual frequency of the Poisson jump process, specified as the comma-separated pair consisting of'jumpfreq'和标量数值。

Data Types:double

特性

expand all

Initial variance of the underlying asset, returned as a scalar numeric value.

Data Types:double

基础资产的长期差异作为标量数值返回。

Data Types:double

Mean revision speed for the underlying asset, returned as a scalar numeric value.

Data Types:double

基础资产方差的波动率,作为标量数值返回。

Data Types:double

基础资产的Weiner过程及其方差之间的相关性,作为标量数值返回。

Data Types:double

随机跳跃大小的平均值(j),,,,returned as a scalar decimal value.

Data Types:double

标准偏差log(1+j), 在哪里jis the random percentage jump size, returned as a scalar decimal value.

Data Types:double

泊松跳跃过程的年度频率,作为标量数值返回。

Data Types:double

Examples

collapse all

This example shows the workflow to price a香草乐器when you use a贝茨model and a数值整合pricing method.

Create香草乐器Object

Usefininstrument创建一个香草乐器object.

Vanillaopt = Fininstrument("Vanilla",,,,'ExerciseDate',,,,datetime(2022,9,15),'罢工',,,,105,'OptionType',,,,“放”,,,,'ExerciseStyle',,,,“欧洲的”,,,,'姓名',,,,“ vanilla_option”
Vanillaopt =带有属性的香草:optionType:“ put”锻炼:“欧洲”锻炼:15-Sep-2022罢工:105名称:“ vanilla_option”

Create贝茨Model Object

Usefinmodel创建一个贝茨model object.

batesModel = finmodel("Bates",,,,'V0',,,,0.032,'ThetaV',0.1,'Kappa',0.003,'SigmaV',0.2,'RhoSV',,,,0.9,'sunj',,,,0.11,'JumpVol',,,,。023,'jumpfreq',,,,0.02)
BatesModel =具有属性的Bates:V0:0.0320 Thetav:0.1000 kappa:0.0030 sigmav:0.2000 rhosv:0.9000均值:0.1100 jumpvol:0.0230 jumpfreq:0.0200

CreateratecurveObject

Create a flatratecurve对象使用ratecurve

Settle = DateTime(2018,9,15);成熟度= DateTime(2023,9,15);费率= 0.035;myrc = ratecurve('zero',,,,Settle,Maturity,Rate,'Basis',12)
MYRC =具有属性的比例:类型:“零”复合:-1基础:12个日期:15-Sep-2023速率:0.0350 settle:15-Sep-2018 InterpMethod:“ Linear” ShortextrapMethod:“ shortextrapmethod:” Next“ longextrapmethod:“先前”

Create数值整合定价对象

Usefinpricer创建一个数值整合定价对象并使用ratecurve对象“折扣”名称值对参数。

eutpricer = finpricer("numericalintegration",,,,“折扣”,,,,myRC,'Model',,,,贝茨Model,'SpotPrice',100)
expricer =具有属性的数值集成:模型:[1x1 finmodel.bates] discountCurve:[1x1 ratecurve] Spotprice:100 restendendtype:“连续” revidendValue:0 arbstol:0 arbstol:1.0000ee-10 reltol:1.0000e-10 reltol:1.0000e-10 IntegrationRange:1.0000e-10 IntegrationRange:[1000000E-099 1.000000E-099 9.000000E-099INF]特征FCN:@Characteristicfcnbates框架:“ Heston1993” VolriskPremium:0 littletrap:1

Price香草乐器

Useprice计算价格和敏感性香草乐器。

[Price, outPR] = price(outPricer,VanillaOpt,["all"])
Price = 6.4007
outPR = priceresult with properties: Results: [1x7 table] PricerData: []
outPR.Results
ans=1×7桌价格Delta Gamma Theta Rho Vega Vegalt ______ _____________________________________________________________________________________________________________________________________________________________________ 10.1.0206 0.02.6 0.02 0.02 0.020.1.1.1.02.6 0.02 0.020.1.1.10.20.1.1.1.10-2.77 94.2006 0.02.77 94.25794.259。

此示例显示工作流程以定价固定幅度Asian乐器when you use a贝茨model and anAssetMonteCarlopricing method.

CreateAsian乐器Object

Usefininstrument创建一个nAsian乐器object.

AsianOpt = fininstrument(“亚洲”,,,,'ExerciseDate',,,,datetime(2022,9,15),'罢工',100,'OptionType',,,,“放”,,,,'姓名',,,,“ Asian_option”
Asianopt = Asian具有属性:optionType:“ put”罢工:100 AverageType:“算术”平均价格:0 AverageStartDate:Nat Extorcisestyle:“欧洲”练习:15-Sep-2022名称:“ ASIAN_OPTION”

Create贝茨Model Object

Usefinmodel创建一个贝茨model object.

batesModel = finmodel("Bates",,,,'V0',,,,0.032,'ThetaV',0.1,'Kappa',0.003,'SigmaV',0.02,'RhoSV',,,,0.9,'sunj',,,,0.11,'JumpVol',,,,。023,'jumpfreq',,,,0.02)
贝茨Model = Bates with properties: V0: 0.0320 ThetaV: 0.1000 Kappa: 0.0030 SigmaV: 0.0200 RhoSV: 0.9000 MeanJ: 0.1100 JumpVol: 0.0230 JumpFreq: 0.0200

CreateratecurveObject

Create a flatratecurve对象使用ratecurve

Settle = DateTime(2018,9,15);成熟度= DateTime(2023,9,15);费率= 0.035;myrc = ratecurve('zero',,,,Settle,Maturity,Rate,'Basis',12)
MYRC =具有属性的比例:类型:“零”复合:-1基础:12个日期:15-Sep-2023速率:0.0350 settle:15-Sep-2018 InterpMethod:“ Linear” ShortextrapMethod:“ shortextrapmethod:” Next“ longextrapmethod:“先前”

CreateAssetMonteCarlo定价对象

Usefinpricer创建一个nAssetMonteCarlo定价对象并使用ratecurve对象“折扣”名称值对参数。

eutpricer = finpricer("AssetMonteCarlo",,,,“折扣”,,,,myRC,“模型”,,,,贝茨Model,'SpotPrice',80,'simulationDates',,,,datetime(2022,9,15))
expricer = batesmontecarlo带有属性:折扣库:[1x1 ratecurve] spotprice:80仿真:15-SEP-2022数字:1000 RandomNumbers:[]模型:[1x1 finmodel.bates]

PriceAsian乐器

Useprice计算价格和敏感性Asian乐器。

[Price, outPR] = price(outPricer,AsianOpt,["all"])
Price = 14.5689
extpr =具有属性的定价:结果:[1x8表] PricerData:[1x1 struct]
outPR.Results
ans=1×8 tablePrice Delta Gamma Lambda Rho Theta Vega VegaLT ______ _______ ______ ______ ______ _______ ______ ______ 14.569 -0.7137 0.0137 -3.919 -172.1 0.77965 26.779 0.2576
Introduced in R2020a