Main Content

TurnbullWakeman

CreateTurnbullWakemanpricer object forAsianinstrument usingBlackScholesmodel

Description

Create and price aAsianinstrument object with aBlackScholesmodel and aTurnbullWakemanpricing method using this workflow:

  1. Usefininstrumentto create anAsianinstrument object.

  2. Usefinmodelto specify aBlackScholes模型Asianinstrument object.

  3. Usefinpricerto specify aTurnbullWakemanpricer object for theAsianinstrument 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 anAsianinstrument, seeChoose Instruments, Models, and Pricers.

Creation

Description

example

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

example

TurnbullWakemanPricerObj= finpricer(___,Name,Value)to set optionalpropertiesusing additional name-value pairs in addition to the required arguments in the previous syntax. For example,TurnbullWakemanPricerObj = finpricer("Analytic",'DiscountCurve',ratecurve_obj,'Model',BSModel,'SpotPrice',1000,'DividendType',"continuous",'DividendValue',100)creates aTurnbullWakemanpricer 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:TurnbullWakemanPricerObj = finpricer("Analytic",'DiscountCurve',ratecurve_obj,'Model',BSModel,'SpotPrice',1000,'DividendType',"continuous",'DividendValue',100,'PricingMethod','TurnbullWakeman')

RequiredTurnbullWakemanName-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.

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, 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 nonnegative numeric.

Data Types:double

OptionalTurnbullWakemanName-Value Pair Arguments

expand all

Stock dividend type, specified as the comma-separated pair consisting of'DividendType'and a character vector or string.DividendTypemust be"cash"for actual dollar dividends or"continuous"for a continuous dividend yield.

Data Types:char|string

Dividend yield for the underlying stock, specified as the comma-separated pair consisting of'DividendValue'and a scalar numeric for a dividend yield or a timetable for a dividend schedule.

Note

DividendValuemust be a scalar for a"continuous"DividendTypeor a timetable for a"cash"DividendType.

Data Types:double|timetable

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

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 nonnegative numeric.

Data Types:double

This property is read-only.

Stock dividend type, returned as a string.DividendTypeis either"cash"for actual dollar dividends or"continuous"for a continuous dividend yield.

Data Types:string

Dividend yield or dividend schedule for the underlying stock, returned as a scalar nonnegative numeric for a dividend yield or a timetable for a dividend schedule.

Data Types:double|timetable

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 anAsianinstrument when you use aBlackScholesmodel and aTurnbullWakemanpricing method.

CreateAsianInstrument Object

Usefininstrumentto create anAsianinstrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',105,'OptionType',"put",'ExerciseStyle',"european",'Name',"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

Usefinmodelto create aBlackScholesmodel object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',0.35)
BlackScholesModel = BlackScholes with properties: Volatility: 0.3500 Correlation: 1

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"

CreateTurnbullWakemanPricer Object

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

outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice', 100,'PricingMethod',"TurnbullWakeman")
outPricer = TurnbullWakeman with properties: DiscountCurve: [1x1 ratecurve] Model: [1x1 finmodel.BlackScholes] SpotPrice: 100 DividendValue: 0 DividendType: "continuous"

PriceAsianInstrument

Usepriceto compute the price and sensitivities for theAsianinstrument.

[Price, outPR] = price(outPricer,AsianOpt,["all"])
Price = 14.3431
outPR = priceresult with properties: Results: [1x7 table] PricerData: []
outPR.Results
ans=1×7 tablePrice Delta Gamma Lambda Vega Theta Rho ______ ________ _________ _______ ______ ________ _______ 14.343 -0.37004 0.0085706 -2.5799 44.864 -0.86257 -125.73

Version History

Introduced in R2020a