Main Content

Lookback

Lookback instrument

Description

Create and price a Lookback instrument object for one or more Lookback instruments using this workflow:

  1. Use fininstrument to create a Lookback instrument object for one or more Lookback instruments.

  2. Use finmodel to specify a BlackScholes, Heston, Bates, or Merton model for the Lookback 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 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 for one or more Lookback instruments by specifying InstrumentType and sets the properties for the required name-value pair arguments Strike and ExerciseDate.

The Lookback instrument supports fixed-strike 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", a character vector with the value of 'Lookback', an NINST-by-1 string array with values "Lookback", or an NINST-by-1 cell array of character vectors with values of 'Lookback'.

Data Types: char | cell | 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 or an NINST-by-1 vector of nonnegative values for a fixed-strike Lookback option. For a floating-strike Lookback option, specify 'Strike' as a NaN or an NINST-by-1 vector of NaNs.

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, date string or an NINST-by-1 vector of datetimes, serial date numbers, cell array of date character vectors, or date string array.

Note

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

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

Data Types: double | char | cell | 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 or an NINST-by-1 cell array of character vectors or string array.

Data Types: char | cell | string

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 | cell | char

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

Data Types: double

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 numeric or an NINST-by-1 vector of nonnegative values.

Data Types: double

Option exercise date, returned as a 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 or an NINST-by-1 string array with values of "European" or "American".

Data Types: string

Maximum or minimum underlying asset price, returned as a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

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 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 multiple 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 for three Lookback instruments.

LookbackOpt = fininstrument("Lookback",'Strike',[105 ; 120; 140],'ExerciseDate',datetime([2022,9,15 ; 2022,10,15 ; 2022,11,15]),'OptionType',"put",'ExerciseStyle',"european",'Name',"lookback_option")
LookbackOpt=3×1 object
  3x1 Lookback array with properties:

    OptionType
    Strike
    AssetMinMax
    ExerciseStyle
    ExerciseDate
    Name

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 Instruments

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

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

   57.8786
   71.3008
   88.9673

outPR=3×1 object
  3x1 priceresult array with properties:

    Results
    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

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

    71.301    -0.32722    2.8422e-06    -0.45894    31.997    -4.5677    -410.15

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

    88.967    -0.32033    1.4211e-06    -0.36005    31.395    -3.7989    -489.96

This example shows the workflow to price a LookBack instrument when you use an BlackScholes model and an AssetTree 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 AssetTree Pricer Object

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

NumPeriods = 15;
LRPricer = finpricer("AssetTree",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',150,'PricingMethod',"LeisenReimer",'Maturity',datetime(2022,9,15),'NumPeriods',NumPeriods)
LRPricer = 
  LRTree with properties:

    InversionMethod: PP1
             Strike: 150
               Tree: [1x1 struct]
         NumPeriods: 15
              Model: [1x1 finmodel.BlackScholes]
      DiscountCurve: [1x1 ratecurve]
          SpotPrice: 150
       DividendType: "continuous"
      DividendValue: 0
          TreeDates: [21-Dec-2018 09:36:00    28-Mar-2019 19:12:00    ...    ]

LRPricer.Tree
ans = struct with fields:
    Probs: [2x15 double]
    ATree: {1x16 cell}
     dObs: [15-Sep-2018 00:00:00    21-Dec-2018 09:36:00    ...    ]
     tObs: [0 0.2667 0.5333 0.8000 1.0667 1.3333 1.6000 1.8667 2.1333 ... ]

Price Lookback Instrument

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

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

       Results: [1x7 table]
    PricerData: []

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

    3.9412    -0.13312    -0.011131    67.684    -5.0757    -73.857    -1.0383

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