https://9pdf.net/document/yr3dpkr8-discrete-hidden-markov-modelswith-application-to-stock-tradingalgorithms.html