Main Content

Touch

Touch instrument object

Description

Create and price a Touch instrument object using this workflow:

  1. Use fininstrument to create a Touch instrument object.

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

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

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

Creation

Description

example

TouchOpt = fininstrument(InstrumentType,'ExerciseDate',exercise_date,'BarrierValue',barrier_value,'PayoffValue',payoff_value) creates a Touch instrument object by specifying InstrumentType and sets properties using the required name-value pair arguments ExerciseDate, BarrierValue, and PayoffValue.

example

TouchOpt = fininstrument(___,Name,Value) sets optional properties using additional name-value pair arguments in addition to the required arguments in the previous syntax. For example, TouchOpt = fininstrument("Touch",','ExerciseDate',datetime(2019,1,30),'BarrierValue',110,'PayoffValue',130,'BarrierType',"OT",'PayoffType',"Expiry",'Name',"Touch_option") creates a Touch option with an expiry payoff type. You can specify multiple name-value pair arguments.

Input Arguments

expand all

Instrument type, specified as a string with the value of "Touch" or a character vector with the value of 'Touch'.

Data Types: char | string

Touch 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: TouchOpt = fininstrument("Touch",','ExerciseDate',datetime(2019,1,30),'BarrierValue',110,'PayoffValue',130,'BarrierType',"OT",'PayoffType',"Expiry",'Name',"Touch_option")
Required Touch 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

Barrier level, specified as the comma-separated pair consisting of 'BarrierValue' and a scalar numeric value.

Data Types: double

Option payoff value, specified as the comma-separated pair consisting of 'PayoffValue' and a scalar numeric value.

Data Types: double

Optional Touch Name-Value Pair Arguments

expand all

Barrier type, specified as the comma-separated pair consisting of 'BarrierType' and a scalar string or character vector with one of the following values:

  • 'OT' — One-touch

    The one-touch option provides a payoff if the underlying asset ever trades at or beyond the BarrierValue. Otherwise, the PayoffValue is zero.

  • 'NT' — No-touch

    The no-touch option provides a payoff if the underlying asset never trades at or beyond the BarrierValue. Otherwise, the PayoffValue is zero.

Data Types: char | string

Payoff type, specified as the comma-separated pair consisting of 'PayoffType' and a scalar string or character vector. You can specify "Expiry" only when you specify 'OT' as the BarrierType.

Note

When you use a BlackScholes pricer, only the "Hit" 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 scalar numeric value.

Data Types: double

Option payoff, returned as a numeric value.

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

Create Touch Instrument Object

Use fininstrument to create a Touch instrument object.

TouchOpt = fininstrument("Touch",'ExerciseDate',datetime(2022,9,15),'BarrierValue',100,'PayoffValue',110,'BarrierType',"OT",'Name',"touch_option")
TouchOpt = 
  Touch with properties:

    ExerciseDate: 15-Sep-2022
    BarrierValue: 100
     PayoffValue: 110
     BarrierType: "ot"
      PayoffType: "expiry"
            Name: "touch_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 Touch Instrument

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

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

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

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

    91.186    -2.1825    0.038281    -2.4413    -415.45    2.7374    35.998

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

Create Touch Instrument Object

Use fininstrument to create a Touch instrument object.

TouchOpt = fininstrument("Touch",'ExerciseDate',datetime(2022,9,15),'BarrierValue',110,'PayoffValue',140,'BarrierType',"OT",'Name',"touch_option")
TouchOpt = 
  Touch with properties:

    ExerciseDate: 15-Sep-2022
    BarrierValue: 110
     PayoffValue: 140
     BarrierType: "ot"
      PayoffType: "expiry"
            Name: "touch_option"

Create Heston Model Object

Use finmodel to create a Heston 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',112,'simulationDates',datetime(2022,9,15))
outPricer = 
  HestonMonteCarlo with properties:

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

Price Touch Instrument

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

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

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

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

    63.525    -7.2363    1.0541    -12.758    -320.21    3.5527    418.94    8.1498

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

Create Touch Instrument Object

Use fininstrument to create a Touch instrument object.

TouchOpt = fininstrument("Touch",'ExerciseDate',datetime(2022,9,15),'BarrierValue',140,'PayoffValue',170,'BarrierType',"OT",'Name',"touch_option")
TouchOpt = 
  Touch with properties:

    ExerciseDate: 15-Sep-2022
    BarrierValue: 140
     PayoffValue: 170
     BarrierType: "ot"
      PayoffType: "expiry"
            Name: "touch_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',135,'DividendValue',0.045)
outPricer = 
  BlackScholes with properties:

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

Price Touch Instrument

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

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

       Results: [1x7 table]
    PricerData: []

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

    136.56    2.2346    0.005457    2.2092    30.812    3.9013    -465.89

More About

expand all

Introduced in R2020b