For a stochastic process $(X_t)_{t \geq 0}$ we set $\tau := \inf\{ t \geq 0 \colon X_t < 0\}$ and $Y_t : = \exp(-X_{t \wedge \tau})$. Define the random variable $Z : = \sup_{ t \geq 0} Y_t$. Why do we have that $$ \mathbb{E}(Z) \leq \mathbb{E}(Y_{\tau} | \tau < \infty) $$ ?
It makes sense that the random variable $Y_t$ is largest at time $\tau$, because then $X_{\tau} < 0$ and $- X_{\tau} > 0$. But what happens if $\tau = \infty$? How can I formally derive this inequality? I guess the expectation $\mathbb{E}(Y_{\tau} | \tau < \infty)$ is not really a conditional expectation but is the expectation $\mathbb{E}_{\mathbb{Q}}(Y_{\tau})$ with respect to the conditional measure $\mathbb{Q} = \mathbb{P}(\, \cdot \, | \tau < \infty)$.
How about the following argument:
Consider the partition of the probability space $\{\tau=\infty\}$ and $\{\tau<\infty\}$. We have that for any $\omega_1\in\{\tau=\infty\}$ and $\omega_2\in\{\tau<\infty\}$, $Z(\omega_1)\leq Z(\omega_2)=Y_\tau(\omega_2)$ since $X_{t\wedge\tau}$ stays nonnegative on the former and is negative in the latter. Therefore $E(Z\mid \tau=\infty)\leq E(Y_\tau\mid \tau<\infty).$
Now we compute $$\begin{aligned} E(Z)&=E(Z\mid \tau<\infty) P(\tau<\infty)+E(Z\mid \tau=\infty) P(\tau=\infty)\\ &\leq E(Z\mid \tau<\infty) P(\tau<\infty)+E(Y_\tau\mid \tau<\infty) P(\tau=\infty)\\ &=E(Y_\tau\mid \tau<\infty) P(\tau<\infty)+E(Y_\tau\mid \tau<\infty) P(\tau=\infty)\\ &=E(Y_\tau\mid \tau<\infty). \end{aligned}$$