Version 1.6, 1.7
-
This is my financial trading system using ML.
-
I'm still working on this project. If you're interested, feel free to contact me.
- This is the results of my trading strategies (there's full code in Notebooks).
- The trading rule is based on Triple-Barrier Method introduced in Lopez De Prado (2018).
- Triple-Barrier method
- It is a model that predicts whether the outcome of each bet is profit or loss.
- It corrects bets of the first trading strategy.
- Decide how much to buy
- Bet sizing based on Sharpe ratio & Gaussian distribution (Lopez de Prado, 2018)
- Use probabilities of Random forest classification predicted probabilities
- Scale with minmaxizer
- Here are Annualized Sharpe Ratio and Cumulative Returns of three strategies (only long strategy which excludes short selling):
- First trading Strategy: This is a primary model using only technical analysis. (predict when to buy)
- Second Meta-Label: This is a secondary model using ML algorithm on the trading strategy. (predict whether its bet is profit or loss/ correct bets of the trading strategy) /I used Random Forest and LSTM here.
- Bet Sizing: This is a sizing model using predict probabilities of ML algorithm used in Meta-Labeling ()
- Buy and hold: Buy-and-hold for an entire period.
And those strategies were introduced in Lopez de Prado, Advances in Financial Machine Learning.
- Advances in Financial Machine Learning, Lopez de Prado (2018)
- mlfinlab, https://github.com/hudson-and-thames/mlfinlab
- ta, https://github.com/bukosabino/ta