# Digital call under Ornstein-Uhlenbeck dynamics

I am trying to price a digital option with payoff $$\mathbb{I}_{S_T>K}$$, where $$S_t$$ follows the Ornstein-Uhlenbeck dynamics $$\mathrm{d}S_t=rS_t\mathrm{d}t+\sigma\mathrm{d}W^{\mathbb{Q}}_t$$ in the risk-neutral measure $$\mathbb{Q}$$. I have managed to calculate that $$\mathrm{d}(\mathrm{e}^{-rt}S_t)=\sigma\mathrm{e}^{-rt}\mathrm{d}W^{\mathbb{Q}}_t$$, so the conditional distribution is

$$\mathrm{e}^{-rT}S_T|\mathrm{e}^{-rt}S_t\sim\mathcal{N}\left(0,\frac{\sigma^2}{2r}(\mathrm{e}^{-2rt}-\mathrm{e}^{-2rT})\right).$$

Therefore, assuming that my calculations make sense, the value of my digital option is

\begin{align*} V(t,S_t) &=\mathrm{e}^{-r(T-t)}\mathbb{E}^{\mathbb{Q}}\mathbb{I}_{S_T>K}\\ &=\mathrm{e}^{-r(T-t)}\mathbb{Q}\left(X_T-Y_T>K|\mathcal{F}_t\right)\\ &=\mathrm{e}^{-r(T-t)}\mathbb{Q}\left(\mathrm{e}^{-rT}(X_T-Y_T)>K\mathrm{e}^{-rT}\Big|\mathcal{F}_t\right)\\ &=\mathrm{e}^{-r(T-t)}\mathbb{Q}\left(Z>\frac{K\mathrm{e}^{-rT}}{\sqrt{\frac{\sigma^2}{2r}(\mathrm{e}^{-2rt}-\mathrm{e}^{-2rT})}}\Big|\mathcal{F}_t\right)\\ &=\mathrm{e}^{-r(T-t)}\Phi\left(\frac{-K\mathrm{e}^{-rT}}{\sqrt{\frac{\sigma^2}{2r}(\mathrm{e}^{-2rt}-\mathrm{e}^{-2rT})}}\right). \end{align*}

However, in the limit $$t\to T$$, I don't seem to get $$V(t,S_t)\to\mathbb{I}_{S_T>K}$$ a.s., where have I gone wrong?

If $$ds_t = rs_tdt + \sigma dW_t^\mathbb Q$$, then the solution of the SDE is given by $$s_T = s_te^{r(T-t)} + \sigma\int_t^Te^{r(T-u)}dW^\mathbb Q_u.$$ Since the last integral is Gaussian, the distribution of the terminal price is given by $$s_T \sim\mathrm N\left(s_te^{r(T-t)}, \frac{\sigma^2}{2r}\left[e^{2r(T-t)}-1\right]\right).$$
Now, for the digital option, this translates into $$V(t,s_t) = e^{-r(T-t)}\mathbb Q\left[s_T>k\right] = e^{-r(T-t)}\Phi\left[\frac{s_te^{r(T-t)} - k}{\sqrt{\frac{\sigma^2}{2r}\left[e^{2r(T-t)}-1\right]}}\right],$$ where I used that $$\Phi(x) = 1 - \Phi(-x)$$.
In particular, when $$t\to T$$, the argument of $$\Phi$$ will diverge to $$\pm\infty$$ depending on the sign of $$s_t - k$$, which means that $$V(t,s_t)\to 1_{\left\{s_t>k\right\}}$$.