Main Content

DoubleTouch

DoubleTouch instrument object

Description

Create and price a DoubleTouch instrument object for one of more Double Touch instruments using this workflow:

  1. Use fininstrument to create a DoubleTouch instrument object for one of more Double Touch instruments.

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

  3. Choose a pricing method.

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

    • When using a BlackScholes, Heston, Bates, or Merton model, use finpricer to specify an AssetMonteCarlo pricing method for one or more DoubleTouch 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 DoubleTouch instrument, see Choose Instruments, Models, and Pricers.

Creation

Description

example

DoubleTouchOpt = fininstrument(InstrumentType,'ExerciseDate',exercise_date,'BarrierValue',barrier_value,'PayoffValue',payoff_value) creates a DoubleTouch object for one of more Double Touch instruments by specifying InstrumentType and sets properties using the required name-value pair arguments ExerciseDate, BarrierValue, and PayoffValue.

example

DoubleTouchOpt = fininstrument(___,Name,Value) sets optional properties using additional name-value pair arguments in addition to the required arguments in the previous syntax. For example, DoubleTouchOpt = fininstrument("DoubleTouch",'Strike',100,'ExerciseDate',datetime(2019,1,30),'BarrierValue',110,'PayoffValue',150,'BarrierType',"DOT",'PayoffType',"Expiry",'Name',"DoubleTouch_option") creates a DoubleTouch option with a payoff type of Expiry. You can specify multiple name-value pair arguments.

Input Arguments

expand all

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

Data Types: char | cell | string

DoubleTouch 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: DoubleTouchOpt = fininstrument("DoubleTouch",'Strike',100,'ExerciseDate',datetime(2019,1,30),'BarrierValue',110,'OptionType',"put",'ExerciseStyle',"European",'BarrierType',"DO",'Name',"DoubleTouch_option")
Required DoubleTouch Name-Value Pair Arguments

expand all

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.

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 | string | datetime

Option barrier levels, specified as the comma-separated pair consisting of 'BarrierValue' and an NINST-by-2 matrix of numeric values, where the first column is Upper Barrier(1)(UB) and the second column is Lower Barrier(2)(LB). Barrier(1) must be greater than Barrier(2).

Data Types: double

Payoff value, specified as the comma-separated pair consisting of 'PayoffValue' and an NINST-by-1 matrix of numeric values, where each element is a 1-by-2 vector in which the first column is Barrier(1)(UB) and the second column is Barrier(2)(LB). Barrier(1) must be greater than Barrier(2).

Note

The payoff value is calculated for the point in time that the BarrierValue is reached. The payoff is either cash or nothing. If you specify a double no-touch option using BarrierType, the payoff is at the maturity of the option.

Data Types: double

Optional DoubleTouch Name-Value Pair Arguments

expand all

Double barrier type, specified as the comma-separated pair consisting of 'BarrierType' and a string or character vector or an NINST-by-1 cell array of character vectors or string array with one of the following values:

  • 'DOT' — Double one-touch. The double one-touch option defines two BarrierValue values. A double one-touch option provides a PayoffValue if the underlying asset ever touches either the upper or lower BarrierValue values.

  • 'DNT' — Double no-touch. The double no-touch option defines two BarrierValue values. A double no-touch option provides a PayoffValue if the underlying asset ever never touches either the upper or lower BarrierValue values.

  • 'UNT-LOT' — Upper BarrierValue is No Touch and Lower BarrierValue is one Touch.

  • 'UOT-LNT' — Upper BarrierValue is One Touch and Lower BarrierValue is No Touch.

Data Types: char | cell | string

Payoff type, specified as the comma-separated pair consisting of 'PayoffType' and a scalar string or character vector or an NINST-by-1 cell array of character vectors or string array. You cannot use specify "Expiry" when using a BarrierType of 'DNT'.

Note

When you use a BlackScholes pricer, only the "Expiry" PayoffType is supported.

Data Types: char | cell | string

User-defined name for the instrument, 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 exercise date, returned as a datetime or an NINST-by-1 vector of datetimes.

Data Types: datetime

Barrier level, returned as a numeric matrix.

Data Types: double

Option payoff, returned as a numeric matrix.

Data Types: double

Double barrier type, returned as a scalar string or an NINST-by-1 string array.

Data Types: string

Option type, returned as a string or an NINST-by-1 string array.

Data Types: string

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 DoubleTouch instrument when you use a BlackScholes model and an AssetMonteCarlo pricing method.

Create DoubleTouch Instrument Object

Use fininstrument to create a DoubleTouch instrument object.

DoubleTouchOpt = fininstrument("DoubleTouch",'ExerciseDate',datetime(2022,9,15),'BarrierValue',[110 90],'PayoffValue',50,'BarrierType',"DOT",'Name',"doubletouch_option")
DoubleTouchOpt = 
  DoubleTouch with properties:

    ExerciseDate: 15-Sep-2022
    BarrierValue: [110 90]
     PayoffValue: 50
     BarrierType: "dot"
      PayoffType: "expiry"
            Name: "doubletouch_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 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',102,'simulationDates',datetime(2022,9,15))
outPricer = 
  GBMMonteCarlo with properties:

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

Price DoubleTouch Instrument

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

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

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

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

    43.386    0.0043916    0.0018346    0.010325    -173.28    1.4722    1.8176

This example shows the workflow to price multiple DoubleTouch instruments when you use a BlackScholes model and a BlackScholes pricing method.

Create DoubleTouch Instrument Object

Use fininstrument to create a DoubleTouch instrument object for three Double Touch instruments.

DoubleTouchOpt = fininstrument("DoubleTouch",'ExerciseDate',datetime([2022,9,15 ; 2022,10,15 ; 2022,11,15]),'BarrierValue',[115 95],'PayoffValue',[70 ; 89 ; 90],'BarrierType',"UNT-LOT",'Name',"doubletouch_option")
DoubleTouchOpt=3×1 object
  3x1 DoubleTouch array with properties:

    ExerciseDate
    BarrierValue
    PayoffValue
    BarrierType
    PayoffType
    Name

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

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

     Volatility: 0.2800
    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 BlackScholes Pricer Object

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

outPricer = finpricer("analytic",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',100,'DividendValue',0.045)
outPricer = 
  BlackScholes with properties:

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

Price DoubleTouch Instruments

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

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

   52.6903
   66.9920
   67.7447

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

    Results
    PricerData

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

    52.69    -3.4708    -0.0041339    -6.5871    -1.3469      0      -35.883

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

    66.992    -4.4128    -0.005258    -6.5871    -1.7125      0      -45.623

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

    67.745    -4.4624    -0.0053149    -6.5871    -1.7318      0      -46.135

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

Create DoubleTouch Instrument Object

Use fininstrument to create a DoubleTouch instrument object.

DoubleTouchOpt = fininstrument("DoubleTouch",'ExerciseDate',datetime(2022,9,15),'BarrierValue',[115 95],'PayoffValue',40,'BarrierType',"DOT",'Name',"doubletouch_option")
DoubleTouchOpt = 
  DoubleTouch with properties:

    ExerciseDate: 15-Sep-2022
    BarrierValue: [115 95]
     PayoffValue: 40
     BarrierType: "dot"
      PayoffType: "expiry"
            Name: "doubletouch_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',102,'simulationDates',datetime(2022,9,15))
outPricer = 
  BatesMonteCarlo with properties:

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

Price DoubleTouch Instrument

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

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

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

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

    34.774      0        0        0       -139.07    1.2179     0        0   

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

Create DoubleTouch Instrument Object

Use fininstrument to create a DoubleTouch instrument object.

DoubleTouchOpt = fininstrument("DoubleTouch",'ExerciseDate',datetime(2022,9,15),'BarrierValue',[115 95],'PayoffValue',70,'BarrierType',"UNT-LOT",'Name',"doubletouch_option")
DoubleTouchOpt = 
  DoubleTouch with properties:

    ExerciseDate: 15-Sep-2022
    BarrierValue: [115 95]
     PayoffValue: 70
     BarrierType: "unt-lot"
      PayoffType: "expiry"
            Name: "doubletouch_option"

Create BlackScholes Model Object

Use finmodel to create a BlackScholes model object.

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

     Volatility: 0.2800
    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 BlackScholes Pricer Object

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

outPricer = finpricer("analytic",'DiscountCurve',myRC,'Model',BlackScholesModel,'SpotPrice',100,'DividendValue',0.045)
outPricer = 
  BlackScholes with properties:

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

Price DoubleTouch Instrument

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

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

       Results: [1x7 table]
    PricerData: []

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

    52.69    -3.4708    -0.0041339    -6.5871    -1.3469      0      -35.883

More About

expand all

Introduced in R2020b