https://9dok.net/document/z3doogkm-hidden-markov-models-estimation-theory-and-economic-applications.html