Expert guide to trading strategy testing vol.2 – Classic method
![Expert guide to trading strategy testing vol.2 – Classic method](/blog/content/expert-guide-to-trading-strategy-testing-vol-2-classic-method/CLASSIC.png)
In the previous article (LINK) we figured out that before you run your trading solution, you should first realize whether your idea has the right to live at all?
To do that, you should undoubtedly test your algorithm on history, and the more the better, and find out exactly with what parameters your trading strategy will work well.
There are probable problems in testing, and the most important and critical issue is over-optimization or over-fitting.In order to avoid overfitting, there are certain techniques that should be used in testing.Let’s call them testing methods.And the simplest one – is the CLASSICAL method of testingThe classic testing method is when you do not bother, just adjust the parameters, and select the best for a particular characteristic. It is important to keep in mind the fact that to apply the classical method of testing it is necessary to have no more than 2 optimizable parameters. Otherwise, even if you heed the recommendations below – there is a high probability of over-optimization or over-fitting.
Whatever testing technologies I use, I always try to have no more than 4 optimizable parameters. Learn to make simple trading strategies – do not overcomplicate them. Take care of your hardware and nerves.PARAMETERS- Average Monthly Profitability (I always look at this parameter because it is important for me to understand how much a robot can earn on average per month), therefore I select at least 5%. This is a good result. Because 5% per month is 60% per annum.
- Maximum drawdown (This parameter is also critically important because it shows how much it would hurt if something goes wrong, but the important thing here is that when you see 20% maximal drawdown and then you run such an algorithm – you are prepared for it, prepared for a loss) Here I pick up to 20% (Such a drawdown, I consider acceptable, but only if it is no worse).
- The recovery factor (This figure indicates how quickly your strategy recovers the loss on the account and generates a new yield) The recovery factor is calculated by the following formula: RECOVERY FACTOR = ABSOLUTE PROFIT / MAXIMAL DRAWDOWN. Quite often I use the recovery factor as a key measure when deciding on strategy parameters.
- The profit factor is simple here – it is all the income for the whole period / all the loss for the whole period.
Obviously, if the profit factor is greater than 1, then your strategy is profitable, but I try to keep strategies with a profit factor greater than 1.4 - EQUITY or profitability graph – this is basically what you see as a whole, if you look closely you can see some flaws in the strategy exactly on the profitability graph. For example:
- It is common with trend strategies: All the profits the strategy has made in 3 years were done by a couple of trades, and the rest of the time either nothing happens, or the capital is plummeting.
- Too strong failures, losses, you will understand it by the maximum drawdown, but still.
- In what periods of time the strategy earns and when it loses. This is just to understand the effectiveness and stability of your trading strategy.
In general, the graph of profitability has to be smooth and constantly there must be an increase, just assess it, see how long the strategy did not earn, when and how it lost, and figure out for yourself, you are ready for it and whether it is ok or not for you? - The number of trades starts from 1000 trades. If your strategy during the testing period made more than 1000 trades and at the same time meets the standards above – it can be used for LIVE trading.
- Cross-testing In general, this is a separate testing technology, but its simplified version is still worth applying when using the classic method.
- When you have selected the appropriate settings based on the above.
- Then apply them to the same timeframe, but on different trading instruments. If you have a capital loss in most trading instruments, it is over-fitting. If the results on most trading instruments are not perfect, but still satisfactory and when the Profit Factor is at least 1.2 you are fine.**REMEMBER!**The classical method of testing – this is the simplest method, and, accordingly, not the most effective, but for the beginning and understanding of the work with testing – it will be enough for you. But, as a rule, it’s better to use other methods and techniques, which we will talk about in the following articles.
Telegram: Jeck SAVINSKYI
Telegram Channel: SAVINSKIY
Twitter: Jeck SAVINSKIY