# How to prove an adapted Feynman Kac Formula for $v_t + \frac{1}2 \sigma ^2 (t,y) v_{yy} + b(t,y) v_y - \delta(t,y) v + h(y) = 0$ using SDE techniques?

I am considering a generalisation of the Feynman-Kac (FK) Theorem. The traditional FK Theorem states the following:

Fix a filtered probability space $$(\Omega, \mathscr{F}, (\mathscr{F}_t), \mathbb{P}^*)$$ supporting a one dimensional standard Brownian Motion $$W^*$$. If a process $$Y$$ satisfies the SDE $$dY_t = b(t,Y_t)dt + \sigma (t, Y_t) dW_t^*$$ Then suppose $$w(t,y) \in C^{1,2}$$ and solves the PDE: $$w_t + \frac{1}{2} \sigma ^2 (t,y) w_{yy} + b(t,y) w_y - \delta(t,y) w = 0$$ with the terminal condition: $$w(T,y) = f(y)$$ Then under suitable assumptions (omitted), the function $$w$$ has the expression: $$w(t,Y_t) = \mathbb{E}^{\mathbb{P}^*}[ \exp ( - \int _t^T \delta(s,Y_s) ds) f(Y_T) | \mathscr{F}_t]$$

Having encountered this theorem, I have come across a generalisation of the above where we now consider the function $$v \in C^{1,2}$$ such that $$v$$ solves the PDE: $$v_t + \frac{1}{2} \sigma ^2 (t,y) v_{yy} + b(t,y) v_y - \delta(t,y) v \space \bf{ + \space h(y)} = 0$$ with the terminal condition: $$v(T,y) = f(y)$$

This has the solution (again under omitted conditions) which can be shown fairly straightforwardly from a "PDE perspective":

$$v(t,Y_t) = \mathbb{E}^{\mathbb{P}^*}[ \int _t^T \exp ( - \int _t^s \delta(u,Y_u) du) h(Y_s)ds + \exp ( \int _t^T \delta(s,Y_s)ds) f(Y_T) \space | \space \mathscr{F}_t]$$

However, from an "SDE perspective" I am struggling to prove that this is the solution. Here is my partial solution:

By Ito's Formula, we have: $$dv(t,Y_t) = (v_t + b(t,Y_t)v_y + \frac{1}{2} \sigma ^2 (t,Y_t)v_{yy}) dt + \sigma (t,Y_t) v_y dW_t^*$$ And then by substituting in from the PDE in that $$v$$ solves, we see that this simplifies to: $$dv(t,Y_t) = (\delta (t, Y_t) v(t,Y_t) - h(y) )dt + \sigma(t,Y_t) v_y dW_t^*$$ Now by integrating we get that: $$v(T,Y_T) - v(t,Y_t) = \int _t^T (\delta (s, Y_s) v(s,Y_s) - h(Y_s) )ds + \int _t^T \sigma(s,Y_s) v_y dW_s^*$$ And by rearranging for $$v(t,Y_t)$$ and taking conditional expectations, we get that: $$v(t,Y_t) = \mathbb{E}^{\mathbb{P}^*}[f(Y_t) - \int _t^T (\delta (s, Y_s) v(s,Y_s) - h(Y_s) )ds - \int _t^T \sigma(s,Y_s) v_y dW_s^* | F_t ]$$ And finally, since the conditional expectation of a stochastic integral with respect to a Brownian Motion (under assumed regularity conditions) is $$0$$, we get: $$v(t,Y_t) = \mathbb{E}^{\mathbb{P}^*}[f(Y_t) - \int _t^T (\delta (s, Y_s) v(s,Y_s) - h(Y_s) )ds | F_t ]$$

This is, of course, not a satisfactory solution. For one, it does not match the desired form. And secondly, and more importantly, the right-hand side contains $$v(s,Y_s)$$ inside the integral and so this is not an explicit solution. I would be grateful for any assistance in progressing from this point.

Note: as mentioned above, I am aware that this can be solved using PDE methods, however, I am specifically interested in continuing from this particular approach; so other answers on this site that solve this using those methods do not answer my question.

We see \begin{aligned}dv(t,Y_t)-\delta(t,Y_t)v(t,Y_t)dt&=-h(Y_t)dt+v_y(t,Y_t)\sigma(t,Y_t)dW_t\\ \implies d(v(t,Y_t)e^{-\int_0^t\delta(s,Y_s)ds})&=-h(Y_t)e^{-\int_0^t\delta(s,Y_s)ds}dt+v_y(t,Y_t)\sigma(t,Y_t)e^{-\int_0^t\delta(s,Y_s)ds}dW_t\\ \implies f(Y_T)e^{-\int_0^T\delta(s,Y_s)ds}&=v(t,Y_t)e^{-\int_0^t\delta(s,Y_s)ds}+\\ &-\int_t^Th(Y_s)e^{-\int_0^s\delta(u,Y_u)du}ds+\int_t^Tv_y(s,Y_s)\sigma(s,Y_s)e^{-\int_0^s\delta(u,Y_u)du}dW_s\\ \end{aligned} So we multiply by $$e^{\int_0^t\delta(u,Y_u)du}$$ and we can write \begin{aligned} f(Y_T)e^{-\int_t^T\delta(s,Y_s)ds}+\int_t^Th(Y_s)e^{-\int_t^s\delta(u,Y_u)du}ds&=v(t,Y_t)+\int_t^Tv_y(s,Y_s)\sigma(s,Y_s)e^{-\int_t^s\delta(u,Y_u)du}dW_s \end{aligned} Under the condition that the stochastic integral process $$M_t:=\int_0^tv_y(s,Y_s)\sigma(s,Y_s)e^{-\int_0^s\delta(u,Y_u)du}dW_s$$ is a $$\mathscr{F}_t$$-martingale, we get: $$E\bigg[f(Y_T)e^{-\int_t^T\delta(s,Y_s)ds}+\int_t^Th(Y_s)e^{-\int_t^s\delta(u,Y_u)du}ds\bigg|\mathscr{F}_t\bigg]=v(t,Y_t)$$
• You're welcome @FD_bfa. We have $d(e^{-\int_0^t\delta(s,Y_s)ds})=-\delta(t,Y_t)e^{-\int_0^t\delta(s,Y_s)ds}dt$, then apply Ito's product rule to the product process $(v(t,Y_t)e^{-\int_0^t\delta(s,Y_s)ds})_{t\geq 0}$. Apr 10 at 16:59
• @FD_bfa Intuitively: when you have an ODE of the form $y'(t)=a(t)y(t)+h(t)$, an approach is to see that $\frac{d}{dt}(y(t)e^{-\int_0^ta(s)ds})=(a(t)y(t)e^{-\int_0^ta(s)ds}+h(t)e^{-\int_0^ta(s)ds})-a(t)y(t)e^{-\int_0^ta(s)ds}=h(t)e^{-\int_0^ta(s)ds}$. This leads to the solution. Apr 10 at 17:27