Predicting price using HMM

Once we extract the features from the data, we can now move on to predicting the price of the stock. We want to predict the closing price of a stock on a particular day, given the opening price of the stock on that day and stock prices of previous days. 

The first step would be to train an HMM to compute the parameters from the given sequence of observations that we computed earlier. As the observations are a vector of continuous random variables, we have to assume that the emission probability distribution is continuous. For simplicity, let's assume that it is a multinomial Gaussian distribution with parameters (μ and Σ). So we have to determine the following parameters for the transition matrix, A, prior probabilities,  ...

Get Hands-On Markov Models with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.