I have the Ornstein Uhlenbeck process defined as:
\begin{equation} dX_t = k \: (\theta - X_t) dt + \lambda dW_t \end{equation} With $k > 0$ and $W_t$ a standard brownian motion. Following tutorials, I use $Y_t = X_t exp(tk)$ to get to a solution:
\begin{array} (X_t = \theta + exp(-tk) \: (X_0 - \theta) + \lambda \: \int_0^t exp(-k(t-s)) dW_s \\ X_t = X_0 \: exp(-tk) + \theta \: (1-exp(-tk)) + \lambda \: \int_0^t exp(-k(t-s)) dW_s \\ \end{array}
the question is: How do I get from that last expression back to the original SDE? For when I try to do the differentiation I get:
\begin{array} (dX_t = -k\: X_0 \: exp(-tk) dt + k \: \theta \: exp(-tk) dt + \lambda \: exp(-k(t-t)) dW_t\\ dX_t = k\: exp(-tk) (\theta - X_0)dt+ \lambda dW_t \neq k \: (\theta - X_t) dt + \lambda dW_t\\ \end{array}
Which is different from the SDE:
- There's an $exp(-tk)$
- The mean reverting term has a $X_0$ instead of a $X_t$
I think I am messing up with the way I am differentiating.