Touch Options
Calculate the closed-form price of a one-touch, no-touch, double one-touch or double no-touch option: what a binary option on whether the stock price of each ticker touches a barrier before expiration is worth.
The formulas are those of Reiner and Rubinstein (1991) for a single barrier and Hui (1996) for two barriers.
A touch option is a binary option on whether the stock price touches a barrier before expiration:
- One-touch: pays the cash payout once the barrier at barrier_percentage of the stock price is touched, at that moment or at expiration (see payment).
- No-touch: pays the cash payout at expiration when the barrier is never touched.
- Double one-touch: pays at expiration when either the lower barrier (barrier_percentage) or the upper barrier (upper_barrier_percentage) is touched.
- Double no-touch: pays at expiration when the stock price stays between the two barriers.
A barrier below the stock price (barrier_percentage below 1) is touched when the price falls to it, one above (barrier_percentage above 1) when the price rises to it. The price of a one-touch paid at expiration is the discounted risk-neutral probability of touching the barrier, so with a cash payout of 1 and the discounting removed it reads as that probability.
The formula is as follows:
\[P(\text{touch}) = N\left(\frac{\eta(h - \nu T)}{\sigma \sqrt{T}}\right) + \left(\frac{H}{S}\right)^{2 \mu} \cdot N\left(\frac{\eta(h + \nu T)}{\sigma \sqrt{T}}\right)\] \[\text{One-touch},\;\; \text{paid at expiration} = \text{Cash} \cdot e^{- rT} \cdot P(\text{touch}),\;\; \text{with Cash defaulting to 1}\] \[\text{One-touch},\;\; \text{paid at the hit} = \text{Cash} \cdot \left[\left(\frac{H}{S}\right)^{\mu + \lambda} \cdot N(\eta z) + \left(\frac{H}{S}\right)^{\mu - \lambda} \cdot N(\eta z - 2 \eta \lambda \sigma \sqrt{T})\right],\;\; z = \frac{h}{\sigma \sqrt{T}} + \lambda \sigma \sqrt{T}\] \[\text{No-touch} = \text{Cash} \cdot e^{- rT} \cdot (1 - P(\text{touch}))\] \[P(\text{stay}) = \Sigma_{n} \left[e^{\frac{\text{2nZ} \nu}{\sigma^{2}}} \cdot \left(N\left(\frac{u - \text{2nZ} - \nu T}{\sigma \sqrt{T}}\right) - N\left(\frac{l - \text{2nZ} - \nu T}{\sigma \sqrt{T}}\right)\right)\right]\] \[e^{\frac{2 \nu(l - nZ)}{\sigma^{2}}} \cdot \left(N\left(\frac{u - 2l + \text{2nZ} - \nu T}{\sigma \sqrt{T}}\right) - N\left(\frac{- l + \text{2nZ} - \nu T}{\sigma \sqrt{T}}\right)\right) \;\text{]}\] \[\text{Double no-touch} = \text{Cash} \cdot e^{- rT} \cdot P(\text{stay})\] \[\text{Double one-touch} = \text{Cash} \cdot e^{- rT} \cdot (1 - P(\text{stay}))\] \[\text{Discrete monitoring:}\;\; H \text{→} H \cdot e^{0.5826 \cdot \sigma \cdot \sqrt{\Delta t}} \;\text{for a barrier above and}\; H \cdot e^{- 0.5826 \cdot \sigma \cdot \sqrt{\Delta t}} \;\text{for one below the stock price},\;\; \text{with}\;\; \Delta t = \frac{1}{252},\; \frac{1}{52} \;\text{or} \;\frac{1}{12} \;(\text{Broadie},\; \text{Glasserman}\; \text{\&} \;\text{Kou},\; 1997)\]Where S is the stock price (the traded close on the pricing date), H is the barrier, \(h = \ln (H / S)\), \(l = \ln (L / S)\) and \(u = \ln (U / S)\) with L and U the lower and upper barrier, \(Z = u - l\), r is the continuously compounded risk-free rate, q is the continuous dividend yield (ln(1 + dividend yield)), \(\nu = r - q - \sigma^{2} / 2\), \(\mu = \nu / \sigma^{2}\), \(\lambda = \sqrt{\mu^{2} + 2 r / \sigma^{2}}\), \(\eta = 1\) for a barrier below and -1 for one above the stock price, \(\sigma\) is the annualized volatility (the standard deviation of the daily returns over the trailing 252 trading days times √252), T is the time to expiration in years (days / 365) and N is the cumulative standard normal distribution. P(stay) is the probability of staying between the barriers from the method of images, summed until its terms are below machine precision; Hui (1996) writes the same probability as a sine series.
See: Reiner, E., & Rubinstein, M. (1991), “Unscrambling the Binary Code”, Risk, 4(9), 75-83; Hui, C. H. (1996), “One-Touch Double Barrier Binary Option Values”, Applied Financial Economics, 6(4), 343-346; Broadie, M., Glasserman, P., & Kou, S. (1997), “A Continuity Correction for Discrete Barrier Options”, Mathematical Finance, 7(4), 325-349; Haug, E. G. (2007), The Complete Guide to Option Pricing Formulas, 2nd ed., section 4.19.
Also known as: one-touch option, no-touch option, double one-touch, double no-touch, American digital option, barrier binary option, touch probability.
Example · TSLA, KO · 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_touch_option:
from financetoolkit import Toolkit
toolkit = Toolkit(
["TSLA", "KO"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2025-01-01",
end_date="2025-12-31",
)
touch_option = toolkit.options.get_touch_option(
option_type="double-no-touch", barrier_percentage=0.9, upper_barrier_percentage=1.1,
expiration_time_range=91,
)
touch_option[["2026-01-07", "2026-01-30", "2026-03-01", "2026-03-31"]]
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
What was a double no-touch option on Tesla and Coca-Cola, paying $1 if the share price stays within 10% of its level at the end of 2025, worth for the expiries of 7 January, 30 January, 1 March and 31 March 2026?
Which returns:
| Ticker | 2026-01-07 | 2026-01-30 | 2026-03-01 | 2026-03-31 |
|---|---|---|---|---|
| TSLA | 0.4951 | 0.0223 | 0.0004 | 0.0000 |
| KO | 0.9991 | 0.9030 | 0.6773 | 0.4963 |
2 rows
Parameters
get_touch_option accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
start_date | str | None | The date whose price, volatility and rates the values start from; a date without prices (a weekend or a holiday) uses the last trading day before it, and a ticker without a price on that day is left out with a warning. Defaults to None, which uses the last date of the historical data. | "2021-01-01" |
option_type | str | The kind of touch option. Options are: “one-touch” (one-touch), “no-touch” (no-touch), “double-one-touch” (double one-touch), “double-no-touch” (double no-touch). Defaults to “one-touch”. | "asset-or-nothing" |
barrier_percentage | float | The barrier (the lower barrier of a double touch option) as a percentage of the current stock price, above 0. Defaults to 0.9, 90% of the current stock price. | 1.2 |
upper_barrier_percentage | float | The upper barrier of a double touch option as a percentage of the current stock price. Defaults to 1.1, 110% of the current stock price. | |
payment | str | When a one-touch option pays. Options are: “expiration” (at expiration), “hit” (when the barrier is touched). The other touch options pay at expiration. Defaults to “expiration”. | "expiration" |
cash_payout | float | The cash amount paid. Defaults to 1.0. | 10.0 |
monitoring | str | How often the barrier is checked. Options are: “continuous” (continuously), “daily” (252 times a year), “weekly” (52 times a year), “monthly” (12 times a year). Defaults to “continuous”. | "continuous" |
expiration_time_range | int | The number of days to use for the time to expiration: the columns are the expirations 1 up to expiration_time_range - 1 days after the start date, so at least 2. Defaults to 30, which gives expirations of 1 to 29 days. | 90 |
risk_free_rate | float | The risk free rate to use for the calculation. Defaults to None, which uses the Toolkit’s risk-free rate on the pricing date: the 10-year Treasury yield unless the Toolkit’s risk_free_rate parameter selects ‘13w’, ‘5y’ or ‘30y’, converted from its semi-annual bond-equivalent quote to continuous compounding. A rate passed here is used as given, as a continuously compounded rate. | 0.04 |
dividend_yield | float | The dividend yield to use for the calculation. Defaults to None, which uses the dividend yield on the pricing date (the dividends of the 365 days up to it relative to its close, as the continuously compounded ln(1 + q)). A given value is used as a continuous yield. | 0.02 |
show_input_info | bool | Whether to show the input information. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
standardize | bool | Whether to standardize (Z-Score) the result across the time to expiration columns for each ticker. Defaults to False. | True |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
References
- Library Referenced against QuantLib’s AnalyticDigitalAmericanEngine (one-touch)
- Library Referenced against QuantLib’s AnalyticBinaryBarrierEngine (no-touch)
- Library Referenced against QuantLib’s AnalyticDoubleBarrierBinaryEngine (double one-touch, double no-touch)