Class TouchOption

java.lang.Object
com.quantfinlib.pricing.TouchOption

public final class TouchOption extends Object
One-touch and no-touch options (pay-at-expiry) under continuously monitored geometric Brownian motion — with the barrier-hitting probability itself exposed, since desks quote one-touches as (roughly) discounted hit probabilities.

With log-drift m = r − q − σ²/2 and barrier log-distance h = ln(H/S), the reflection principle gives the probability of touching an upper barrier (h > 0) by expiry:

  P = N((−h + mT)/σ√T) + e^{2mh/σ²} · N((−h − mT)/σ√T)

and symmetrically for a lower barrier. A one-touch paying at expiry is payout·e^{−rT}·P; a no-touch is the complement. Conventions match BlackScholes: carry is the continuous yield (foreign rate for FX).

Pay-at-hit one-touches (rebate paid immediately on touch) differ by discounting to the hitting time; the pay-at-expiry form here is the one used in vanna-volga books and matches how BarrierOption treats rebates (it doesn't — knockouts here carry no rebate).

  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    hitProbability(double spot, double barrier, double rate, double carry, double vol, double timeYears)
    Probability that spot touches barrier at least once before timeYears, under GBM with the given rate/carry/vol.
    static double
    noTouch(double spot, double barrier, double rate, double carry, double vol, double timeYears, double payout)
    Pays payout at expiry if the barrier never traded.
    static double
    oneTouch(double spot, double barrier, double rate, double carry, double vol, double timeYears, double payout)
    Pays payout at expiry if the barrier traded at any point.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • hitProbability

      public static double hitProbability(double spot, double barrier, double rate, double carry, double vol, double timeYears)
      Probability that spot touches barrier at least once before timeYears, under GBM with the given rate/carry/vol.
    • oneTouch

      public static double oneTouch(double spot, double barrier, double rate, double carry, double vol, double timeYears, double payout)
      Pays payout at expiry if the barrier traded at any point.
    • noTouch

      public static double noTouch(double spot, double barrier, double rate, double carry, double vol, double timeYears, double payout)
      Pays payout at expiry if the barrier never traded.