Skip to content
Predicting stocks with regression models
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore updated gitignore Jan 17, 2019 fixed getting started section in readme Jan 26, 2019
presentation.pdf updated slides Jan 25, 2019

Stock price prediction


Can you predict the stock market from the price time series alone? What is easier short-term or long-term predictions? In this study, short-term prediction appears to be much harder than long-term predictions. It may be possible to predict future predictions of GLD stock with a simple OLS model motivated by physical spring (harmonic oscillator) dynamics. Further study needs to be done to see if these predictions can be used for a profitable trading strategy relative to a baseline strategy such as a buy-and-hold strategy of the S&P 500.

See presentation.pdf for more details!

Time-series methods

Methods used in this study:

  • Zero-mean model
  • Spring model


Make sure to have the following python library modules:

  • matplotlib
  • pandas
  • sklearn
  • numpy
  • statsmodels
  • tqdm
  • jupyter
  • fix_yahoo_finance
  • selenium
  • seaborn

Getting started

Clone this repository with git clone Launch the jupyter notebook by running jupyter notebook, then open gtrends-without-exog.ipynb.

You can’t perform that action at this time.