Question: Consider the solution $X$ of the SDE
$$ d X_{t}=\left(\theta-X_{t}\right) d t+\sigma \sqrt{X_{t}\left(1-X_{t}\right)} d W_{t} $$
for parameters $\sigma>0$ and $\theta \in(0,1)$. (It is known that a unique solution exists for every initial value $0 \leq x \leq 1$ and that the solution is an element of $[0,1]$ for all $t$.) Define for parameters $\rho_{0}, \rho_{1}>0$ the function
$$ F(t, x)=E_{x}\left(\exp \left(-\int_{0}^{T-t} \rho_{0}+\rho_{1} X_{s} d s\right)\right), \quad(t, x) \in[0, T] \times[0,1] $$
Use the Feynman Kac formula to derive a terminal value problem for $F$.
This is what I've tried:
To derive a terminal value problem for the function $F(t, x)$ using the Feynman-Kac formula, we first consider the associated backward Kolmogorov equation. The Feynman-Kac formula relates the solution of a partial differential equation to the solution of a stochastic differential equation.
Let's denote the backward Kolmogorov operator as $\mathcal{A}$. In this case, it is given by:
$$ \mathcal{A} u(t, x) = \frac{\partial u}{\partial t} + (\theta - x) \frac{\partial u}{\partial x} + \frac{1}{2}\sigma^2 x(1 - x) \frac{\partial^2 u}{\partial x^2} $$
We aim to solve the backward Kolmogorov equation:
$$ \frac{\partial u}{\partial t} + (\theta - x) \frac{\partial u}{\partial x} + \frac{1}{2}\sigma^2 x(1 - x) \frac{\partial^2 u}{\partial x^2} = 0 $$
with the terminal condition:
$$ u(T, x) = \exp\left(-\int_{0}^{T} \rho_{0} + \rho_{1} X_s ds\right) $$
Now, we can rewrite the function $F(t, x)$ in terms of the solution of the backward Kolmogorov equation $u(t, x)$ using the Feynman-Kac formula:
$$ F(t, x) = \mathbb{E}_x\left[\exp\left(-\int_{t}^{T} \rho_{0} + \rho_{1} X_s ds\right)\right] = u(t, x) $$
Therefore, the function $F(t, x)$ is equivalent to the solution of the backward Kolmogorov equation $u(t, x)$.
To summarize, the terminal value problem for $F(t, x)$ using the Feynman-Kac formula is given by:
$$ \frac{\partial u}{\partial t} + (\theta - x) \frac{\partial u}{\partial x} + \frac{1}{2}\sigma^2 x(1 - x) \frac{\partial^2 u}{\partial x^2} = 0 $$
with the terminal condition:
$$ u(T, x) = \exp\left(-\int_{0}^{T} \rho_{0} + \rho_{1} X_s ds\right) $$
where $X_s$ follows the stochastic differential equation:
$$ d X_{s} = (\theta - X_s) ds + \sigma \sqrt{X_s(1 - X_s)} d W_s $$
with $0 \leq s \leq T$ and $0 \leq x \leq 1$.