Skip to content

21hub/daily-stock-forecast

 
 

Repository files navigation

Daily Stock Forecast

Daily Stock Forecast is a cloud based machine learning tool for day trading professionals. The site pulls from a current list of ~7,000 stocks across the AMEX, Nasdaq, and NYSE exchanges and performs epsilon-Support Vector Regression based machine learning on historical values to forecast the open, close, high, low, and volume of the next business day for each stock in our expanding universe.

Daily Stock Forecast can be viewed today!
http://1.daily-stock-forecast.appspot.com/

Screenshots of Daily Stock Forecast live and in action:

Features

  • Transparency of results. Each forecast comes with a 90 day performance analysis to expose the Slope and R2 values of past predictions for each metric. Additonaly, you can mouse over each histogram bar to see that metrics correlation scatter plot.

  • Frontend powered by Google App Engine and Google NDB Datastore, Google Charts, and in development is a new Polymer based site.

  • Backend powered by Google Compute engine and scikit-learn to perform machine learning on historical stock prices.

  • Statistic and machine learning libraries like matplotlib, scipy, pandas, and scikit-learn support development, analysis and in development visualization of stock forecasts.

File Structure

Key files in the application hierarchy.

  • daily-stock-forecast-gae
    • dailystockquant.py (App Engine homepage script)
      • indexOld.html (Current website homepage, loaded into above script w/ Jinja2 templating)
      • index.html (In development Polymer version of site)
    • forecast.py (Cron job to launch a compute engine instance to perform the forecast automatically each business day)
  • daily-stock-forecast-gce
    • DailyForecast.py (Runs the forecast, publishes to datastore)
      • GaussianProcess.py (Machine learning regression model, not applied to forecast currently)
      • GetHistoricalFromYahoo.py (Download the historical values for each stock in the universe)
      • GetSymbols.py (Use Nasdaq website to download list of stocks from 3 exchanges)
      • SupportVectorRegression.py (Machine learning regression model)

Installation

The frontend runs on a Google App Engine instance. It utilizes python, WebApp2, Jinja2 templating, JQuery, Google Charts, and soon Polymer and web components.

The backend and analysis can run locally if the datastore writing is disabled, but the current datastore exchange expects that the forecast is performed "inside the project" on a Google Compute Engine instance with the ability to securely access the Datastore.

Dependencies

  • Python 2.7
  • numpy
  • pandas
  • pytz
  • sk-learn
  • googledatastore
  • Polymer (0.5.2+)

Credits

Daily Stock Forecast was developed by Derek M Tishler,
https://www.linkedin.com/profile/view?id=263507105

Contact

For other questions, please contact dmtishler@gmail.com.

About

Daily Stock Forecasts using Machine Learning (SVM regression)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 61.3%
  • Python 38.7%