# Find the PDE for a function that makes it a martingale

Given the SDE, find the PDE for the function $V(t,x)$ such that $V(t,S_t)$ is a martingale.

$dS_t = \kappa(m - S_t)dt + \sigma\sqrt{S_t}dB_t$ where $\kappa$,$m$, and $\sigma$ are constants.

Attempted solution: The stochastic differential equation or SDE can be written in differential form such that $$dS_t = \mu(t,S_t)dt + \sigma(t,S_t)dB_t$$ thus from c.) we have $$\mu(t,S_t) = \kappa(m-S_t) \ \ \ \text{and} \ \ \ \sigma(t,S_t) = \sigma\sqrt{S_t}$$ $V(t,S_t)$ is martingale if and only if $V(t,x)$ satisfies $$\partial_t V(t,x) + \partial_x V(t,x)\mu(t,x) + \frac{1}{2}\partial_{xx}V(t,x)\sigma^2(t,x) = 0$$ therefore the PDE required to satisfy this condition is $$\partial_t V(t,x) + \partial_x V(t,x)\kappa(m - S_t) + \frac{1}{2}\partial_{xx}V(t,x)\sigma^2 S_t = 0$$

Not sure if this is correct any suggestions is greatly appreciated.

• Not sure why this got voted down, I will gladly edit my question if there was something I did to make me get marked down – Wolfy Apr 1 '16 at 17:35
• I do not see anything particularly wrong. However, you need to use $x$ consistently, that is, the PDE should be write as $$\partial_t V(t,x) + \partial_x V(t,x)\kappa(m - x) + \frac{1}{2}\partial_{xx}V(t,x)\sigma^2 x = 0.$$ – Gordon Apr 1 '16 at 17:52