Main Content

Asian

Asian instrument object

Since R2020a

Description

Create and price an Asian instrument object for one ore more Asian instruments using this workflow:

  1. Use fininstrument to create an Asian instrument object for one or more Asian instruments.

  2. Use finmodel to specify a BlackScholes, Heston, Bates, RoughBergomi, RoughHeston, or Merton model for the Asian instrument object.

  3. Choose a pricing method.

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 models and pricing methods for an Asian instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

AsianOpt = fininstrument(InstrumentType,'Strike',strike_price,'ExerciseDate',exercise_date) creates an Asian instrument object for one or more Asian instruments by specifying InstrumentType and sets the properties for the required name-value pair arguments Strike and ExerciseDate.

The Asian instrument supports arithmetic and geometric, fixed-strike, and floating-strike Asian options.

example

AsianOpt = fininstrument(___,Name,Value) sets optional properties using additional name-value pairs in addition to the required arguments in the previous syntax. For example, AsianOpt = fininstrument("Asian",'Strike',100,'ExerciseDate',datetime(2019,1,30),'OptionType',"put",'ExerciseStyle',"European",'Name',"asian_option") creates an Asian put option with an European exercise. You can specify multiple name-value pair arguments.

example

Input Arguments

expand all

Instrument type, specified as a string with the value of "Asian", a character vector with the value of 'Asian', an NINST-by-1 string array with values of "Asian", or an NINST-by-1 cell array of character vectors with values of 'Asian'.

Data Types: string | char | cell

Name-Value Arguments

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.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: AsianOpt = fininstrument("Asian",'Strike',100,'ExerciseDate',datetime(2019,1,30),'OptionType',"put",'ExerciseStyle',"European",'Name',"asian_option")

Required Asian Name-Value Pair Arguments

expand all

Option strike price value, specified as the comma-separated pair consisting of 'Strike' and a scalar nonnegative value or an NINST-by-1 vector of nonnegative values.

Data Types: double

Option exercise date, specified as the comma-separated pair consisting of 'ExerciseDate' and a scalar or an NINST-by-1 vector using a datetime array, string array, or date character vectors.

Note

For an Asian European option, there is only one ExerciseDate on the option expiry date.

To support existing code, Asian also accepts serial date numbers as inputs, but they are not recommended.

If you use date character vectors or strings, the format must be recognizable by datetime because the ExerciseDate property is stored as a datetime.

Optional Asian Name-Value Pair Arguments

expand all

Option type, specified as the comma-separated pair consisting of 'OptionType' and a scalar character vector or string or an NINST-by-1 cell array of character vectors or string array.

Data Types: char | string | cell

Option exercise style, specified as the comma-separated pair consisting of 'ExerciseStyle' and a scalar string or character vector or an NINST-by-1 cell array of character vectors or string array.

Data Types: string | char | cell

Average types, specified as the comma-separated pair consisting of 'AverageType' and a scalar string or character vector or an NINST-by-1 cell array of character vectors or string array. Use "arithmetic" for an arithmetic average, or "geometric" for a geometric average.

Note

When you use a RollGeskeWhaley pricer, the AverageType must be "geometric".

Data Types: char | cell | string

Average price of the underlying asset, specified as the comma-separated pair consisting of 'AveragePrice' and a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Start date of averaging period, specified as the comma-separated pair consisting of 'AverageStartDate' and a scalar or an NINST-by-1 vector using a datetime array, string array, or date character vectors.

To support existing code, Asian also accepts serial date numbers as inputs, but they are not recommended.

If you use date character vectors or strings, the format must be recognizable by datetime because the AverageStartDate property is stored as a datetime.

User-defined name for one of more instruments, specified as the comma-separated pair consisting of 'Name' and a scalar string or character vector or an NINST-by-1 cell array of character vectors or string array.

Data Types: char | cell | string

Properties

expand all

Option strike price value, returned as a scalar nonnegative value or an NINST-by-1 vector of nonnegative values.

Data Types: double

Option exercise date, returned as a scalar datetime or an NINST-by-1 vector of datetimes.

Data Types: datetime

Option type, returned as a scalar string or an NINST-by-1 string array with the values of "call" or "put".

Data Types: string

Option exercise style, returned as a scalar string with the value "European" or NINST-by-1 string array.

Data Types: string

Average types, returned as a scalar string with the value "arithmetic" for arithmetic average or "geometric" for geometric average or an NINST-by-1 string array.

Data Types: string

Average price of underlying asset at Settle, returned as a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

Start date of averaging period, returned as a scalar datetime or an NINST-by-1 vector of datetimes.

Data Types: datetime

User-defined name for the instrument, returned as a string or an NINST-by-1 string array.

Data Types: string

Examples

collapse all

This example shows the workflow to price a fixed-strike Asian instrument when you use a BlackScholes model and a TurnbullWakeman pricing method.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',1000,'OptionType',"put",'Name',"asian_option")
AsianOpt = 
  Asian with properties:

          OptionType: "put"
              Strike: 1000
         AverageType: "arithmetic"
        AveragePrice: 0
    AverageStartDate: NaT
       ExerciseStyle: "european"
        ExerciseDate: 15-Sep-2022
                Name: "asian_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',.2)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.2000
    Correlation: 1

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 TurnbullWakeman Pricer Object

Use finpricer to create a TurnbullWakeman pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("analytic",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',1000,'PricingMethod',"TurnbullWakeman")
outPricer = 
  TurnbullWakeman with properties:

    DiscountCurve: [1x1 ratecurve]
            Model: [1x1 finmodel.BlackScholes]
        SpotPrice: 1000
    DividendValue: 0
     DividendType: "continuous"

Price Asian Instrument

Use price to compute the price and sensitivities for the Asian instrument.

[Price, outPR] = price(outPricer,AsianOpt,["all"])
Price = 
56.7068
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: []

outPR.Results 
ans=1×7 table
    Price      Delta       Gamma      Lambda      Vega      Theta       Rho  
    ______    _______    _________    _______    ______    _______    _______

    56.707    -0.3155    0.0014381    -5.5637    408.85    -2.9341    -832.53

This example shows the workflow to price multiple fixed-strike Asian instruments when you use a BlackScholes model and a TurnbullWakeman pricing method.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object for three Asian instruments.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime([2022,9,15; 2022,10,15; 2022,11,15]),'Strike',[1000 ; 2000 ; 3000],'OptionType',"put",'Name',"asian_option")
AsianOpt=3×1 Asian array with properties:
    OptionType
    Strike
    AverageType
    AveragePrice
    AverageStartDate
    ExerciseStyle
    ExerciseDate
    Name

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',.2)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.2000
    Correlation: 1

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 TurnbullWakeman Pricer Object

Use finpricer to create a TurnbullWakeman pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("analytic",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',1000,'PricingMethod',"TurnbullWakeman")
outPricer = 
  TurnbullWakeman with properties:

    DiscountCurve: [1x1 ratecurve]
            Model: [1x1 finmodel.BlackScholes]
        SpotPrice: 1000
    DividendValue: 0
     DividendType: "continuous"

Price Asian Instruments

Use price to compute the prices and sensitivities for the Asian instruments.

[Price, outPR] = price(outPricer,AsianOpt,["all"])
Price = 3×1
103 ×

    0.0567
    0.8023
    1.6624

outPR=3×1 priceresult array with properties:
    Results
    PricerData

outPR.Results 
ans=1×7 table
    Price      Delta       Gamma      Lambda      Vega      Theta       Rho  
    ______    _______    _________    _______    ______    _______    _______

    56.707    -0.3155    0.0014381    -5.5637    408.85    -2.9341    -832.53

ans=1×7 table
    Price      Delta        Gamma       Lambda      Vega     Theta       Rho  
    ______    ________    __________    _______    ______    ______    _______

    802.32    -0.92568    7.9581e-05    -1.1537    20.935    44.139    -5206.3

ans=1×7 table
    Price      Delta        Gamma        Lambda       Vega      Theta       Rho  
    ______    ________    __________    ________    ________    ______    _______

    1662.4    -0.93048    4.5475e-05    -0.55973    0.093861    74.863    -8911.1

This example shows the workflow to price a fixed-strike Asian instrument when you use a BlackScholes model and an AssetTree pricing method for a Cox-Ross-Rubinstein (CRR) binomial tree.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',1000,'OptionType',"put",'Name',"asian_option")
AsianOpt = 
  Asian with properties:

          OptionType: "put"
              Strike: 1000
         AverageType: "arithmetic"
        AveragePrice: 0
    AverageStartDate: NaT
       ExerciseStyle: "european"
        ExerciseDate: 15-Sep-2022
                Name: "asian_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',0.2)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.2000
    Correlation: 1

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 AssetTree Pricer Object

Use finpricer to create an AssetTree pricer object for a CRR equity tree and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

NumPeriods = 15;
CRRPricer = finpricer("AssetTree",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',1000,'PricingMethod',"CoxRossRubinstein",'Maturity',datetime(2022,9,15),'NumPeriods',NumPeriods)
CRRPricer = 
  CRRTree with properties:

             Tree: [1x1 struct]
       NumPeriods: 15
            Model: [1x1 finmodel.BlackScholes]
    DiscountCurve: [1x1 ratecurve]
        SpotPrice: 1000
     DividendType: "continuous"
    DividendValue: 0
        TreeDates: [21-Dec-2018 09:36:00    28-Mar-2019 19:12:00    04-Jul-2019 04:48:00    09-Oct-2019 14:24:00    15-Jan-2020 00:00:00    21-Apr-2020 09:36:00    27-Jul-2020 19:12:00    02-Nov-2020 04:48:00    ...    ] (1x15 datetime)

CRRPricer.Tree
ans = struct with fields:
    Probs: [2x15 double]
    ATree: {1x16 cell}
     dObs: [15-Sep-2018 00:00:00    21-Dec-2018 09:36:00    28-Mar-2019 19:12:00    04-Jul-2019 04:48:00    09-Oct-2019 14:24:00    15-Jan-2020 00:00:00    21-Apr-2020 09:36:00    27-Jul-2020 19:12:00    02-Nov-2020 04:48:00    ...    ] (1x16 datetime)
     tObs: [0 0.2667 0.5333 0.8000 1.0667 1.3333 1.6000 1.8667 2.1333 2.4000 2.6667 2.9333 3.2000 3.4667 3.7333 4]

Price Asian Instrument

Use price to compute the price and sensitivities for the Asian instrument.

[Price, outPR] = price(CRRPricer,AsianOpt,["all"])
Price = 
54.9225
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: []

outPR.Results 
ans=1×7 table
    Price      Delta      Gamma      Vega     Lambda       Rho       Theta 
    ______    ________    ______    ______    _______    _______    _______

    54.922    -0.32119    0.0581    393.85    -5.8481    -846.57    -2.4325

This example shows the workflow to price a fixed-strike Asian instrument when you use a BlackScholes model and an AssetTree pricing method for a Standard Trinomial (STT) tree.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',1000,'OptionType',"put",'Name',"asian_option")
AsianOpt = 
  Asian with properties:

          OptionType: "put"
              Strike: 1000
         AverageType: "arithmetic"
        AveragePrice: 0
    AverageStartDate: NaT
       ExerciseStyle: "european"
        ExerciseDate: 15-Sep-2022
                Name: "asian_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',0.2)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.2000
    Correlation: 1

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 AssetTree Pricer Object

Use finpricer to create an AssetTree pricer object for a Standard Trinomial tree and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

NumPeriods = 15;
STTPricer = finpricer("AssetTree",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',1000,'PricingMethod',"StandardTrinomial",'Maturity',datetime(2022,9,15),'NumPeriods',NumPeriods)
STTPricer = 
  STTree with properties:

             Tree: [1x1 struct]
       NumPeriods: 15
            Model: [1x1 finmodel.BlackScholes]
    DiscountCurve: [1x1 ratecurve]
        SpotPrice: 1000
     DividendType: "continuous"
    DividendValue: 0
        TreeDates: [21-Dec-2018 09:36:00    28-Mar-2019 19:12:00    04-Jul-2019 04:48:00    09-Oct-2019 14:24:00    15-Jan-2020 00:00:00    21-Apr-2020 09:36:00    27-Jul-2020 19:12:00    02-Nov-2020 04:48:00    ...    ] (1x15 datetime)

STTPricer.Tree
ans = struct with fields:
    ATree: {1x16 cell}
    Probs: {[3x1 double]  [3x3 double]  [3x5 double]  [3x7 double]  [3x9 double]  [3x11 double]  [3x13 double]  [3x15 double]  [3x17 double]  [3x19 double]  [3x21 double]  [3x23 double]  [3x25 double]  [3x27 double]  [3x29 double]}
     dObs: [15-Sep-2018 00:00:00    21-Dec-2018 09:36:00    28-Mar-2019 19:12:00    04-Jul-2019 04:48:00    09-Oct-2019 14:24:00    15-Jan-2020 00:00:00    21-Apr-2020 09:36:00    27-Jul-2020 19:12:00    02-Nov-2020 04:48:00    ...    ] (1x16 datetime)
     tObs: [0 0.2667 0.5333 0.8000 1.0667 1.3333 1.6000 1.8667 2.1333 2.4000 2.6667 2.9333 3.2000 3.4667 3.7333 4]

Price Asian Instrument

Use price to compute the price and sensitivities for the Asian instrument.

[Price, outPR] = price(STTPricer,AsianOpt,["all"])
Price = 
54.2450
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: []

outPR.Results 
ans=1×7 table
    Price      Delta       Gamma       Vega     Lambda       Rho       Theta 
    ______    ________    ________    ______    _______    _______    _______

    54.245    -0.32307    0.075269    390.55    -5.9558    -839.02    -2.4161

This example shows the workflow to price an Asian instrument for an arithmetic average currency option when you use a BlackScholes model and a Levy pricing method. Assume that the current exchange rate is $0.52 and has a volatility of 12% per annum. The annualized continuously compounded foreign risk-free rate is 8% per annum.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',0.65,'OptionType',"put",'ExerciseStyle',"european",'Name',"asian_fx_option")
AsianOpt = 
  Asian with properties:

          OptionType: "put"
              Strike: 0.6500
         AverageType: "arithmetic"
        AveragePrice: 0
    AverageStartDate: NaT
       ExerciseStyle: "european"
        ExerciseDate: 15-Sep-2022
                Name: "asian_fx_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

Sigma = .12;
BlackScholesModel = finmodel("BlackScholes",'Volatility',Sigma)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.1200
    Correlation: 1

Create ratecurve Object

Create a 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 Levy Pricer Object

Use finpricer to create a Levy pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument. When you price currencies using an Asian instrument for an arithmetic average currency option, the DividendType must be 'continuous' and DividendValue is the annualized risk-free interest rate in the foreign country.

ForeignRate = 0.08;
outPricer = finpricer("analytic",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',.52,'DividendType',"continuous",'DividendValue',ForeignRate,'PricingMethod',"Levy")
outPricer = 
  Levy with properties:

    DiscountCurve: [1x1 ratecurve]
            Model: [1x1 finmodel.BlackScholes]
        SpotPrice: 0.5200
    DividendValue: 0.0800
     DividendType: "continuous"

Price Asian FX Instrument

Use price to compute the price and sensitivities for the Asian FX instrument.

[Price, outPR] = price(outPricer,AsianOpt,["all"])
Price = 
0.1516
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: []

outPR.Results 
ans=1×7 table
     Price      Delta       Gamma     Lambda       Vega        Theta         Rho  
    _______    ________    _______    _______    ________    __________    _______

    0.15161    -0.78532    0.37534    -2.6935    0.015668    -0.0038317    -1.3974

This example shows the workflow to price a fixed-strike Asian instrument when you use a BlackScholes model and an AssetMonteCarlo pricing method.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',1000,'OptionType',"put",'Name',"asian_option")
AsianOpt = 
  Asian with properties:

          OptionType: "put"
              Strike: 1000
         AverageType: "arithmetic"
        AveragePrice: 0
    AverageStartDate: NaT
       ExerciseStyle: "european"
        ExerciseDate: 15-Sep-2022
                Name: "asian_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

BlackScholesModel = finmodel("BlackScholes",'Volatility',0.2)
BlackScholesModel = 
  BlackScholes with properties:

     Volatility: 0.2000
    Correlation: 1

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 AssetMonteCarlo Pricer Object

Use finpricer to create an AssetMonteCarlo pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("AssetMonteCarlo",'DiscountCurve',myRC,"Model",BlackScholesModel,'SpotPrice',200,'simulationDates',datetime(2022,9,15))
outPricer = 
  GBMMonteCarlo with properties:

           DiscountCurve: [1x1 ratecurve]
               SpotPrice: 200
         SimulationDates: 15-Sep-2022
               NumTrials: 1000
           RandomNumbers: []
                   Model: [1x1 finmodel.BlackScholes]
            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 = 
682.3365
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: [1x1 struct]

outPR.Results 
ans=1×7 table
    Price      Delta         Gamma        Lambda       Rho      Theta      Vega  
    ______    ________    ___________    ________    _______    ______    _______

    682.34    -0.93511    -5.6843e-14    -0.27409    -3129.1    27.433    -1.2121

This example shows the workflow to price a fixed-strike Asian instrument when you use a Merton model and an AssetMonteCarlo pricing method.

Create Asian Instrument Object

Use fininstrument to create an Asian instrument object.

AsianOpt = fininstrument("Asian",'ExerciseDate',datetime(2022,9,15),'Strike',1000,'OptionType',"put",'Name',"asian_option")
AsianOpt = 
  Asian with properties:

          OptionType: "put"
              Strike: 1000
         AverageType: "arithmetic"
        AveragePrice: 0
    AverageStartDate: NaT
       ExerciseStyle: "european"
        ExerciseDate: 15-Sep-2022
                Name: "asian_option"

Create Merton Model Object

Use finmodel to create a Merton model 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

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 AssetMonteCarlo Pricer Object

Use finpricer to create an AssetMonteCarlo pricer object and use the ratecurve object for the 'DiscountCurve' name-value pair argument.

outPricer = finpricer("AssetMonteCarlo",'DiscountCurve',myRC,"Model",MertonModel,'SpotPrice',200,'simulationDates',datetime(2022,9,15))
outPricer = 
  MertonMonteCarlo with properties:

           DiscountCurve: [1x1 ratecurve]
               SpotPrice: 200
         SimulationDates: 15-Sep-2022
               NumTrials: 1000
           RandomNumbers: []
                   Model: [1x1 finmodel.Merton]
            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 = 
682.8127
outPR = 
  priceresult with properties:

       Results: [1x7 table]
    PricerData: [1x1 struct]

outPR.Results 
ans=1×7 table
    Price      Delta      Gamma     Lambda       Rho      Theta     Vega 
    ______    ________    _____    ________    _______    _____    ______

    682.81    -0.90665      0      -0.26556    -3110.3    25.98    19.316

Since R2024a

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

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

expand all

Version History

Introduced in R2020a

expand all