Main Content

DoubleTouch

DoubleTouch instrument object

Description

Create and price a DoubleTouch instrument object using this workflow:

  1. Use fininstrument to create a DoubleTouch instrument object.

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

  3. When using a BlackScholes model, use finpricer to specify a BlackScholes or VannaVolga pricing method for the DoubleTouch instrument.

    When using a BlackScholes, Heston, Bates, or Merton model, use finpricer to specify an AssetMonteCarlo pricing method for the DoubleTouch 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 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 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" or a character vector with the value 'DoubleTouch'.

Data Types: char | 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, or date string.

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

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

Payoff type, specified as the comma-separated pair consisting of 'PayoffType' and a scalar string or character vector. 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 | string

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 exercise date, returned as a datetime.

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

Data Types: string

Option type, returned as a string.

Data Types: string

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

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