Main Content

Merton

CreateMertonmodel object forVanilla,Asian,Barrier,DoubleBarrier,Lookback,PartialLookback,OneTouch,DoubleTouch,Cliquet, orBinaryinstrument

Description

Create and price aVanilla,Asian,Barrier,DoubleBarrier,Lookback,PartialLookback,Touch,DoubleTouch,Cliquet, orBinaryinstrument object with aMertonmodel using this workflow:

  1. Usefininstrumentto create aVanilla,Barrier,Lookback,PartialLookback,Asian,DoubleBarrier,Binary,Touch,Cliquet, orDoubleTouchinstrument object.

  2. Usefinmodelto specify aMertonmodel object for theVanilla,Asian,Barrier,DoubleBarrier,Lookback,PartialLookback,Touch,DoubleTouch,Cliquet, orBinaryinstrument object.

  3. Usefinpricerto specify aFiniteDifference,NumericalIntegration, orFFTpricing method for theVanillainstrument object.

    Usefinpricerto specify anAssetMonteCarlopricing method for theVanilla,Asian,BarrierDoubleBarrier,Lookback,PartialLookback,Touch,DoubleTouch,Cliquet, orBinaryinstrument 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 pricing methods for aVanilla,Asian,Barrier,DoubleBarrier,Lookback,PartialLookback,Touch,DoubleTouch, orBinaryinstrument, seeChoose Instruments, Models, and Pricers.

Creation

Description

example

MertonModelObj= finmodel(ModelType,'Volatility',volatility_value,'MeanJ',meanj_value,'JumpVol',jumpvol_value,'JumpFreq',jumpfreq_value)creates aMertonmodel object by specifyingModelTypeand the required name-value pair argumentsMeanJ,JumpVol, andJumpFreqto setpropertiesusing name-value pair arguments. For example,MertonModelObj = finmodel("Merton",'Volatility',0.03,'MeanJ',0.22,'JumpVol',0.007,'JumpFreq',0.009)creates aMertonmodel object.

Input Arguments

expand all

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

Data Types:char|string

MertonName-Value Pair Arguments

Specify required comma-separated pairs ofName,Valuearguments.Nameis the argument name andValueis the corresponding value.Namemust appear inside quotes. You can specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN.

Example:MertonModelObj = finmodel("Merton",'Volatility',0.03,'MeanJ',0.22,'JumpVol',0.007,'JumpFreq',0.009)

标的资产的波动值,具体ed as the comma-separated pair consisting of'Volatility'and a scalar nonnegative numeric.

Data Types:double

Mean of the random percentage jump size (J), specified as the comma-separated pair consisting of'MeanJ'and a scalar decimal value, wherelog(1+J) is normally distributed with mean (log(1+MeanJ)-0.5*JumpVol^2) and the standard deviationJumpVol.

Data Types:double

Standard deviation oflog(1+J), whereJis the random percentage jump size, specified as the comma-separated pair consisting of'JumpVol'and a scalar decimal value.

Data Types:double

Annual frequency of the Poisson jump process, specified as the comma-separated pair consisting of'JumpFreq'and a scalar numeric value.

Data Types:double

Properties

expand all

Volatility value, returned as a scalar nonnegative numeric.

Data Types:double

Mean of the random percentage jump size (J), returned as a scalar decimal value.

Data Types:double

Standard deviation oflog(1+J), whereJis the random percentage jump size, returned as a scalar decimal value.

Data Types:double

Annual frequency of the Poisson jump process, returned as a scalar numeric value.

Data Types:double

Examples

collapse all

This example shows the workflow to price aVanillainstrument when you use aMertonmodel and aNumericalIntegrationpricing method.

CreateVanillaInstrument Object

Usefininstrumentto create aVanillainstrument object.

VanillaOpt = fininstrument("Vanilla",'ExerciseDate',datetime(2022,9,15),'Strike',105,'OptionType',"put",'ExerciseStyle',"european",'Name',"vanilla_option")
VanillaOpt = Vanilla with properties: OptionType: "put" ExerciseStyle: "european" ExerciseDate: 15-Sep-2022 Strike: 105 Name: "vanilla_option"

CreateMertonModel Object

Usefinmodelto create aMertonmodel object.

MertonModel = finmodel("Merton",'Volatility',0.45,'MeanJ',0.02,'JumpVol',0.07,'JumpFreq',0.09)
MertonModel = Merton with properties: Volatility: 0.4500 MeanJ: 0.0200 JumpVol: 0.0700 JumpFreq: 0.0900

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"

CreateNumericalIntegrationPricer Object

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

outPricer = finpricer("numericalintegration",'DiscountCurve',myRC,'Model',MertonModel,'SpotPrice',100,'DividendValue',0.45,'VolRiskPremium',0.09,'LittleTrap',false,'AbsTol',0.5,'RelTol',0.04,'Framework','lewis2001')
outPricer = NumericalIntegration with properties: Model: [1x1 finmodel.Merton] DiscountCurve: [1x1 ratecurve] SpotPrice: 100 DividendType: "continuous" DividendValue: 0.4500 AbsTol: 0.5000 RelTol: 0.0400 IntegrationRange: [1.0000e-09 Inf] CharacteristicFcn: @characteristicFcnMerton76 Framework: "lewis2001" VolRiskPremium: 0.0900 LittleTrap: 0

PriceVanillaInstrument

Usepriceto compute the price and sensitivities for theVanillainstrument.

[Price, outPR] = price(outPricer,VanillaOpt,["all"])
Price = 75.1139
outPR = priceresult with properties: Results: [1x6 table] PricerData: []
outPR.Results
ans=1×6 tablePrice Delta Gamma Theta Rho Vega ______ ________ __________ _______ _______ ______ 75.114 -0.15305 0.00025732 -3.9836 -361.67 4.6317

This example shows the workflow to price aBinaryinstrument when you use aMertonmodel and anAssetMonteCarlopricing method.

CreateBinaryInstrument Object

Usefininstrumentto create anBinaryinstrument object.

BinaryOpt = fininstrument("Binary",'ExerciseDate',datetime(2022,9,15),'Strike',100,'PayoffValue',130,'OptionType',"put",'Name',"binary_option")
BinaryOpt = Binary with properties: OptionType: "put" ExerciseDate: 15-Sep-2022 Strike: 100 PayoffValue: 130 ExerciseStyle: "european" Name: "binary_option"

CreateMertonModel Object

Usefinmodelto create aMertonmodel object.

MertonModel = finmodel("Merton",'Volatility',0.25,'MeanJ',0.02,'JumpVol',0.07,'JumpFreq',0.09)
MertonModel = Merton with properties: Volatility: 0.2500 MeanJ: 0.0200 JumpVol: 0.0700 JumpFreq: 0.0900

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"

CreateAssetMonetCarloPricer Object

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

outPricer = finpricer("AssetMonteCarlo",'DiscountCurve',myRC,"Model",MertonModel,'SpotPrice',102,'simulationDates',datetime(2022,9,15))
outPricer = MertonMonteCarlo with properties: DiscountCurve: [1x1 ratecurve] SpotPrice: 102 SimulationDates: 15-Sep-2022 NumTrials: 1000 RandomNumbers: [] Model: [1x1 finmodel.Merton] DividendType: "continuous" DividendValue: 0

PriceBinaryInstrument

Usepriceto compute the price and sensitivities for theBinaryinstrument.

[Price, outPR] = price(outPricer,BinaryOpt,["all"])
Price = 53.2308
outPR = priceresult with properties: Results: [1x7 table] PricerData: [1x1 struct]
outPR.Results
ans=1×7 tablePrice Delta Gamma Lambda Rho Theta Vega ______ ______ _______ _______ _______ ______ ____ 53.231 -0.831 0.54314 -1.5924 -212.88 1.8643 0
Introduced in R2020a