Euler discretization for a trending Ornstein-Uhlenbeck process Matlab Code

535 Views Asked by At

I'm working on a matlab code for a trending OU process. I could easily find lot of material and reference for a stationary OU process and how to discretize it using a euler scheme like:

$$X_{n+1}=X_{n}+\theta(\mu−X_{n})\Delta t+\sigma \Delta W_n$$

However, I couldn't find anywhere any hint about how to deal with a stochastic trending version of this process:

Can someone give me a hand about it?