sharavsambuu / trading-rules-using-machine-learning

This is my financial trading system using ML (Random forest & LSTM). Most of the methods are based on 'Advances in Financial Machine Learning' by Lopez de Prado.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trading rules using machine learning

  • This is my financial trading system using ML.

  • See Notebook

  • The other example using daily stocks: Project

Momentum strategy with machine learning

  1. Financial Data and Bars

    • Form time/dollar bars with tick data
  2. Getting Trading Signals

    • Momentum strategy (RSI..)
    • Additional ML regime detector
  3. Trading Rules

    • Enter rules with trading signals
    • Exit rules (triple-barrier method)
    • Binary Labeling (Profit or Loss)
  4. Strategy Enhancing ML Model

  • Get Features (X)

    • Market data & Technical analysis
    • Microstructure features
    • Macroeconomic variables
    • Fundamentals
    • public sentiments with NLP
  • Feature Engineering

    • Feature scaling
    • Dimension reduction
    • Feature Analysis with feature importance
    • Feature selection
  • Machine Learning Model

    • Cross-validation (time-series cv / Purged k-fold)
    • Hyperparameter tuning
    • AutoML with autogluon and select the best model
    • Results (accuracy, f1 score, roc-auc)
  1. Trading
    • Bet Sizing
    • Trading Simulation
  2. Results
    • Cumulative returns, Sharpe Ratio, max drawdown

Financial Data and Bars

  • ETH/USD 5 min data (2019.1.1 ~ now)
  • The trading rule is based on Triple-Barrier Method introduced in Lopez De Prado (2018).

References:

Flowchart

ML Trade Networks

About

This is my financial trading system using ML (Random forest & LSTM). Most of the methods are based on 'Advances in Financial Machine Learning' by Lopez de Prado.


Languages

Language:Jupyter Notebook 100.0%