Barrier digital put (source code)

= Barrier digital put

A <contingent claim> paying one at maturity if a specified price path has remained below an upper barrier, and zero otherwise. This survival payoff differs from a terminal <digital put option>, which tests only the terminal price. In the dividend-free <Black-Scholes model>, its value is the <discount factor> times the <risk-neutral probability> of avoiding the barrier, obtainable from the <linear-boundary Brownian first-passage distribution>.