Using a Hidden Markov Model as a Financial Advisor

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: People have been trying to predict the stock marketsince its inception and financial investors have made it theirprofession. What makes predicting the stock market such ahard task is its seemingly random dependency on everythingfrom Elon Musks tweets to future earnings. Machine learninghandles this apparent randomness with ease and we will try itout by implementing a Hidden Markov Model. We will modeltwo different stocks, Tesla, Inc. and Coca-Cola Company, andtry using the forecasted prices as a template for a simple tradingalgorithm. We used an approach of calculating the log-likelihoodof preceding observations and correlated it with the log-likelihoodof all the preceding subsequences of equivalent size by turningthe time window by one day in the past. The results show thatmodeling two stocks of different volatility is possible, but usingthe result as a template for trading came back inconclusive withless than 50 percent successful trades for both of the modelledstocks.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)