主要内容

SABR

创造SABR定价对象交换instrument usingSABRmodel

Description

创建和定价交换instrument object with aSABR模型和SABR使用此工作流的定价方法:

  1. UseFinInstrumentto create a交换仪器对象。

  2. UseFinmodelto specify aSABRmodel for the交换仪器对象。

  3. Usefinpricerto specify aSABR定价对象the交换仪器对象。

    Note

    If you do not specify投影when you create a交换instrument with theSABR价格, the投影value defaults to theDiscountCurvevalue.

有关此工作流程的更多信息,请参阅Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available instruments, models, and pricing methods for a交换乐器,请参阅Choose Instruments, Models, and Pricers.

Creation

Description

example

sabrpricerobj= finpricer(标准型,''DiscountCurve',ratecurve_obj,'模型',model)creates aSABR价格object by specifying标准型以及所需的名称值对参数模型to set特性using name-value pairs. For example,sabrpricerobj= finpricer(“分析”,''DiscountCurve',ratecurve_obj,'Model',SABRModel)creates aSABR定价对象。

Input Arguments

expand all

价格r type, specified as a string with the value of“分析”or a character vector with the value of'Analytic'.

Data Types:char|string

Name-Value Arguments

指定所需的参数为Name1=Value1,...,NameN=ValueN, whereNameis the argument name and价值是相应的值。名称值参数必须在其他参数之后出现,但是对的顺序并不重要。

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

Example:sabrpricerobj= finpricer(“分析”,''DiscountCurve',ratecurve_obj,'Model',SABRModel)

ratecurveobject for discounting cash flows, specified as the comma-separated pair consisting of'DiscountCurve'and the name of a previously createdratecurve目的。

Data Types:object

模型, specified as the comma-separated pair consisting of'模型'and the name of a previously createdSABRmodel object usingFinmodel.

Data Types:object

Properties

expand all

ratecurveobject for discounting cash flows, returned as aratecurveobject

Data Types:object

模型, returned as aSABRmodel object.

Data Types:object

Object Functions

price Compute price for interest-rate, equity, or credit derivative instrument withAnalytic价格
volatilities Compute implied volatilities when usingSABR价格

Examples

collapse all

此示例显示了工作流程的价格交换当您使用的乐器SABR模型和SABRpricing method.

创造ratecurveObject

创造aratecurveobject usingratecurve.

Settle = DateTime(2018,9,15);type ='零'; 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; myRC = ratecurve('零',定居,Zerate,Zerors)
MyRC =具有属性的比例:类型:“零”复合:-1基础:0日期:[10x1 dateTime]速率:[10x1 double] settle:15-Sep-2018 InterpMethod:“ lineareal” shortextrapmethod:“ shortextrapmethod:“ next” longextrapmethod:“ next” longextrapmethod:”以前的”

创造交换乐器Object

UseFinInstrumentto create the underlying交换仪器对象。

swap = fininstrument("Swap",'Maturity',DateTime(2023,1,30),'Legrate',[[0.018 0.24],'LegType',[[“固定的”,"float"],,'基础',1,'Notional',100,'StartDate',DateTime(2020,3,30),'ProjectionCurve',myRC,'Name',"swap_instrument")
交换=与属性交换:legrate:[0.0180 0.2400] legtype:[“固定”“ float”]重置:[2 2]基础:[1 1]基础:[1 1] notionalitional:100最新floingrate:[nan nan nan nan] resetoffset:[0]:[0 0]投影库:[1x2 ratecurve] businessDayConvention:[“实际”“实际”]假期:nat endMonthrule:[1 1] StartDate:30-MAR 2020成熟度:30-Jan-2023 Jan-2023名称:“ SWAP_INSTRUMENT”

创造交换乐器Object

UseFinInstrumentto create a交换仪器对象。

交换= fininstrument("Swaption",'Strike',0.275,“锻炼”,datetime(2021,7,30),'Swap',交换,'optionType',"put",“锻炼”,"european",'Name',"swaption_instrument")
交换=属性交换:optionType:“ put”锻炼:“欧洲”锻炼:30-JUL-2021罢工:0.2750互换:[1x1 Fininstrument.swap]名称:“ Swaption_instrument”

创造SABR模型Object

UseFinmodelto create aSABRmodel object.

SABRModel = finmodel("SABR",'Α',0.032,'Beta',0.04,'Rho',.08,'nu',0.49,'Shift',0.002)
SABRModel = SABR with properties: Alpha: 0.0320 Beta: 0.0400 Rho: 0.0800 Nu: 0.4900 Shift: 0.0020 VolatilityType: "black"

创造SABR价格r Object

Usefinpricerto create aSABR价格object and use theratecurveobject for the'DiscountCurve'name-value pair argument.

outPricer = finpricer(“分析”,'模型',sabrmodel,'DiscountCurve',myRC)
Expricer =带有属性的SABR:discountCurve:[1x1 ratecurve]模型:[1x1 finmodel.sabr]

价格交换乐器

Usepriceto compute the price for the交换instrument.

价格= price(outPricer,Swaption)
价格= 10.3771

Version History

Introduced in R2020a