主要内容

价格

Compute price for interest-rate, equity, or credit derivative instrument withAnalytic价格

描述

example

[价格,价格Result] =价格(inpPricer,inpInstrument)根据定价对象计算仪器价格和相关定价信息inpPricer和仪器对象inpInstrument.

TheAnalytic定价者支持以下万博1manbetx定价对象:

example

[价格,价格Result] =价格(___,inpSensitivity)adds an optional argument to specify sensitivities.

例子

全部收缩

此示例显示了为欧洲演习定价的工作流程传播当您使用的乐器黑色模型和BjerksundStensland定价法。

创造传播仪器对象

利用FinInstrumentto create a传播仪器对象。

传播Opt = fininstrument("Spread",'Strike',5,“锻炼”,datetime(2021,9,15),'optionType',"put",“锻炼”,"european",'Name',“ spread_option”)
speadopt = sprining with属性:optionType:“ put”罢工:5锻炼:“欧洲”锻炼:15-Sep-2021名称:“ spraive_option”

创造黑色模型对象

利用Finmodelto create a黑色model object.

blackscholesmodel = finmodel(“黑色”,'Volatility',[0.2,0.1])
blackscholesmodel =具有属性的黑色choles:波动率:[0.2000 0.1000]相关性:[2x2 double]

创造比例目的

创建一个公寓比例object using比例.

Settle = datetime(2018,9,15); Maturity = datetime(2023,9,15); Rate = 0.035; myRC = ratecurve('零',定居,成熟度,费率,'基础',12)
myRC = ratecurve with properties: Type: "zero" Compounding: -1 Basis: 12 Dates: 15-Sep-2023 Rates: 0.0350 Settle: 15-Sep-2018 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"

创造BjerksundStensland价格r Object

利用Finpricerto create aBjerksundStensland价格object and use the比例object for the'DiscountCurve'name-value pair argument.

outPricer = finpricer(“分析”,'模型',blackscholesmodel,'DiscountCurve',myrc,'现货价格',[100,105],'DividendValue',[0.09,0.17],“定价”,"BjerksundStensland")
Expricer = bjerksundstensland具有属性:discountCurve:[1x1 ratecurve]模型:[1x1 finmodel.blackscholes] spotprice:[100 105] videndendValue:[0.0900 0.1700 0.1700]

价格传播乐器

利用价格to compute the price and sensitivities for the传播乐器。

[Price,extpr] = Price(Expricer,SpraiveOpt,[“全部”)))
价格= 7.0596
extpr =具有属性的定价:结果:[1x7表] PricerData:[]
expr.results
ans =1×7 table价格Delta Gamma Lambda Vega Theta Rho ______ ____________________ ______________________ __________________ ________________ ______ _______ 7.0596 -0.23249 0.27057 0.0069887 0.0055319 -3.2932 3.8327 41.938 18.303 1.1011 -5.6943

This example shows the workflow to price the absolute return for threeCliquetinstruments when you use a黑色模型和Rubinstein定价法。

创造比例目的

创建一个公寓比例object using比例.

Settle = datetime(2018,9,15); Maturity = datetime(2023,9,15); Rate = 0.035; myRC = ratecurve('零',定居,成熟度,费率,基础= 12)
myRC = ratecurve with properties: Type: "zero" Compounding: -1 Basis: 12 Dates: 15-Sep-2023 Rates: 0.0350 Settle: 15-Sep-2018 InterpMethod: "linear" ShortExtrapMethod: "next" LongExtrapMethod: "previous"

创造Cliquet仪器对象

利用FinInstrumentto create aCliquet三个集团仪器的仪器对象。

重置=定居 +年(0:0.25:1);cliquetopt = fininstrument("Cliquet",重置=重置,initialstrike = [140; 150; 160],锻炼="european",名称="cliquet_option")
CliquetOpt=3×1对象3x1 Cliquet array with properties: OptionType ExerciseStyle ResetDates LocalCap LocalFloor GlobalCap GlobalFloor ReturnType InitialStrike Name

创造黑色模型对象

利用Finmodelto create a黑色model object.

blackscholesmodel = finmodel(“黑色”,Volatility=0.28)
黑色Model = BlackScholes with properties: Volatility: 0.2800 Correlation: 1

创造Rubinstein价格r Object

利用Finpricerto create aRubinstein价格object and use the比例object for the'DiscountCurve'name-value pair argument.

outPricer = finpricer(“分析”,discountCurve = myrc,model = blackscholesmodel,spotprice = 135,ratendendvalue = 0.025,pricingmethod =“鲁宾斯坦”)
outPricer = Rubinstein with properties: DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.BlackScholes] SpotPrice: 135 DividendValue: 0.0250 DividendType: "continuous"

价格Cliquet乐器s

利用价格计算三个的价格和敏感性Cliquet仪器。

[Price, outPR] = price(outPricer,CliquetOpt,“全部”)
价格=3×128.1905 25.3226 23.8168
outPR=3×1对象带有属性的3x1定价阵列:结果PricerData
expr.results
ans =1×7 tablePrice Delta Gamma Lambda Vega Rho Theta ______ _______ ________ ______ ______ ______ ______ 28.191 0.59697 0.020662 2.8588 105.38 60.643 -14.62
ans =1×7 table价格Delta Gamma Lambda Vega Rho Theta ______ _______ ________ ______ ______ ______ _______ 25.323 0.41949 0.016816 2.2364 100.47 55.367 -11.708
ans =1×7 table价格delta gamma lambda vega rho theta ______ _______ ___________________________________________________________________________________________________________________________________________-11113.113例0.29729 0.29729 0.011133 1.6851 93.219 51.616 -7.511

输入参数

全部收缩

定价对象(以前使用Finpricer), specified as a scalar. The supported pricer objects are:

数据类型:object

仪器对象(以前使用FinInstrument), specified as a scalar or a vector.

使用标量万博1manbetx或向量的受支持的仪器对象是:

使用标量万博1manbetx的受支持的仪器对象是:

数据类型:object

(Optional) List of sensitivities to compute, specified as aNOUT-经过-1或a1-经过-NOUT字符向量或字符串数​​组的单元格数组。

The supported sensitivities depend on the pricing method.

inpPricer目的 万博1manbetx支持的敏感性
BjerksundStensland {'delta','gamma','vega', 'theta','rho','price','lambda'}
Ikedakunitomo {'delta','gamma','vega','theta','rho','price','lambda'}
Black 'price'
黑色 {'delta','gamma','vega','theta','rho','price','lambda'}
cdsblack 'price'
Conzeviswanathan {'delta','gamma','vega','theta','rho','price','lambda}'
Goldmansosingatto {'delta','gamma','vega','theta','rho','price','lambda}'
海南卡特 {'delta','gamma','vega','theta','rho','price','lambda}'
赫尔白 'price'
Heston 'price'
Kemnavorst {'delta','gamma','vega','theta','rho','price','lambda'}
Kirk {'delta','gamma','vega','theta','rho','price','lambda'}
Levy {'delta','gamma','vega','theta','rho','price','lambda'}
Normal 'price'
RollGeskeWhaley {'delta','gamma','vega','theta','rho','price','lambda'}
Rubinstein {'delta','gamma','vega','theta','rho','price','lambda'}
SABR 'price'
TurnbullWakeman {'delta','gamma','vega','theta','rho','price',}

inpsensitivity = {'all'}或者inpSensitivity = ["All"]specifies that all sensitivities for the pricing method are returned. This is the same as specifyinginpSensitivityto include each sensitivity.

例子:inpSensitivity = ["delta","gamma","vega","lambda","rho","theta","price"]

数据类型:细胞|string

Output Arguments

全部收缩

仪器价格,作为数字返回。

价格结果,返回价格Resultobject. The object has the following fields:

  • 价格Result.Results——(如果表的结果,包括敏感性you specifyinpSensitivity)

  • Priceresult.pricerdata— Structure for pricer data

    Note

    定价时VarianceSwap,定价is returned.

Note

TheinpPriceroptions that do not support sensitivities do not return a价格Result. For example, there is no价格Resultreturned for when using aBlack,cdsblack,赫尔白,Normal,Heston, orSABR定价法。

Version History

在R2020a中引入