Skip to content
All library documents

Valuing a Down-and-Out Call and Enforcing Its Barrier Condition

Article Quant Q&A · Author: Stephen Ge

Summary

The document investigates a negative value appearing in a plotted down-and-out call price when the underlying starts below the barrier. It presents a Black–Scholes barrier pricing expression, defines its parameters, and compares that expression with an equivalent form using vanilla calls. The example varies the underlying price and time to maturity to inspect the resulting price curves.

The answer points out a missing dividend-yield discount factor in the displayed formula and explains that a down-and-out option is worthless once its knock-out condition has been met. It also suggests that the remaining discrepancy may come from the implementation, and gives illustrative code that returns zero below the barrier and floors computed prices at zero. The discussion does not provide a full derivation or a comprehensive validation of the formula; the supplied implementation also uses specific parameter conventions, so its algebra and inputs should be checked before reuse.

Key ideas

  • A down-and-out call loses value when the underlying breaches its specified barrier.
  • The displayed pricing formula may require a dividend-yield discount factor in the stock terms.
  • A numerical implementation should enforce the barrier condition when the option is already knocked out.
  • Code-level checks can help distinguish a pricing formula issue from a plotting or implementation error.

Tags

Full text
# Payoff Diagram and Valuation of Down and Out Barrier Option


# Payoff Diagram and Valuation of Down and Out Barrier Option












I just started to learn the Barrier option and its analytical (B/S) formula. According to John Hull's "Options Futures and Other Derivatives", the price of a "down and out" call option at $t=0$ with Barrier $B$ greater than the Strike $K$ is given by: \begin{equation} C_{do}(S_0,K,B,t) = S_0 \mathcal{N}(x_1) - Ke^{-rt}\mathcal{N}(x_1 - \sigma\sqrt{t}) - S_0\left(\frac{B}{S_0}\right)^{2\lambda} \mathcal{N}(y_1) + Ke^{-rt}\left(\frac{B}{S_0}\right)^{2\lambda - 2}\mathcal{N}(y_1 - \sigma\sqrt{t}) \end{equation} where $t$ is the time to mature, $r$ is the risk free rate, $\sigma$ is the volatility of underlying, $\mathcal{N}(\cdot)$ is the standard Normal cumulative distribution function, \begin{equation} \lambda := \frac{r+\frac{\sigma^2}{2}}{\sigma^2} = \frac{1}{2}\left(\frac{2r}{\sigma^2}+1\right) \end{equation} and \begin{align} x_1 &:=\frac{\ln\left(\frac{S_0}{B}\right)}{\sigma\sqrt{t}}+\lambda\sigma\sqrt{t} = \frac{\ln\left(\frac{S_0}{B}\right)+\left(r+\frac{\sigma^2}{2}\right)t}{\sigma\sqrt{t}} \\ y_1 &:=\frac{\ln\left(\frac{B}{S_0}\right)}{\sigma\sqrt{t}}+\lambda\sigma\sqrt{t} = \frac{\ln\left(\frac{B^2}{S_0B}\right)+\left(r+\frac{\sigma^2}{2}\right)t}{\sigma\sqrt{t}} \end{align} Or equivalently, \begin{equation} C_{do}(S_0,K,B,t) = C(S_0,B,t) + (B-K)e^{-rt}\mathcal{N}(x_1 - \sigma\sqrt{t}) - \left(\frac{B}{S_0}\right)^{2\lambda - 2}\left[C\left(\frac{B^2}{S_0},B,t\right) + (B-K)e^{-rt}\mathcal{N}(y_1 - \sigma\sqrt{t})\right] \end{equation} where $C(S_0,B,t)$ is the B/S formula for vanilla call option with $K=B$.

I tried it in the MATLAB with $K=100$, $B=120$, $\sigma = 0.25$, $r=0.02$, different time to mature $t:=\{1e^{-4},1e^{-3},1e^{-2},0.1,1\}$ and different $S_0:=\{50:0.1:140\}$. I plotted the payoff diagram of vanilla call and "down and out" call and it gave me

The payoff diagram of "down and out" call seems O.K. above the Barrier price, but it starts to go negative rather than 0 below the Barrier price.

I also tried to set $B=90$ \begin{equation} C_{do}(S_0,K,B,t) = C(S_0,B,t) - \left(\frac{B}{S_0}\right)^{2\lambda - 2}C\left(\frac{B^2}{S_0},B,t\right) \end{equation} and the payoff shows the same problem:

Does the down and out Barrier option formula only work when $B\leq S_0$? I searched online for the down and out call option payoff diagrams, they all converge to zero when $S_0<B$.

## Answer by João (score 1)

https://quant.stackexchange.com/a/82105

I think the first formula is a little bit off;

$$C_{\text{di}} = C - C_{do}$$

where:

\begin{align*} C_{do} &= S_0 N(x_1)e^{-qT} - K e^{-rT} N(x_1 - \sigma \sqrt{T}) - S_0 e^{-qT} \left(\frac{H}{S_0}\right)^{2\lambda} N(y_1) \\ &\quad + K e^{-rT} \left(\frac{H}{S_0}\right)^{2\lambda -2} N(y_1 - \sigma \sqrt{T}) \end{align*}

\begin{align*}x_1 = \frac{\ln(S_0/H)}{\sigma \sqrt{T}} + \lambda \sigma \sqrt{T} \end{align*}

\begin{align*}y_1 = \frac{\ln(H/S_0)}{\sigma \sqrt{T}} + \lambda \sigma \sqrt{T}\end{align*}

you were missing the first:

\begin{align*}e^{-qT}\end{align*}

> I searched online for the down and out call option payoff diagrams, they all converge to zero when 𝑆0<𝐵.

because of the knock-out barrier condition

So maybe a code error?

edit:

```
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm

def bs_call(S, K, T, r, sigma):
d1 = (np.log(S / K) + (r + 0.5 * sigma**2) * T) / (sigma * np.sqrt(T))
d2 = d1 - sigma * np.sqrt(T)
return S * norm.cdf(d1) - K * np.exp(-r * T) * norm.cdf(d2)

def down_and_out_call(S0, K, B, T, r, sigma):
if S0 < B:
    return 0

lambda_ = (r + 0.5 * sigma**2) / sigma**2
x1 = (np.log(S0 / B) / (sigma * np.sqrt(T))) + lambda_ * sigma * np.sqrt(T)
y1 = (np.log(B**2 / (S0 * K)) / (sigma * np.sqrt(T))) + lambda_ * sigma * np.sqrt(T)

C_B_B_T = bs_call(B, B, T, r, sigma)
C_B2S0_B_T = bs_call(B**2 / S0, B, T, r, sigma)

Cdo = bs_call(S0, B, T, r, sigma) + (B - K) * np.exp(-r * T) * norm.cdf(x1 - sigma * np.sqrt(T)) \
    - (B / S0) ** (2 * lambda_ - 2) * (C_B2S0_B_T + (B - K) * np.exp(-r * T) * norm.cdf(y1 - sigma * np.sqrt(T)))

return np.maximum(Cdo, 0)

K = 100
B = 120
sigma = 0.25
r = 0.02
times = [1e-4, 1e-3, 1e-2, 0.1, 1]
S0_values = np.arange(50, 140.1, 0.1)

plt.figure(figsize=(10, 6))
for T in times:
vanilla_call_values = [bs_call(S, K, T, r, sigma) for S in            S0_values]
down_and_out_values = [down_and_out_call(S, K, B, T, r, sigma) for S in S0_values]

plt.plot(S0_values, vanilla_call_values, '--')
plt.plot(S0_values, down_and_out_values)

plt.xlabel("Stock Price $S_0$")
plt.ylabel("Option Value")
plt.title("Payoff Diagram: Vanilla Call vs Down-and-Out Call")
plt.legend()
plt.grid()
plt.show()
```

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.