Overview

The purpose of this project is to design and implement a machine learning algorithm to predict daily stock price movements. Stocks vary in their prices on a daily basis. As such, investors capitalize on this volatility to buy and sell stocks to generate profits. Thus, a machine learning framework with accurate price prediction capabilities would allow investors to optimize their trading strategies to mitigate losses and optimize profits.

The system is two-fold. The first part of the system is the actual machine learning framework for making price predictions. These predictions should predict the price movements of stock accuracy more than 50% of the time, i.e., better than guessing. The second part of the framework is to test the effectiveness of these predictions from a financial standpoint. For the purposes of back-testing the algorithm’s effectiveness, the algorithm first calculates a “market benchmark.” This benchmark essentially measures how well the market is doing by simulating the profit or loss that would occur if an investor bought and held a stop. Secondly, the algorithm also calculates how well the investor would do using the price predictions to make buying and selling decisions. The goal is for the algorithm’s predictions to enable the investor to outperform the market benchmark.

The final design did meet the design requirements set from the above discussion to some extent. There were many intermediary steps leading to the final design. This included running multiple experiments to train find the best combination of hyperparameters and input features that would produce the most accurate predictions. Additionally, some changes did have to be made to the initial design as complications arose with the input features. Specifically, additional steps were required for data pre-processing to increase the accuracy of the algorithm’s final predictions. The best final design of the machine learning framework was able to predict the directional price movements more than 50% of the time accurately, but the predicted magnitudes of those movements did have a lot of error. Predictions experienced the least amount of error when shorter price forecasts were made. As the number of days predicted increased, the amount of error also rapidly increased. Overall, the best design could be useful for giving investors an edge in determining the direction of stock price movements.

Skip to toolbar