Stock Price Forecasting

This project's goal is to be able to reasonably forecast the closing price of any stock. This is obviously an ambitious goal that nobody has done even remotely close to perfect, but predictive modeling is widespread for use in trading stocks. I do not expect to match a model designed by a dedicated team, but hope to be able to predict trends with modest accuracy.

I approach this problem by attempting to predict rolling means of the closing price, which wipe out traditionally noisy daily closing values. From rolling means, it's possible to approximate the value of closing prices.

The general process I take is as follows:

  • Clean the data, using techniques specific for how stocks may be adjusted over time.
  • Generate features typical for stock forecasting, including momentum, Bollinger Bands, and RSI, plus some custom features.
  • Scale any features, so they are more friendly for our ML algorithms
  • Train different machine learning algorithms, tuning hyperparameters via cross validation, and select the best performing model
  • Fill in predicted values from our predicted rolling means by interpolating between the rolling means
  • Analyze results using an external dataset

To explore the process, click anywhere on the left hand menu, or start right here with Data Cleaning.