Main Content

PartialLookback

PartialLookback instrument

Since R2021b

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

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 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 arguments 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 arguments.

example

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

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.

Example: LookbackObj = fininstrument("Lookback",Strike=100,ExerciseDate=datetime(2022,1,30),MonitorDate=datetime(2021,1,30),OptionType="put",ExerciseStyle="European",Name="partial_lookback_option")

Required Lookback Name-Value Arguments

expand all

Option strike price value, specified as 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 ExerciseDate and a scalar or an NINST-by-1 vector using a datetime array, string array, or date character vectors.

Note

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

To support existing code, PartialLookback 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.

Predetermined lookback monitoring date, specified as MonitorDate and a scalar or an NINST-by-1 vector using a datetime array, string array, or date character vectors.

  • 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.

To support existing code, PartialLookback 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 PartialLookback Name-Value Arguments

expand all

Option type, specified as 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 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 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 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 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 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=0.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 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    15-Jan-2019    15-Feb-2019    15-Mar-2019    15-Apr-2019    15-May-2019    15-Jun-2019    15-Jul-2019    15-Aug-2019    15-Sep-2019    15-Oct-2019    ...    ] (1x48 datetime)
               NumTrials: 1000
           RandomNumbers: []
                   Model: [1x1 finmodel.Heston]
            DividendType: "continuous"
           DividendValue: 0
        MonteCarloMethod: "standard"
    BrownianMotionMethod: "standard"

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 

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

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 argument and use the name-value arguments for MonteCarloMethod and BrownianMotionMethod.

outPricer = finpricer("AssetMonteCarlo",DiscountCurve=myRC,Model=HestonModel,SpotPrice=100,simulationDates=Settle+calmonths(1):calmonths(1):datetime(2022,9,15),NumTrials=1e3, ...
                     MonteCarloMethod="quasi",BrownianMotionMethod="brownian-bridge")
outPricer = 
  HestonMonteCarlo with properties:

           DiscountCurve: [1x1 ratecurve]
               SpotPrice: 100
         SimulationDates: [15-Oct-2018    15-Nov-2018    15-Dec-2018    15-Jan-2019    15-Feb-2019    15-Mar-2019    15-Apr-2019    15-May-2019    15-Jun-2019    15-Jul-2019    15-Aug-2019    15-Sep-2019    15-Oct-2019    ...    ] (1x48 datetime)
               NumTrials: 1000
           RandomNumbers: []
                   Model: [1x1 finmodel.Heston]
            DividendType: "continuous"
           DividendValue: 0
        MonteCarloMethod: "quasi"
    BrownianMotionMethod: "brownian-bridge"

Price PartialLookback Instrument

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

[Price, outPR] = price(outPricer,PartialLookbackOpt,"all")
Price = 
19.7466
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.747    0.91573    0.0030552    4.6374    279.16    -2.394    84.632    1.2039

More About

expand all

Version History

Introduced in R2021b

expand all