Main Content

Lookback

Lookback instrument

Description

Create and price a Lookback instrument object using this workflow:

  1. Use fininstrument to create a Lookback instrument object.

  2. Use finmodel to specify a BlackScholes, Heston, Bates, or Merton model for the Lookback instrument.

  3. When using a BlackScholes model, use finpricer to specify a ConzeViswanathan or GoldmanSosinGatto pricing method for the Lookback instrument.

    When using a BlackScholes, Heston, Bates, or Merton model, use finpricer to specify an AssetMonteCarlo pricing method for the Lookback instrument.

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 a Lookback instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

LookbackObj = fininstrument(InstrumentType,'Strike',strike_value,'ExerciseDate',exercise_date) creates a Lookback object by specifying InstrumentType and sets the properties for the required name-value pair arguments Strike and ExerciseDate.

The Lookback instrument supports fixed and floating strike lookback options. For more information on a Lookback instrument, see More About.

example

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

Input Arguments

expand all

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

Data Types: char | string

Lookback Name-Value Pair Arguments

Specify required and optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: LookbackObj = fininstrument("Lookback",'Strike',100,'ExerciseDate',datetime(2019,1,30),'OptionType',"put",'ExerciseStyle',"European",'Name',"lookback_option")
Required Lookback Name-Value Pair Arguments

expand all

Option strike price value, specified as the comma-separated pair consisting of 'Strike' and a scalar nonnegative numeric value for a fixed strike Lookback option or a NaN for a floating strike Lookback option.

Note

Use the ConzeViswanathan pricer for a fixed strike Lookback option and use the GoldmanSosinGatto pricer for a floating strike Lookback option.

Data Types: double

Option exercise date, specified as the comma-separated pair consisting of 'ExerciseDate' and a scalar datetime, serial date number, date character vector, or date string.

Note

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

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

Data Types: double | char | string | datetime

Optional Lookback Name-Value Pair Arguments

expand all

Option type, specified as the comma-separated pair consisting of 'OptionType' and a scalar string or character vector.

Data Types: char | string

Option exercise style, specified as the comma-separated pair consisting of 'ExerciseStyle' and a scalar string or character vector.

Data Types: string | char

Maximum or minimum underlying asset price, specified as the comma-separated pair consisting of 'AssetMinMax' and a scalar numeric.

Data Types: double

User-defined name for the instrument, specified as the comma-separated pair consisting of 'Name' and a scalar string or character vector.

Data Types: char | string

Properties

expand all

Option strike price value, returned as a scalar nonnegative numeric.

Data Types: double

Option exercise date, returned as a datetime.

Data Types: datetime

Option type, returned as a string with a value of "call" or "put".

Data Types: string

Option exercise style, returned as a string with a value of "European".

Data Types: string

Maximum or minimum underlying asset price, returned as a scalar numeric.

Data Types: double

User-defined name for the instrument, returned as a string.

Data Types: string

Examples

collapse all

This example shows the workflow to price a LookBack instrument when you use a BlackScholes model and a ConzeViswanathan pricing method.

Create Lookback Instrument Object

Use fininstrument to create a Lookback instrument object.

LookbackOpt = fininstrument("Lookback",'Strike',105,'ExerciseDate',datetime(2022,9,15),'OptionType',"put",'ExerciseStyle',"european",'Name',"lookback_option")
LookbackOpt = 
  Lookback with properties:

       OptionType: "put"
           Strike: 105
      AssetMinMax: NaN
    ExerciseStyle: "european"
     ExerciseDate: 15-Sep-2022
             Name: "lookback_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 ConzeViswanathan Pricer Object

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

outPricer = finpricer("analytic","Model",BlackScholesModel,"DiscountCurve",myRC,"SpotPrice",100,"DividendValue",0.25,"DividendType","continuous","PricingMethod","ConzeViswanathan")
outPricer = 
  ConzeViswanathan with properties:

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

Price Lookback Instrument

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

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

       Results: [1x7 table]
    PricerData: []

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

    57.879    -0.33404      0      -0.57714    32.587    -5.1863    -350.41

This example shows the workflow to price a LookBack instrument when you use a BlackScholes model and an AssetMonetCarlo pricing method.

Create Lookback Instrument Object

Use fininstrument to create a Lookback instrument object.

LookbackOpt = fininstrument("Lookback",'Strike',105,'ExerciseDate',datetime(2022,9,15),'OptionType',"put",'ExerciseStyle',"european",'Name',"lookback_option")
LookbackOpt = 
  Lookback with properties:

       OptionType: "put"
           Strike: 105
      AssetMinMax: NaN
    ExerciseStyle: "european"
     ExerciseDate: 15-Sep-2022
             Name: "lookback_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

Price Lookback Instrument

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

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

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

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

    1.8553    -0.040442    0.00062792    -4.3596    -39.426    -0.71345    42.311

This example shows the workflow to price a LookBack instrument when you use a Bates model and an AssetMonetCarlo pricing method.

Create Lookback Instrument Object

Use fininstrument to create a Lookback instrument object.

LookbackOpt = fininstrument("Lookback",'Strike',105,'ExerciseDate',datetime(2022,9,15),'OptionType',"put",'ExerciseStyle',"european",'Name',"lookback_option")
LookbackOpt = 
  Lookback with properties:

       OptionType: "put"
           Strike: 105
      AssetMinMax: NaN
    ExerciseStyle: "european"
     ExerciseDate: 15-Sep-2022
             Name: "lookback_option"

Create Bates Model Object

Use finmodel to create a Bates model object.

BatesModel = finmodel("Bates",'V0',0.032,'ThetaV',0.1,'Kappa',0.003,'SigmaV',0.2,'RhoSV',0.9,'MeanJ',0.11,'JumpVol',.023,'JumpFreq',0.02)
BatesModel = 
  Bates with properties:

          V0: 0.0320
      ThetaV: 0.1000
       Kappa: 0.0030
      SigmaV: 0.2000
       RhoSV: 0.9000
       MeanJ: 0.1100
     JumpVol: 0.0230
    JumpFreq: 0.0200

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",BatesModel,'SpotPrice',100,'simulationDates',datetime(2022,9,15))
outPricer = 
  BatesMonteCarlo with properties:

      DiscountCurve: [1x1 ratecurve]
          SpotPrice: 100
    SimulationDates: 15-Sep-2022
          NumTrials: 1000
      RandomNumbers: []
              Model: [1x1 finmodel.Bates]
       DividendType: "continuous"
      DividendValue: 0

Price Lookback Instrument

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

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

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

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

    7.3592    -0.83923    -3.5527e-15    -11.404    -29.431    -0.030786    31.941    0.71394

More About

expand all

Introduced in R2020a