Discussion of article "Machine learning in Grid and Martingale trading systems. Would you bet on it?"

 

New article Machine learning in Grid and Martingale trading systems. Would you bet on it? has been published:

This article describes the machine learning technique applied to grid and martingale trading. Surprisingly, this approach has little to no coverage in the global network. After reading the article, you will be able to create your own trading bots.

Testing should be performed on the timeframe on which the bot was trained. In this case it is H1. It can be tested using open prices, since the bot has an explicit control of bar opening. However, since a grid is used, M1 OHLC can be selected for greater accuracy.

This particular bot was trained in the following period:

START_DATE = datetime(2020, 5, 1)
TSTART_DATE = datetime(2019, 1, 1)
FULL_DATE = datetime(2018, 1, 1)
END_DATE = datetime(2022, 1, 1)

  • The interval from the fifth month of 2020 to the present day is a training period, which is divided 50/50 into training and validation subsamples. 
  • From the 1st month of 2019, the model was evaluated according to R^2 and the best one was chosen.
  • From the 1st month of 2018, the model was tested in a custom tester.
  • Synthetic data was used for training (generated by the Gaussian mixture model)
  • The CatBoost model has a strong regularization which helps to avoid overfitting on the training sample.

All these factors indicate (which is also confirmed by the custom tester) that we have found a certain pattern in the interval from 2018 to the present day.

Lest us view how it looks like in the MetaTrader 5 Strategy Tester.


With the exception that we can now see equity drawdowns, the balance chart looks the same as in my custom tester. It is good news. Let us make sure that the bot is trading exactly the grid and nothing else.


Author: Maxim Dmitrievsky

 

i use martingale and grid for along time but with combination of vanilla options in order to manage the risk

i really like your idea and would love to see further improvements and results

 

With extraordinary times where Central Banks are printing money like never before it is very likely that many assets are biased towards one direction (upwards). With backtesting of the last 3 years only, this trading system is prone to face higher risk once Central Banks have to hike rates (you can argue if you like that this never happens, but can you garantuee this 100%?)

Then draw downs will be higher than those ~40% as reported in the article. For any serious investor such risks are not acceptable.

 
The idea behind the experiment is valid, since for machine learning and quantitive trading the stop loss is a bad ideia. So the martingale system is pretty valid, but the parameter of the trade is bad. But keep going man, your posts are very good
 
Martingale system is good for making some money in short term(hopefully) But in long term you go bankrupt. No matter how complicated your choice is.
 
Yashar Seyyedin #:
Martingale system is good for making some money in short term(hopefully) But in long term you go bankrupt. No matter how complicated your choice is.

Agree. Grid, hedging, martingale are popular for their quick & regular profitability. They are also responsible of all the complaints against EA being scam, because of the margin call it exposes to being a constant.

It's a logical and mathematical problem, the one who will solve it - in a way or the other - will earn a loooooot of money ! 

According to the graph, the found pattern works from the end of 2016 to the present day, in the rest interval it fails. 

Here's another try with machine learning ... 

Since many years I have a source code of an EA using these techniques, from time to time, when I have an idea, I give a try ... 😉

Reason: