# An example of Feynman-Kac

I've been learning about Feynman-Kac recently and I understand the underlying ideas. I am stuck however in actually computing explicit solutions for specific problems.

For example, assume that $$S_t$$ is the price of an asset with SDE $$dS_t = rS_tdt+ \sigma S_tdW_t$$, where $$r$$ and $$\sigma$$ are positive numbers, and $$W_t$$ is a standard Brownian motion under some measure. Consider the function $$f(t, S_t)$$, dependent on time $$t$$ and on the price $$S_t$$. How to solve the following boundary problem where the domain is $$[0,T]\times \mathbb{R}$$: $$f_t +\dfrac{1}{2}\sigma^2 S^2 f_{SS}=0$$ with terminal condition $$f(T,S)=S^4$$?

• Your PDE seems to assume $r=0$. Is that the case? Nov 19 '20 at 17:24
• @DaneelOlivaw No. r is not 0 Nov 19 '20 at 17:47