first-passage time: we must determine at what time the process $S(t)$ will touch the boundary $H(t)$. In financial language, $H(t)$ is named the optimal exercise boundary, the stock price above (below) which it is better to exercise the call (put) than to keep the option alive. We will define the exercise time ${t^{\pm}}(t_0)$ as the first time the underlying crosses the threshold given that at present time, $t_0$, the spot price of the asset lies in the proper side of the boundary: $${t^{\pm}}(t_0)=\min\left\{t > t_0; S(t) \gtreqless H(t)|S(t_0) \lessgtr H(t_0)\right\}.
\label{tpm}$$

The optimal strategy for choosing the boundary function derives from the following constraint: the investor must settle $H(t)$ in such a way that the value of the alive option equals the pay-off of the contingent claim in the optimal exercise price, $$P^{\pm}(t,S=H;{\mathbb{K}})=X^{\pm}(H;{\mathbb{K}}).
\label{continuity}$$ The condition must be fulfiled in a smooth way as well, the smooth pasting condition [@PAS65; @M73; @SS05]: $$\left. \frac{\partial P^{\pm}(t,S;{\mathbb{K}})}{\partial S}\right|_{S=H}=\left. \frac{\partial X^{\pm}(S;{\mathbb{K}})}{\partial S}\right|_{S=H},
\label{smooth}$$ in the case in which the right-hand side of the previous expression does exist. That is, the option price must be continuous with continuous derivative in the asset price when it crosses the boundary. In conclusion, the investor must compute 