RoughVolMonteCarlo
Create RolVolMonteCarlo
pricer object for equity instruments
using RoughBergoni
or RoughHeston
model
Since R2024a
Description
Create and price a Vanilla
, Asian
,
Cliquet
, or Binary
instrument object with a
RoughBergoni
or RoughHeston
model and a
RoughVolMonteCarlo
pricing method using this
workflow:
Use
fininstrument
to create aVanilla
,Asian
,Cliquet
, orBinary
instrument object.Use
finmodel
to specify aRoughBergomi
orRoughHeston
model for theVanilla
,Asian
,Cliquet
, orBinary
instrument object.Use
finpricer
to specify aRoughVolMonteCarlo
pricer object for theVanilla
,Asian
,Cliquet
, orBinary
instrument object.
For more information on this workflow, see Get Started with Workflows Using Object-Based Framework for Pricing Financial Instruments.
For more information on the available instruments, models, and pricing methods for
Vanilla
, Asian
, Cliquet
, or
Binary
instruments, see Choose Instruments, Models, and Pricers.
Creation
Syntax
Description
creates a RoughVolMonteCarloPricerObj
= finpricer(PricerType
,DiscountCurve
=discountcurve_value,Model
=model_value,SpotPrice
=spotprice_value,SimulationDates
=simulation_dates)RoughVolMonteCarlo
pricer object by specifying
PricerType
and sets the properties using
the required name-value arguments DiscountCurve
,
Model
, SpotPrice
, and
SimulationDates
.
sets properties using
name-value arguments in addition to the required arguments in the previous
syntax. For example, RoughVolMonteCarloPricerObj
= finpricer(___,Name=Value
)RoughVolMonteCarloPricerObj =
finpricer("roughvolmontecarlo",DiscountCurve=ratecurve_obj,Model=roughbergomi_model,SpotPrice=1000,SimulationDates=[datetime(2018,1,30);
datetime(2019,1,30)],NumTrials=500,DividendType='continuous',DividendValue=0.3)
creates a RoughVolMonteCarlo
pricer object using a
RoughBergomi
model. You can specify multiple
name-value arguments.
You can perform quasi-Monte Carlo simulations using the name-value
arguments for MonteCarloMethod
and
BrownianMotionMethod
. For more information, see
Quasi-Monte Carlo Simulation.
Input Arguments
PricerType
— Pricer type
string with value "RoughVolMonteCarlo"
| character vector with value
'RoughVolMonteCarlo'
Pricer type, specified as a string with the value
"RoughVolMonteCarlo"
or a character vector with
the value 'RoughVolMonteCarlo'
.
Data Types: string
| char
Specify required
and optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where
Name
is the argument name and Value
is
the corresponding value. Name-value arguments must appear after other arguments,
but the order of the pairs does not matter.
Example: RoughVolMonteCarloPricerObj =
finpricer("roughvolmontecarlo",DiscountCurve=ratecurve_obj,Model=roughbergomi_model,SpotPrice=1000,SimulationDates=[datetime(2018,1,30);
datetime(2019,1,30)],NumTrials=500,DividendType='continuous',DividendValue=0.3)
RoughVolMonteCarlo
Name-Value
ArgumentsDiscountCurve
— ratecurve
object for discounting cash flows
ratecurve
object
ratecurve
object for discounting cash flows,
specified as the name of a previously created ratecurve
object.
Note
Specify a flat ratecurve
object for
DiscountCurve
. If you use a nonflat
ratecurve
object, the software uses
the rate in the ratecurve
object at
Maturity
and assumes that the value
is constant for the life of the equity option.
Data Types: object
Model
— Model
RoughBergomi
object | RoughHeston
object
Model, specified as the name of a previously created RoughBergomi
or RoughHeston
model object. Create the model object
using finmodel
.
Data Types: object
SpotPrice
— Spot price of underlying asset
positive real numeric
Spot price of the underlying asset, specified as a scalar positive real numeric.
Data Types: double
SimulationDates
— Simulation dates
[]
(default) | datetime array | string array | date character vector
Simulation dates, specified as a scalar or a vector using a datetime array, string array, or date character vectors.
Data Types: datetime
| string
| char
RoughVolMonteCarlo
Name-Value
ArgumentsNumTrials
— Number of simulation trials
1000
(default) | scalar
Number of simulation trials, specified as a scalar number of independent sample paths (simulation trials).
Data Types: double
RandomNumbers
— Dependent random variates to generate Brownian motion vector
[]
(default) | structure
Dependent random variates to generate Brownian motion vector
(Wiener processes), specified as an
NSimulationDates
-by-NBrownians
-by-NTrials
3D time series array. The 3D time series array has the following fields:
Z
—NSimulationDates
-by-NBrownians
-by-NTrials
3D time series array of dependent random variates used to generate the Brownian motion vector (that is, Wiener processes) that drive the simulation.N
—NSimulationDates
-by-NBrownians
-by-NTrials
3D time series array of dependent random variates used as the number of jumps.SizeJ
—NSimulationDates
-by-NBrownians
-by-NTrials
3D time series array of dependent random variates used as the jump sizes.
Data Types: struct
DividendType
— Dividend type
"continuous"
(default) | string with value "cash"
or
"continuous"
| character vector with value 'cash'
or
'continuous'
Dividend type, specified as a character vector or string.
DividendType
must be either
"cash"
for actual dollar dividends or
"continuous"
for a continuous dividend
yield.
Data Types: char
| string
DividendValue
— Dividend yield or dividend schedule for underlying stock
0
(default) | scalar numeric | timetable
Dividend yield for the underlying stock, specified as a scalar numeric for a dividend yield or a timetable for a dividend schedule.
Note
Specify a scalar if DividendType
is
"continuous"
and a timetable if
DividendType
is
"cash"
.
Data Types: double
| timetable
MonteCarloMethod
— Monte Carlo method to simulate stochastic processes
"standard"
(default) | string with values "standard"
,
"quasi"
, or
"randomized-quasi"
| character vector with values 'standard'
,
'quasi'
, or
'randomized-quasi'
Monte Carlo method to simulate stochastic processes, specified as a string or character vector with one of the following values:
"standard"
— Monte Carlo using pseudo random numbers."quasi"
— Quasi-Monte Carlo using low-discrepancy sequences."randomized-quasi"
— Randomized quasi-Monte Carlo.
For more information on quasi Monte Carlo simulations, see Quasi-Monte Carlo Simulation and for an example using
the 'MonteCarloMethod'
name-value argument, see
Use AssetMonteCarlo Pricer with Quasi-Monte Carlo Simulation and Heston Model to Price Asian Instrument.
Data Types: string
| char
BrownianMotionMethod
— Brownian motion construction method
"standard"
(default) | string with value "brownian-bridge"
or
"principal-components"
| character vector with value 'brownian-bridge'
or 'principal-components'
Brownian motion construction method, specified as a string or character vector with one of the following values:
"standard"
— The Brownian motion path is found by taking the cumulative sum of the Gaussian variates."brownian-bridge"
— The last step of the Brownian motion path is calculated first, followed by any order between steps until all steps have been determined."principal-components"
— The Brownian motion path is calculated by minimizing the approximation error.
The starting point for a Monte Carlo simulation is the construction of a Brownian motion sample path (or Wiener path). Such paths are built from a set of independent Gaussian variates, using either standard discretization, Brownian-bridge construction, or principal components construction.
Both standard discretization and Brownian-bridge construction
share the same variance, and therefore, the same resulting
convergence when used with the MonteCarloMethod
using pseudo random numbers. However, the performance differs
between the two when the MonteCarloMethod
option "quasi"
is introduced, with faster
convergence seen for "brownian-bridge"
construction option and the fastest convergence when using the
"principal-components"
construction
option.
For more information on quasi Monte Carlo simulations, see Quasi-Monte Carlo Simulation. For an example using the
'BrownianMotionMethod'
name-value argument,
see Use AssetMonteCarlo Pricer with Quasi-Monte Carlo Simulation and Heston Model to Price Asian Instrument.
Data Types: string
| char
Properties
DiscountCurve
— ratecurve
object for discounting cash flows
ratecurve
object
This property is read-only.
ratecurve
object for discounting cash flows, returned
as a ratecurve
object.
Data Types: object
Model
— Model
object
Model, returned as an object.
Data Types: object
SpotPrice
— Spot price of underlying asset
positive numeric
Spot price of the underlying asset, returned as a scalar positive numeric.
Data Types: double
SimulationDates
— Simulation dates
datetime
Simulation dates, returned as a datetime array.
Data Types: datetime
NumTrials
— Number of simulation trials
1000
(default) | scalar
Number of simulation trials, returned as a scalar number of independent sample paths.
Data Types: double
RandomNumbers
— Dependent random variates to generate Brownian motion vector
[]
(default) | structure
Dependent random variates to generate Brownian motion vector, returned as
an
NSimulationDates
-by-NBrownians
-by-NTrials
3D time series array.
Data Types: struct
DividendType
— Dividend type
"continuous"
(default) | string with value "cash"
or
"continuous"
This property is read-only.
Dividend type, returned as a string. DividendType
is
either "cash"
for actual dollar dividends or
"continuous"
for a continuous dividend yield.
Data Types: string
DividendValue
— Dividend yield or dividend schedule for underlying asset
0
(default) | scalar nonnegative numeric | timetable
Dividend yield or dividend schedule for the underlying asset, returned as a scalar numeric for a dividend yield or a timetable for a dividend schedule.
Data Types: double
| timetable
MonteCarloMethod
— Monte Carlo method to simulate stochastic processes
"standard"
(default) | string with values "standard"
,
"quasi"
, or
"randomized-quasi"
| character vector with values 'standard'
,
'quasi'
, or
'randomized-quasi'
Monte Carlo method to simulate stochastic processes, returned as a string or character vector.
Data Types: string
| char
BrownianMotionMethod
— Brownian motion construction method
"standard"
(default) | string with value "brownian-bridge"
or
"principal-components"
| character vector with value 'brownian-bridge'
or
'principal-components'
Brownian motion construction method, returned as a string or character vector.
Data Types: string
| char
Object Functions
price | Compute price for equity instrument with RoughVolMonteCarlo
pricer |
Examples
Use RoughVolMonteCarlo
Pricer and RoughBergomi
Model to Price Vanilla
Instrument
This example shows the workflow to price a Vanilla
instrument when you use a RoughBergomi
model and a RoughVolMonteCarlo
pricing method.
Create Vanilla
Instrument Object
Use fininstrument
to create a Vanilla
instrument object.
VanillaOpt = fininstrument("Vanilla",ExerciseDate=datetime(2019,1,30),Strike=105,ExerciseStyle="european",Name="vanilla_option")
VanillaOpt = Vanilla with properties: OptionType: "call" ExerciseStyle: "european" ExerciseDate: 30-Jan-2019 Strike: 105 Name: "vanilla_option"
Create RoughBergomi
Model Object
Use finmodel
to create a RoughBergomi
model object.
RoughBergomiModel = finmodel("RoughBergomi",Alpha=-0.032,Xi=0.1,Eta=0.003,RhoSV=0.9)
RoughBergomiModel = RoughBergomi with properties: Alpha: -0.0320 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 a RoughVolMonteCarlo
pricer object and use the ratecurve
object for the DiscountCurve
name-value pair argument.
outPricer = finpricer("RoughVolMonteCarlo",DiscountCurve=myRC,Model=RoughBergomiModel,SpotPrice=100,SimulationDates=datetime(2019,1,30))
outPricer = RoughBergomiMonteCarlo with properties: DiscountCurve: [1x1 ratecurve] SpotPrice: 100 SimulationDates: 30-Jan-2019 NumTrials: 1000 RandomNumbers: [] Model: [1x1 finmodel.RoughBergomi] DividendType: "continuous" DividendValue: 0 MonteCarloMethod: "standard" BrownianMotionMethod: "standard"
Price Vanilla
Instrument
Use price
to compute the price and sensitivities for the Vanilla
instrument.
[Price, outPR] = price(outPricer,VanillaOpt,"all")
Price = 7.7862
outPR = priceresult with properties: Results: [1x7 table] PricerData: [1x1 struct]
outPR.Results
ans=1×7 table
Price Delta Gamma Lambda Rho Theta Vega
______ _______ ________ ______ ______ ______ ______
7.7862 0.50369 0.012632 6.469 15.947 1.0273 30.741
Use RoughVolMonteCarlo
Pricer and RoughBergomi
Model to Price Asian
Instrument
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 a 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
Use RoughVolMonteCarlo
Pricer and RoughHeston
Model to Price Asian
Instrument
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
More About
Quasi-Monte Carlo Simulation
Quasi-Monte Carlo simulation is a Monte Carlo simulation that uses quasi-random sequences instead of pseudo random numbers.
The quasi-random sequences, also called low-discrepancy sequences, are deterministic, uniformly distributed sequences that are specifically designed to place sample points as uniformly as possible. In many cases, the distributed sequences improve the performance of Monte Carlo simulations with faster computational times and sometimes higher accuracy.
The standard Monte Carlo simulation using pseudo random numbers has a convergence rate of only O(N-1/2), while the quasi-Monte Carlo rate of convergence can be much faster with an error of O(N-1) in the best cases. For example, for a standard Monte Carlo simulation, it is necessary to increase 100 times the number of simulations NTrials to reduce the error by a factor of 10, whereas a quasi-Monte Carlo simulation requires less, or much less, than 100 times to achieve the same goal.
Quasi-Monte Carlo simulation produces a purely deterministic result. Therefore, when you compute the variance and constructing a confidence band for the estimates, randomized quasi-Monte Carlo simulation is useful because of faster computational times and sometimes higher accuracy. You can also use randomized quasi-Monte Carlo to introduce randomization into the low-discrepancy sequences.
The starting point for a Monte Carlo simulation is the construction of a Brownian motion sample path (or Wiener path). Such paths are built from a set of independent Gaussian variates, using either standard discretization, Brownian-bridge construction, or principal components construction.
For examples of using the MonteCarloMethod
and
BrownianMotionMethod
name-value arguments to perform
Quasi-Monte Carlo simulation with the AssetMonteCarlo
pricer, see
the following:
Version History
Introduced in R2024aR2024b: Support for RoughHeston
model
The RoughVolMonteCarlo
supports pricing with a RoughHeston
model.
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)