Conditional expectation of a function of a stochastic process I've been stuck on figuring out how this expression came to be, and I just can't seem to able to find out.
Basically, given a stochastic process Y that satisfies the SDE: $dY_t = -rY_tdt - \theta Y_tdW_t$, and given $V(y) = -\frac{1}{q}y^q$,
my notes show ($T$ is a stopping time): $$E[V(Y_T) | Y_t=y] = V(y) exp((\frac{1}{2} q (q-1)\theta^2 - qr)(T-t)).$$
It seems as if the expression for the conditional expectation is derived using the SDE, but I am not sure. Could anyone be able to help with this? Thanks!
 A: By Feynman-Kac
$$E[V(Y_T)|Y_t=y]=-\frac{1}{q}\int_{(0,\infty)}v^qf_{Y_T|Y_t}(v,y)dv$$
where $f_{Y_T|Y_t}(v,y)$ is the solution to the corresponding Fokker-Planck equation, and yields
$$f_{Y_T|Y_t}(v,y)=\frac{1}{v}\frac{1}{\sqrt{2\pi \theta^2(T-t)}}\exp\bigg\{-\frac{1}{2}\frac{(\ln(v)-(\ln(y)+(-r-0.5\theta^2)(T-t)))^2}{\theta^2(T-t)}\bigg\}$$
which is lognormal therefore
$$\begin{aligned}\int_{(0,\infty)}v^qf_{Y_T|Y_t}(v,y)dv&=\exp\bigg\{q(\ln(y)+(-r-\frac{\theta^2}{2})(T-t))+q^2\frac{\theta^2}{2}(T-t)\bigg\}=\\&=y^q\exp\bigg\{-qr(T-t)-q\frac{\theta^2}{2}(T-t)+q^2\frac{\theta^2}{2}(T-t)\bigg\}=\\
&=y^q\exp\bigg\{-qr(T-t)+\frac{\theta^2}{2}(T-t)q(q-1)\bigg\}
\end{aligned} $$
and the equality follows.

Define $F(y,t)=-q^{-1}y^q$ so we have
$$\frac{\partial F}{\partial t}=0 \ \ \ \ \ \frac{\partial F}{\partial y}=-y^{q-1} \ \ \ \ \  \frac{\partial^2 F}{\partial y^2}=-(q-1)y^{q-2}$$
So
$$\begin{aligned}dF&=\frac{\partial F}{\partial y}dY_t+\frac{1}{2}\theta^2Y_t^2\frac{\partial^2 F}{\partial y^2}dt=\\
&=\frac{\partial F}{\partial y}\bigg(-rY_tdt-\theta Y_tdW_t\bigg)+\frac{1}{2}\theta^2Y_t^2\frac{\partial^2 F}{\partial y^2}dt=\\
&=rY_t^qdt+\theta Y_t^qdW_t-\frac{\theta^2}{2}(q-1)Y_t^qdt=\\
&=-\frac{Y_t^q}{q}(-rq)dt-\frac{Y_t^q}{q}(-q\theta)dW_t-\frac{Y_t^q}{q}\frac{\theta^2}{2}q(q-1)dt=\\
&=(-rq+\frac{\theta^2}{2}q(q-1))Fdt-q\theta FdW_t\end{aligned}$$
This implies that $F(Y_T,T)$ is lognormal with parameters
$$\begin{aligned}\mu&=\ln(F(Y_t,t))+(-rq+\frac{\theta^2}{2}q(q-1)-\frac{\theta^2}{2}q^2)(T-t)=\\
&=\ln(F(Y_t,t))+(-rq-\frac{\theta^2}{2}q)(T-t)
\end{aligned}$$
$$\begin{aligned}\sigma^2&=q^2\theta^2(T-t)
\end{aligned}$$
Therefore
$$\begin{aligned}E[F(Y_T,T)|Y_t=y]&=\exp\bigg\{\mu+\frac{\sigma^2}{2}\bigg\}=\\
&=-\frac{1}{q}y^q\exp\bigg\{-rq(T-t)-\frac{\theta^2}{2}q(T-t)+\frac{\theta^2}{2}q^2(T-t)\bigg\}=\\
&=-\frac{1}{q}y^q\exp\bigg\{-rq(T-t)+\frac{\theta^2}{2}q(q-1)(T-t)\bigg\}
\end{aligned}$$
