price
Syntax
Description
[
computes the equity instrument price and related pricing information based on the pricing
object Price
,PriceResult
] = price(inpPricer
,inpInstrument
)inpPricer
and the instrument object
inpInstrument
.
[
adds an optional argument to specify sensitivities. Use this syntax with the input
argument combination in the previous syntax.Price
,PriceResult
] = price(___,inpSensitivity
)
Examples
Price Asian
Instrument Using RoughBergomi
Model and RoughVolMonteCarlo
Pricer
This example shows the workflow to price a fixed-strike Asian
instrument when you use a RoughBergomi
model and an RoughVolMonteCarlo
pricing method.
Create Asian
Instrument Object
Use fininstrument
to create an Asian
instrument object.
AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2019,1,30),'Strike',1000,'OptionType',"put",'Name',"asian_option")
AsianOpt = Asian with properties: OptionType: "put" Strike: 1000 AverageType: "arithmetic" AveragePrice: 0 AverageStartDate: NaT ExerciseStyle: "european" ExerciseDate: 30-Jan-2019 Name: "asian_option"
Create RoughBergomi
Model Object
Use finmodel
to create a RoughBergomi
model object.
RoughBergomiModel = finmodel("RoughBergomi",Alpha=-0.32, Xi=0.1,Eta=0.003,RhoSV=0.9)
RoughBergomiModel = RoughBergomi with properties: Alpha: -0.3200 Xi: 0.1000 Eta: 0.0030 RhoSV: 0.9000
Create ratecurve
Object
Create a flat ratecurve
object using ratecurve
.
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"
Create RoughVolMonteCarlo
Pricer Object
Use finpricer
to create an RoughVolMonteCarlo
pricer object and use the ratecurve
object for the 'DiscountCurve'
name-value argument.
outPricer = finpricer("RoughVolMonteCarlo",DiscountCurve=myRC,Model=RoughBergomiModel,SpotPrice=900,simulationDates=datetime(2019,1,30))
outPricer = RoughBergomiMonteCarlo with properties: DiscountCurve: [1x1 ratecurve] SpotPrice: 900 SimulationDates: 30-Jan-2019 NumTrials: 1000 RandomNumbers: [] Model: [1x1 finmodel.RoughBergomi] DividendType: "continuous" DividendValue: 0 MonteCarloMethod: "standard" BrownianMotionMethod: "standard"
Price Asian
Instrument
Use price
to compute the price and sensitivities for the Asian
instrument.
[Price, outPR] = price(outPricer,AsianOpt,"all")
Price = 103.0639
outPR = priceresult with properties: Results: [1x7 table] PricerData: [1x1 struct]
outPR.Results
ans=1×7 table
Price Delta Gamma Lambda Rho Theta Vega
______ ________ _________ _______ _______ _______ ______
103.06 -0.77793 0.0024128 -6.7932 -166.05 -1.4838 88.272
Price Asian
Instrument Using RoughHeston
Model and RoughVolMonteCarlo
Pricer
Since R2024b
This example shows the workflow to price a fixed-strike Asian
instrument when you use a RoughHeston
model and a RoughVolMonteCarlo
pricing method.
Create Asian
Instrument Object
Use fininstrument
to create an Asian
instrument object.
AsianOpt = fininstrument("Asian",ExerciseDate=datetime(2019,1,30),Strike=1000,OptionType="put",Name="asian_option")
AsianOpt = Asian with properties: OptionType: "put" Strike: 1000 AverageType: "arithmetic" AveragePrice: 0 AverageStartDate: NaT ExerciseStyle: "european" ExerciseDate: 30-Jan-2019 Name: "asian_option"
Create RoughHeston
Model Object
Use finmodel
to create a RoughHeston
model object.
RoughHestonModel = finmodel("RoughHeston",V0=0.4,ThetaV=0.3,Kappa=0.2,SigmaV=0.1,Alpha=-0.02,RhoSV=0.3)
RoughHestonModel = RoughHeston with properties: Alpha: -0.0200 V0: 0.4000 ThetaV: 0.3000 Kappa: 0.2000 SigmaV: 0.1000 RhoSV: 0.3000
Create ratecurve
Object
Create a flat ratecurve
object using ratecurve
.
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"
Create RoughVolMonteCarlo
Pricer Object
Use finpricer
to create a RoughVolMonteCarlo
pricer object and use the ratecurve
object for the DiscountCurve
name-value argument.
outPricer = finpricer("RoughVolMonteCarlo",DiscountCurve=myRC,Model=RoughHestonModel,SpotPrice=900,simulationDates=datetime(2019,1,30))
outPricer = RoughHestonMonteCarlo with properties: DiscountCurve: [1x1 ratecurve] SpotPrice: 900 SimulationDates: 30-Jan-2019 NumTrials: 1000 RandomNumbers: [] Model: [1x1 finmodel.RoughHeston] DividendType: "continuous" DividendValue: 0 MonteCarloMethod: "standard" BrownianMotionMethod: "standard"
Price Asian
Instrument
Use price
to compute the price and sensitivities for the Asian
instrument.
[Price, outPR] = price(outPricer,AsianOpt,"all")
Price = 131.2194
outPR = priceresult with properties: Results: [1x8 table] PricerData: [1x1 struct]
outPR.Results
ans=1×8 table
Price Delta Gamma Lambda Rho Theta Vega VegaLT
______ ________ _______ _______ ______ _______ ______ ______
131.22 -0.67246 0.00155 -4.6122 -152.4 -74.841 105.65 0
Input Arguments
inpPricer
— Pricer object
RoughVolMonteCarlo
object
Pricer object, specified as a previously created RoughVolMonteCarlo
pricer object. Create the pricer object using finpricer
.
Data Types: object
inpInstrument
— Instrument object
Vanilla
object | Asian
object | object | Cliquet
object | Binary
object
Instrument object, specified as a scalar or a vector of previously created
instrument objects. Create the instrument objects using fininstrument
. The following
instrument objects are supported:
Data Types: object
inpSensitivity
— List of sensitivities to compute
[]
(default) | string array with values dependent on pricer object | cell array of character vectors with values dependent on pricer object
(Optional) List of sensitivities to compute, specified as an
NOUT
-by-1
or
1
-by-NOUT
cell array of character vectors or
string array.
The supported sensitivities depend on the pricing method.
inpInstrument Object | Supported Sensitivities |
---|---|
Vanilla | {'delta','gamma','vega',
'theta','rho','price','lambda'} |
Asian | {'delta','gamma','vega','theta','rho','price','lambda'} |
Cliquet | {'delta','gamma','vega','theta','rho','price','lambda}' |
Binary | {'delta','gamma','vega','theta','rho','price','lambda'} |
inpSensitivity = {'All'}
or inpSensitivity =
["All"]
specifies that all sensitivities for the pricing method are
returned. This is the same as specifying inpSensitivity
to include
each sensitivity.
Example: inpSensitivity =
["delta","gamma","vega","lambda","rho","theta","price"]
Data Types: cell
| string
Output Arguments
Price
— Instrument price
numeric
Instrument price, returned as a numeric.
PriceResult
— Price result
PriceResult
object
Price result, returned as a PriceResult
object. The object has
the following fields:
PriceResult.Results
— Table of results that includes sensitivities (if you specifyinpSensitivity
)PriceResult.PricerData
— Structure for pricer data
More About
Delta
A delta sensitivity measures the rate at which the price of an option is expected to change relative to a $1 change in the price of the underlying asset.
Delta is not a static measure; it changes as the price of the underlying asset changes (a concept known as gamma sensitivity), and as time passes. Options that are near the money or have longer until expiration are more sensitive to changes in delta.
Gamma
A gamma sensitivity measures the rate of change of an option's delta in response to a change in the price of the underlying asset.
In other words, while delta tells you how much the price of an option might move, gamma tells you how fast the option's delta itself will change as the price of the underlying asset moves. This is important because this helps you understand the convexity of an option's value in relation to the underlying asset's price.
Vega
A vega sensitivity measures the sensitivity of an option's price to changes in the volatility of the underlying asset.
Vega represents the amount by which the price of an option would be expected to change for a 1% change in the implied volatility of the underlying asset. Vega is expressed as the amount of money per underlying share that the option's value will gain or lose as volatility rises or falls.
Theta
A theta sensitivity measures the rate at which the price of an option decreases as time passes, all else being equal.
Theta is essentially a quantification of time decay, which is a key concept in options pricing. Theta provides an estimate of the dollar amount that an option's price would decrease each day, assuming no movement in the price of the underlying asset and no change in volatility.
Rho
A rho sensitivity measures the rate at which the price of an option is expected to change in response to a change in the risk-free interest rate.
Rho is expressed as the amount of money an option's price would gain or lose for a one percentage point (1%) change in the risk-free interest rate.
Lambda
A lambda sensitivity measures the percentage change in an option's price for a 1% change in the price of the underlying asset.
Lambda is a measure of leverage, indicating how much more sensitive an option is to price movements in the underlying asset compared to owning the asset outright.
Version History
Introduced in R2024aR2024b: Support for RoughHeston
model
The price
function supports pricing when using a RoughHeston
model and a RoughVolMonteCarlo
pricing method.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)