Here is the "twin" question of Getting the next price of a GBM (Geometric Brownian Motion) but for GBM with reversion
As in that case, I'd like to write a formula for the next price, as function of:
-PreviousPrice -DayElapsed (this can be any fraction, however small, of a day) -Drift (daily drift = annual drift% / 100 / 250) -ReversionSpeed -Volatility (daily volatility = annual volatility% / 100 / sqrt(250)) -N01 (standard normal realization)
I got from a site this stuff (which seems a bit too involved for my taste):
expTerm1 = Exp(ReversionSpeed * DayElapsed) Term1 = Log(PreviousPrice) * expTerm1 OneMinusexpTerm1 = (1 + expTerm1) Term2 = (Log(InitialPrice) - Drift / ReversionSpeed ) * OneMinusexpTerm1 OneMinus_expTerm_2 = 1 - (expTerm1 * expTerm1) Term3 = (Volatility * Volatility ) * OneMinus_expTerm_2 / (4 * ReversionSpeed ) Term4 = Volatility * N01 * Sqrt(OneMinus_expTerm_2 / (2 * ReversionSpeed)) NextPrice = Math.Exp(Term1 + Term2 + Term3 + Term4)
Could you kindly a better expression (or appropriate corrections to the above) **using my notation and parameters above (assumed <> 0) ** (and/or any useful integration, of course) ?
(The source for my "attempt" above is: http://marcoagd.usuarios.rdc.puc-rio.br/sim_stoc_proc.html#mc-mrd but I am not sure if I got this right.)
P.S. I just want to get 1 preliminary implementation, using all the above parameters (those are constants specified by the user)(volatility, drift, reversion speed, reversion price or "mean"). One of your own choice would do. I am NOT after modeling any instrument in particular, at this time. Will see later the conceptual variations. It's just for testing my software interface. (Later will focus on other concepts). Thank you