In some projects I got to a conditional expectation of the form:
$$E\left[\exp\left\{\int_s^tX(r)f(r)dr\right\}\mid\mathcal F_s\right]$$
where $t\geq s$, $f$ is nice enough and $X$ is an Ito process and $\mathcal F_s$ is the information about $X$ up to time $s$. I want to compute this. Is there anyway to do so?
I tried Taylor expanding $\exp$, I tried to apply Ito formula in a few clever ways and nothing works out nicely. Is there anyway of computing this?
Disclaimer. I'm using $T$ instead of $t$ for the terminal time and $t_0$ instead of $s$ for the initial time. I am ignoring issues arising due to a lack of regularity and, as you say, assuming that the drift, diffusion, and $f$ are nice enough.
Since $X$ is an Ito process and hence Markov, it is sufficient to consider $$ v(t,x)\equiv\mathbb{E}\left[\exp\left\{\int_{t}^{T}X(s)f(s)ds\right\}\,\middle|\, X(t)=x\right]. $$ By the Feynman-Kac formula, it follows that \begin{align*} v_{t}+Lv+xfv & =0, & \text{on }[t_{0},T)\times\mathbb{R}\phantom{.}\\ v(T,\cdot) & =1, & \text{on }\mathbb{R}. \end{align*} where $L$ is the infinitesimal generator of $X$.
You can solve this PDE numerically to get the value of $v(t_0, X(t_0))$. Alternatively, you can use Monte Carlo simulation on the original expectation, but this is generally slower than the solving the PDE numerically due to the problem's low dimensionality.