Main Content

BlackScholes

CreateBlackScholes模型对象Asian,,,,屏障,,,,DoubleBarrier,,,,回望,,,,PartialLookback,,,,Spread,,,,香草,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制乐器

Description

Create and price a香草,,,,回望,,,,PartialLookback,,,,屏障,,,,DoubleBarrierAsian,,,,Spread,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制乐器object with aBlackScholes使用此工作流的模型:

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

  2. UseFinmodelto specify theBlackScholes模型对象香草,,,,回望,,,,PartialLookback,,,,屏障,,,,DoubleBarrier,,,,Asian,,,,Spread,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制乐器object.

  3. Usefinpricerto specify a supported pricing method. For more information on the available pricing methods for the香草,,,,回望,,,,PartialLookback,,,,屏障,,,,DoubleBarrier,,,,Asian,,,,Spread,,,,Touch,,,,DoubleTouch,,,,集团, 或者二进制使用仪器对象BlackScholes模型,请参阅选择仪器,模型和定价商

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

For more information on the available pricing methods for a香草,,,,回望,,,,PartialLookback,,,,屏障,,,,DoubleBarrier,,,,Asian,,,,Spread,,,,Touch,,,,DoubleTouch, 或者二进制使用仪器BlackScholes模型,请参阅选择仪器,模型和定价商

创建

Description

例子

Blackscholesmodelobj= finmodel(模型类型,,,,'挥发性',volatility_value)创建一个BlackScholes通过指定模型对象模型类型and sets the特性对于所需的名称值对参数挥发性

例子

Blackscholesmodelobj= finmodel(___,,,,姓名,,,,Value设置可选特性using additional name-value pairs in addition to the required arguments in the previous syntax. For example,blackscholesmodelobj = finmodel("BlackScholes",'Volatility',0.032,'Correlation',Corr)创建一个BlackScholes模型对象。您可以指定多个名称值对参数。

Input Arguments

expand all

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

Data Types:char|细绳

BlackScholes姓名-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:blackscholesmodelobj = finmodel("BlackScholes",'Volatility',0.032,'Correlation',Corr)
RequiredBlackScholes姓名-Value Pair Arguments

expand all

波动率值,指定为逗号分隔对'挥发性'和标量非负数字。

Data Types:double

选修的BlackScholes姓名-Value Pair Arguments

expand all

基础资产价格之间的相关性,指定为逗号分隔对'相关性'and a semidefinite matrix. For more information on creating a positive semidefinite matrix, see近乎近的

Data Types:double

特性

expand all

波动率值,,,,returned as a scalar nonnegative numeric.

Data Types:double

基础资产之间的相关性,作为半明确矩阵返回。

Data Types:double

Examples

collapse all

This example shows the workflow to price anAsian乐器when you use aBlackScholesmodel and a特恩布尔瓦克曼pricing method.

CreateAsian乐器Object

Usefininstrument创建一个nAsian乐器object.

AsianOpt = fininstrument(“亚洲”,,,,'ExerciseDate',,,,datetime(2022,9,15),'罢工',,,,105,'OptionType',,,,“放”,,,,'ExerciseStyle',,,,“欧洲的”,,,,'姓名',,,,“ Asian_option”
AsianOpt = Asian with properties: OptionType: "put" Strike: 105 AverageType: "arithmetic" AveragePrice: 0 AverageStartDate: NaT ExerciseStyle: "european" ExerciseDate: 15-Sep-2022 Name: "asian_option"

CreateBlackScholesModel Object

UseFinmodel创建一个BlackScholes模型对象。

BlackScholesModel = finmodel("BlackScholes",,,,'挥发性',,,,0.28)
blackscholesmodel =具有属性的黑色choles:波动率:0.2800相关性:1

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创建一个TurnbulllWakeman定价对象并使用ratecurve对象“折扣”名称值对参数。

eutpricer = finpricer("analytic",,,,'Model',,,,BlackScholesModel,“折扣”,,,,myRC,'SpotPrice',100,'PricingMethod',,,,"TurnbullWakeman"
Expricer = Turnbullwakeman具有属性:discountCurve:[1x1 ratecurve]模型:[1x1 FinModel.blackScholes] Spotprice:100 ratendendvalue:0 ratendendvalue:0 ratendendType:“连续”

PriceAsian乐器

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

[Price, outPR] = price(outPricer,AsianOpt,["all"])
价格= 11.2249
outPR = priceresult with properties: Results: [1x7 table] PricerData: []
outPR.Results
ans=1×7桌Price Delta Gamma Lambda Vega Theta Rho ______ ________ _______ _______ ______ _______ _______ 11.225 -0.38072 0.01087 -3.3917 44.242 -0.5256 -116.88

This example shows the workflow to price aDoubleBarrier乐器when you use aBlackScholes模型和AssetMonteCarlopricing method.

CreateDoubleBarrier乐器Object

Usefininstrument创建一个DoubleBarrier乐器object.

doubleBarrierOpt = Fininstrument(“双重行驶”,,,,'罢工',100,'ExerciseDate',DateTime(2020,8,15),'OptionType',,,,"call",,,,'ExerciseStyle',,,,"american",,,,'BarrierType',,,,“ dko”,,,,'barriervalue',,,,[110 80],'姓名',,,,"doublebarrier_option"
doubleBarrierOpt =带有属性的双重堡垒:optionType:“呼叫”罢工:100 BarrierValue:[110 80]锻炼:“ American”练习:15-AUG-2020 BARRIERTYPE:“ DKO” REBATE:[0 0] rebate:[0]名称:“ doublebarrier_option''

CreateBlackScholesModel Object

UseFinmodel创建一个BlackScholes模型对象。

BlackScholesModel = finmodel("BlackScholes",,,,“挥发性”,,,,。3)
blackscholesmodel =具有属性的黑色choles:波动率:0.3000相关:1

CreateratecurveObject

Create a flatratecurve对象使用ratecurve

Settle = datetime(2017,9,15); Maturity = datetime(2023,9,15); Rate = 0.035; myRC = ratecurve('zero',,,,Settle,Maturity,Rate,'Basis',12)
MYRC =具有属性的比例:类型:“零”复合:-1基础:12个日期:15-Sep-2023速率:0.0350 settle:15-Sep-2017 InterpMethod:“ Linear” ShortexTrapMethod:“ Next” longextrapmethod:“ longextrapmethod:“先前”

CreateAssetMonetCarlo定价对象

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

ExerciseDate = datetime(2020,08,15); Settle = datetime(2017,9,15); outPricer = finpricer("AssetMonteCarlo",,,,“折扣”,,,,myRC,“模型”,,,,BlackScholesModel,'SpotPrice',100,'simulationDates',定居+天(1):(1)天:行使);

PriceDoubleBarrier乐器

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

[Price,extpr] = Price(Expricer,DoubleBarrierOpt,["all"])
价格= 6.9563
extpr =具有属性的定价:结果:[1x7表] PricerData:[1x1 struct]
outPR.Results
ans=1×7桌价格delta gamma lambda rho theta vega ______________________________________________________________________________________________________________________________________________-0-0-0-11.1.17例

This example shows the workflow to price a香草乐器when you use aBlackScholes模型和AssetTreepricing method.

Create香草乐器Object

Usefininstrument创建一个香草乐器object.

Vanillaopt = Fininstrument("Vanilla",,,,'ExerciseDate',,,,datetime(2019,5,1),'罢工',,,,29,'OptionType',,,,“放”,,,,'ExerciseStyle',,,,“欧洲的”,,,,'姓名',,,,“ vanilla_option”
Vanillaopt =带有属性的香草:optionType:“ put”锻炼:“欧洲”锻炼:01-May-2019罢工:29名称:“ vanilla_option”

CreateBlackScholesModel Object

UseFinmodel创建一个BlackScholes模型对象。

BlackScholesModel = finmodel("BlackScholes",,,,'挥发性',,,,0.25)
BlackScholesModel = BlackScholes with properties: Volatility: 0.2500 Correlation: 1

CreateratecurveObject

Create a flatratecurve对象使用ratecurve

Settle = datetime(2018,1,1); Maturity = datetime(2020,1,1); Rate = 0.035; myRC = ratecurve('zero',,,,Settle,Maturity,Rate,'Basis',,,,1)
myRC = ratecurve with properties: Type: "zero" Compounding: -1 Basis: 1 Dates: 01-Jan-2020 Rates: 0.0350 Settle: 01-Jan-2018 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"

CreateAssetTree定价对象

Usefinpricer创建一个nAssetTreepricer object for a LR equity tree and use theratecurve对象“折扣”名称值对参数。

LRPricer = finpricer("AssetTree",,,,“折扣”,,,,myRC,'Model',,,,BlackScholesModel,'SpotPrice',,,,30,'PricingMethod',,,,“ LeisenReimer”,,,,'到期',,,,datetime(2019,5,1),'numperiods',15)
LRPricer = LRTree with properties: InversionMethod: PP1 Strike: 30 Tree: [1x1 struct] NumPeriods: 15 Model: [1x1 finmodel.BlackScholes] DiscountCurve: [1x1 ratecurve] SpotPrice: 30 DividendType: "continuous" DividendValue: 0 TreeDates: [02-Feb-2018 08:00:00 06-Mar-2018 16:00:00 ... ]

Price香草乐器

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

[Price,extpr] = Price(lrpricer,Vanillaopt,"all"
价格= 2.2542
extpr =具有属性的定价:结果:[1x7表] PricerData:[1x1 struct]
outPR.Results
ans=1×7桌Price Delta Gamma Vega Lambda Rho Theta ______ ________ ________ ______ ______ _______ ________ 2.2542 -0.33628 0.044039 12.724 -4.469 -16.433 -0.76073
Introduced in R2020a