I’ve recently been calibrating some oil and gas models, which involved parameter estimation of the well-known Ornstein Uhlenbeck mean reverting process.
I found that it’s very hard to accurately calibrate the mean-reverting-strength parameter of the model, so I looked into this in some more detail, including simulations and Matlab code to simulate and estimate the process, using both Maximum Likelihood and Least Squares estimation techniques, and I’ve documented it here (PDF).

Thank you so much for this clearly explained article.
what is wrong or what to do if the coefficient b is negative? i’m trying to estimate rolling lambdas/mu’s (15 day period) and getting some negative b’s with least square and likelihood method…please help me…