Code Monkey home page Code Monkey logo

stockforecast's Introduction

StockForecast

Basic framework for using a variety of models to forecast and simulate stock market performance.


To-Do

  • Switch getopt to argparse
  • Command line arguments for start and end dates
  • Neural network model
  • Add more performance metrics
    • Good/Total predictions
    • Performance vs random
    • Portfolio improvement as function of stock improvement
  • Improve optimization code to avoid overfitting
  • Add makefile for doxygen, include profiling graph (code here until then)
    • python -m cProfile -o logfile stocks.py
    • gprof2dot -f pstats logfile -o dotfile
    • dot dotfile -Tpng pngfile
  • Figure out why S&P and DJIA seemingly observe different holidays
  • Make documentation more doxygen friendly

History

April 4, 2017

Making the initial commit of this code to github. As it stands, the functionality ported over from my matlab stock framework is limited to linear and random models, but overall generalizability and functionality should be greatly expanded by using python. This also allows for installation on a server without another matlab license, which is nice.

Sample of the current state of predictions:

IR Model Randombuy Model
f f

Working well at buying low and selling high short term, but definitely needs improvement in forecasting long term trends. Performance isn't great for stocks in continual decline (which makes sense, except previous nonlinear models have set high expectations for being able to avoid this problem).

Also, just for fun, the profiler graph of a run: f

stockforecast's People

Contributors

victoirv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.