Main Content

Kirk

CreateKirkpricer object forSpreadinstrument usingBlackScholesmodel

Description

Create and price aSpreadinstrument object with aBlackScholesmodel and aKirkpricing method using this workflow:

  1. Usefininstrumentto create aSpreadinstrument object.

  2. Usefinmodelto specify aBlackScholesmodel for theSpreadinstrument object.

  3. Usefinpricerto specify aKirkpricer object for theSpreadinstrument object.

For more information on this workflow, seeGet Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.

For more information on the available instruments, models, and pricing methods for aSpreadinstrument, seeChoose Instruments, Models, and Pricers.

Creation

Description

example

KirkPricerObj= finpricer(PricerType,'DiscountCurve',ratecurve_obj,'Model',model,'SpotPrice',spotprice_value)creates aKirkpricer object by specifyingPricerTypeand sets thepropertiesfor the required name-value pair argumentsDiscountCurve,Model, andSpotPrice.

example

KirkPricerObj= finpricer(___,Name,Value)to set optionalpropertiesusing additional name-value pairs in addition to the required arguments in the previous syntax. For example,KirkPricerObj = finpricer("Analytic",'DiscountCurve',ratecurve_obj,'Model',BSModel,'SpotPrice',[100;105],'DividendValue',[2.5,2.8],'PricingMethod',"Kirk")creates aKirkpricer object.

Input Arguments

expand all

Pricer type, specified as a string with the value of"Analytic"or a character vector with the value of'Analytic'.

Data Types:char|string

Name-Value Arguments

Specify required and optional pairs of arguments asName1=Value1,...,NameN=ValueN, whereNameis the argument name andValueis the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

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

Example:KirkPricerObj = finpricer("Analytic",'DiscountCurve',ratecurve_obj,'Model',BSModel,'SpotPrice',[100;105],'DividendValue',[2.5,2.8],'PricingMethod',"Kirk")

RequiredKirkName-Value Pair Arguments

expand all

ratecurveobject for discounting cash flows, specified as the comma-separated pair consisting of'DiscountCurve'and the name of a previously createdratecurveobject.

Note

Specify a flatratecurveobject forDiscountCurve. If you use a nonflatratecurveobject, the software uses the rate in theratecurveobject atMaturityand assumes that the value is constant for the life of the equity option.

Data Types:object

Model object, specified as the comma-separated pair consisting of'Model'and the name of a previously createdBlackScholesmodel object usingfinmodel.

Data Types:object

Current price of the underlying asset, specified as the comma-separated pair consisting of'SpotPrice'and a scalar or cell array of nonnegative numerics.

Data Types:double

OptionalKirkName-Value Pair Arguments

expand all

Dividend type, specified as the comma-separated pair consisting of'DividendType'and a string or character vector for a continuous dividend yield.

Data Types:char|string

Dividend yield for the underlying asset, specified as the comma-separated pair consisting of'DividendValue'and a scalar or a vector of nonnegative numerics. Use a vector of nonnegative values forDividendValuewhen pricing aSpreadinstrument.

Data Types:double

Analytic pricing method, specified as the comma-separated pair consisting of'PricingMethod'and a string or character vector.

Note

The default pricing method for aBlackScholesmodel is aBlackScholespricer.

Data Types:double

Properties

expand all

This property is read-only.

ratecurveobject for discounting cash flows, returned as aratecurveobject.

Data Types:object

Model, returned as aBlackScholesmodel object.

Data Types:object

Current price of the underlying asset, returned as a scalar or vector of nonnegative numeric values.

Data Types:double

This property is read-only.

Dividend type, returned as a string.

Data Types:string

Dividend yield for the underlying stock, returned as a scalar or vector of nonnegative numerics.

Data Types:double

Analytic pricing method, returned as a string.

Data Types:string

Object Functions

price Compute price for interest-rate, equity, or credit derivative instrument withAnalyticpricer

Examples

collapse all

This example shows the workflow to price aSpreadinstrument when you use aBlackScholesmodel and aKirkpricing method.

CreateSpreadInstrument Object

Usefininstrumentto create aSpreadinstrument object.

SpreadOpt = fininstrument("Spread",'Strike',5,'ExerciseDate'datetime(2021、9、15),'OptionType',"put",'ExerciseStyle',"european",'Name',"spread_option")
SpreadOpt = Spread with properties: OptionType: "put" Strike: 5 ExerciseStyle: "european" ExerciseDate: 15-Sep-2021 Name: "spread_option"

CreateBlackScholesModel Object

Usefinmodelto create aBlackScholesmodel object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',[0.2 , 0.1])
BlackScholesModel = BlackScholes with properties: Volatility: [0.2000 0.1000] Correlation: [2x2 double]

CreateratecurveObject

Create a flatratecurveobject usingratecurve.

Settle = datetime(2018,9,15); Maturity = datetime(2023,9,15); Rate = 0.035; myRC = ratecurve('zero',Settle,Maturity,Rate,'Basis',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"

CreateKirkPricer Object

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

outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',[103,105],'DividendValue',[0.025 , 0.028],'PricingMethod',"Kirk")
outPricer = Kirk with properties: DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.BlackScholes] SpotPrice: [103 105] DividendValue: [0.0250 0.0280] DividendType: "continuous"

PriceSpreadInstrument

Usepriceto compute the price and sensitivities for theSpreadinstrument.

[Price, outPR] = price(outPricer,SpreadOpt,["all"])
Price = 17.8614
outPR = priceresult with properties: Results: [1x7 table] PricerData: []
outPR.Results
ans=1×7 tablePrice Delta Gamma Lambda Vega Theta Rho ______ ____________________ ______________________ __________________ ________________ _______ _______ 17.861 -0.44663 0.58229 0.0093493 0.008195 -2.5756 3.3578 59.518 27.176 -1.7801 -8.1715

Version History

Introduced in R2020a