Giter VIP home page Giter VIP logo

stocks-19's Introduction

Stocks Prediction

System for Stock Inefficiency Identification and Movement Prediction

I no longer work on this personal project. Keeping it here as my portfolio and for knowledge sharing with whoever might find it usefull. Here I used Python, C++ 11, Sklearn, Tensorflow to Pytorch and Libtorch Api (mostly).

Several tentatives by my head, lots of learning and a little experience on financial market. Have used from sklearn, tensorflow to pytorch. Binary options, future contracts and stocks. Pandas and written a bunch of code starting in April 2018. Have used Metatrader 5 since I figure out my own backtest engine was too much risk and after too many failures. An then failures was all I had so far.

Much and much more than I have learned by myself is written on the book:

Advances in Financial Machine Learning

I would have save thousands of hours if I had started from it. But here we are and now that is my reference and somewhat goal.

a bit more of self learning wisdom:

  1. Never play too long on a prototype otherwise you are lost!
    Prototype notebooks are ideas that should soon be transformed in an independent python module for backtesting.
  2. Write unit tests! (lessons learned months wasted) Simple and nailing the failure.

Summary of book (Advances in Financial Machine Learning) guided implementation:

The idea of working with Dollar Bars (2.3.1.4) made it mandatory to use C++ language due performance reasons.
Also C++ using pybind11 makes Python integration awesome. Why Python integration?
Because while you develop you can research and explore ideas using jupyter notebooks.
Also because the book snippet examples are in Python (Pandas mostly).

So evertyhing

  • Chapter 2 - Financial Data Structures
    • 2.3.1.4 Dollar Bars
      • C++: MoneyBars class/struct
    • 2.5.2.1 The CUSUM Filter
      • C++: CCumSum\CCumSumSADF classes
  • Chapter 3 - Labelling
    • 3.3 Computing Dynamic Thresholds Volatility estimates to define stop-loss and take-profit.
      • C++: Return on Bars CMbReturn class. Stdev of Returns CStdevMbReturn inheriting also CTaSTDDEV.
    • 3.4 The Tripple Barrier Method
    • 3.5 Learning Size and Side
      • C++ : labelling.cpp, events.h, indicators.h
  • Chapter 4 - Sample Weights
    • 4.3 Number of concurrent labels Uniqueness of a sample. Determination of sample weight by absolute return attribution.
    • Python :
  • Chapter 5 - Fractionally Differentiated Features
    • 5.4 The Method
    • 5.5 Implementation
      • C++ : CFracDiff class uses Libtorch API (CUDA)
  • Chapter 7 - Cross-Validation in Finance
    • 7.4 A solution Purged k-fold CV
    • Python :
  • Chapter 17 - Structural Breaks
    • 17.4 Explosiveness Tests
    • 17.4.2 Supremum Augmented Dickey-Fuller
    • C++ : a approximated version CSADF class GPU optimized w. Libtorch API (CUDA)

stocks-19's People

Contributors

eusoubrasileiro 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.