Main Content

PartialLookback

PartialLookback instrument

Description

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

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

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

  3. Choose a pricing method.

    • When using a BlackScholes model, use finpricer to specify a HeynenKat pricing method for one or more PartialLookback instruments.

    • When using a BlackScholes, Heston, Bates, or Merton model, use finpricer to specify an AssetMonteCarlo pricing method for one or more PartialLookback instruments.

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

Creation

Description

example

PartialLookbackObj = fininstrument(InstrumentType,'ExerciseDate',exercise_date,'Strike',strike_value,'MonitorDate',monitor_date) creates a PartialLookback object for one or more Partial Lookback instruments by specifying InstrumentType and sets the properties for the required name-value pair arguments Strike, ExerciseDate, and MonitorDate.

The PartialLookback instrument supports fixed-strike and floating-strike partial lookback options. To compute the value of a floating-strike partial lookback option, the Strike must be specified as NaN. For more information on a PartialLookback instrument, see More About.

example

PartialLookbackObj = 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(2022,1,30),'MonitorDate',datetime(2021,1,30),'OptionType',"put",'ExerciseStyle',"European",'Name',"partial_lookback_option") creates a PartialLookback 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 "PartialLookback", a character vector with the value of 'PartialLookback', an NINST-by-1 string array with values of "PartialLookback", or an NINST-by-1 cell array of character vectors with values of 'PartialLookback'.

Data Types: char | cell | string

PartialLookback 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 or an NINST-by-1 vector of nonnegative values for a fixed-strike PartialLookback option. For a floating-strike partial lookback option, specify 'Strike' as a NaN or an NINST-by-1 vector of NaNs.

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

Predetermined lookback monitoring date, specified as the comma-separated pair consisting of 'MonitorDate' 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.

  • For a fixed-strike partial lookback, the monitoring period is [MonitorDate, ExerciseDate]. The MonitorDate is the start date for a fixed-strike partial lookback option.

  • For a floating-strike partial lookback, the monitoring period is [Settle, MonitorDate], where Settle is < MonitorDate < ExerciseDate. The MonitorDate is the end date for a floating-strike partial lookback option.

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 PartialLookback 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

Degree of partiality for a floating-strike partial lookback, specified as the comma-separated pair consisting of 'StrikeScaler' and a scalar numeric or an NINST-by-1 numeric vector. The StrikeScaler value indicates the percentage of the Strike that is fixed above or below the AssetMinMax value.

  • For a call floating-strike partial lookback, the StrikeScaler is ≥ 1.

  • For a put floating-strike partial lookback, 0 < StrikeScaler ≤ 1.

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 scalar datetime or an NINST-by-1 vector of datetimes.

Data Types: datetime

Predetermined monitoring 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 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

Degree of partiality for partial floating-strike lookback, returned as a scalar numeric or an NINST-by-1 numeric vector.

Data Types: double

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

Data Types: string

Examples

collapse all

This example shows the workflow to price a floating-strike PartialLookback instrument when you use a BlackScholes model and a HeynenKat pricing method.

Create PartialLookback Instrument Object

Use fininstrument to create an PartialLookback instrument object.

PartialLookbackOpt = fininstrument("PartialLookback",'ExerciseDate',datetime(2022,9,15),'Strike',NaN,'StrikeScaler', 0.75, 'MonitorDate',datetime(2021,9,15),'OptionType',"put",'ExerciseStyle',"european",'AssetMinMax', 98,'Name',"partial_lookback_option")
PartialLookbackOpt = 
  PartialLookback with properties:

      MonitorDate: 15-Sep-2021
     StrikeScaler: 0.7500
       OptionType: "put"
           Strike: NaN
      AssetMinMax: 98
    ExerciseStyle: "european"
     ExerciseDate: 15-Sep-2022
             Name: "partial_lookback_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

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

     Volatility: 0.3200
    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 HeynenKat Pricer Object

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

outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',100,'DividendType',"continuous",'DividendValue',.05,'PricingMethod',"HeynenKat")
outPricer = 
  HeynenKat with properties:

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

Price PartialLookback Instrument

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

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

       Results: [1x7 table]
    PricerData: []

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

    24.815    0.27297    0.012438     1.1      131.33    -5.0942    -193.51

This example shows the workflow to price multiple floating-strike PartialLookback instruments when you use a BlackScholes model and a HeynenKat pricing method.

Create PartialLookback Instrument Object

Use fininstrument to create an PartialLookback instrument object for three Partial Lookback instruments.

PartialLookbackOpt = fininstrument("PartialLookback",'ExerciseDate',datetime([2022,9,15 ; 2022,10,15 ; 2022,11,15]),'Strike',NaN,'StrikeScaler', 0.75, 'MonitorDate',datetime([2021,9,15 ; 2021,10,15 ; 2021,11,15]),'OptionType',"put",'ExerciseStyle',"european",'AssetMinMax', 98,'Name',"partial_lookback_option")
PartialLookbackOpt=3×1 object
  3x1 PartialLookback array with properties:

    MonitorDate
    StrikeScaler
    OptionType
    Strike
    AssetMinMax
    ExerciseStyle
    ExerciseDate
    Name

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

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

     Volatility: 0.3200
    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 HeynenKat Pricer Object

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

outPricer = finpricer("analytic",'Model',BlackScholesModel,'DiscountCurve',myRC,'SpotPrice',100,'DividendType',"continuous",'DividendValue',.05,'PricingMethod',"HeynenKat")
outPricer = 
  HeynenKat with properties:

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

Price PartialLookback Instruments

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

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

   24.8148
   25.2306
   25.6545

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

    Results
    PricerData

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

    24.815    0.27297    0.012438     1.1      131.33    -5.0942    -193.51

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

    25.231    0.27694    0.012349    1.0976    133.05    -5.0265    -198.37

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

    25.655    0.28099    0.012264    1.0953    134.81    -4.9578    -203.4

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

Create PartialLookback Instrument Object

Use fininstrument to create an PartialLookback instrument object.

PartialLookbackOpt = fininstrument("PartialLookback",'ExerciseDate',datetime(2022,9,15),'Strike',102, 'MonitorDate',datetime(2021,9,15),'OptionType',"call",'ExerciseStyle',"european",'Name',"partial_lookback_option")
PartialLookbackOpt = 
  PartialLookback with properties:

      MonitorDate: 15-Sep-2021
     StrikeScaler: 1
       OptionType: "call"
           Strike: 102
      AssetMinMax: NaN
    ExerciseStyle: "european"
     ExerciseDate: 15-Sep-2022
             Name: "partial_lookback_option"

Create Heston Model Object

Use finmodel to create a Hestone model object.

HestonModel = finmodel("Heston",'V0',0.032,'ThetaV',0.1,'Kappa',0.003,'SigmaV',0.2,'RhoSV',-0.9)
HestonModel = 
  Heston with properties:

        V0: 0.0320
    ThetaV: 0.1000
     Kappa: 0.0030
    SigmaV: 0.2000
     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 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",HestonModel,'SpotPrice',100,'simulationDates',Settle+calmonths(1):calmonths(1):datetime(2022,9,15))
outPricer = 
  HestonMonteCarlo with properties:

      DiscountCurve: [1x1 ratecurve]
          SpotPrice: 100
    SimulationDates: [15-Oct-2018    15-Nov-2018    15-Dec-2018    ...    ]
          NumTrials: 1000
      RandomNumbers: []
              Model: [1x1 finmodel.Heston]
       DividendType: "continuous"
      DividendValue: 0

Price PartialLookback Instrument

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

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

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

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

    19.948    0.93159    0.0084898    4.6701    283.87    1.9218    48.04    2.666 

More About

expand all

Introduced in R2021b