https://123dok.net/document/zkw0vnom-detecting-mean-reversion-exchange-rates-multiple-regime-model.html