You have created a trading algo. The Algo is profitable in the backtester. Before unleashing it with real money, you’ve got to first tighten the screws. Eso es, ensure your algo is fine-tuned so it can deliver optimal returns. There’s one major challenge ahead of you.
Primeramente, your strategy is rather simple. You may go through the detailed process of building and optimizing a strategy, including curve fitting, correlation and so on. But you want a simpler process; something leaner, that will fit your modest needs.
En segundo lugar, you may not yet have mastered the full technique of optimizing. You are still learning and want to try off with a simple process.
One technique I find especially simple in optimizing your algo is probabilidad. The probability method, in essence, contains many components of a full optimization technique. Sin embargo, it tends to rely more on common sense and logic to narrow the options and optimise the algo. That makes it a pretty good way to begin the entire concept of optimizing a strategy. Por otra parte, you will find it easier to digest.
The essence of the strategy—optimize by elimination.
Algo Case Study
The following Algo is a simple one. Let’s call it RSIMV which is RSI and Moving Average. Here is what RSIMV describes through conditioning:
If Open Positions = 0 entonces
Si (Massachusetts(30)>Massachusetts(14)) and RSI=<60 entonces
Open Buy (50,000) {It will buy 50 lotes}
Set Stop Loss = Price – 50{Pips}
Set Limit= Price+ (50*2)
End
La estrategia: If the moving average cross points on a bullish trend and the RSI is equal or below 60 it means that the rally has some length before reaching an oversold level (RSI above 80). That points to a good buying opportunity.
Looking at RSIMV, you can conclude there are four parameters to optimize: RSI and two Moving Averages
Starting with the Moving Averages, we will look at the 14 y la 30 día. Seemingly, the options are endless, with many combinations of moving averages to test. En teoría, Eso es correcto, but that is where probabilidad comes in.
When we look at the chart, we can see that the longer the averages (orange and red) the lesser the chance that there is a combination of a low RSI and a bullish momentum.
Por otra parte, a combination of a low RSI and a bullish signal sólo occurs when the two averages, the fast and the slow, have more or less a 2 a 1 proporción (such as a 30 y 14).
Those two conclusions help us narrow the parameters we are looking for.
The highest likelihood of finding a better set of averages is with faster averages, not slower, and those that have a ratio of 2 a 1. And let’s not forget we already know that 14 y 30 obras. So we shouldn’t move too far up the scale.
We will use 25 y 12 as the first combination and 20 y 10 for the second. Both are faster than the original parameters, have a roughly 2 a 1 proporción, and are close to the original settings.
- 25,12
- 20,10
Moving into the RSI parameter, narrowing the options is even simpler. We know the RSI cannot possibly be higher than 60, because then we will be left with insufficient upside before the pair turns oversold.
Por otra parte, if we try an RSI below 40 it’s unlikely that it will occur while the moving average cross is bullish.
Desde, as in the Moving Averages case we know the original setting worked, we know we only need a minor tweak. With no way to go but up we are left with two reliable options – RSI<55 and RSI<50.
Hence our options are:
- C) (55)
- D) (50)
As we can see from testing all the alternative parameters, what we needed was a better entry for the RSI. As we intended… minor tweaks.
Don’t Optimize Too Much
Ironic as it may sound, optimization sometimes has a downside. At times, we are tempted to over-optimize to such an extent that our newest strategy no longer resembles our original, pre-optimization plans. That can throw us into an eternal loop and waste precious time. Don’t be tempted! Don’t fall in love with the optimization process. Después de todo, optimization is merely tightening the screws, not building the engine. If your strategy works, confine your optimization to minor tweaks. Si no lo hace, optimization won’t help and you’ll need to start from scratch.
Y, finally, a practical tip; always keep records of the results of your original strategy and compare it to your current, post-optimization strategy. This way you can always make sure that you’ve really optimized your strategy.
La línea de fondo
Seguro, the optimization technique isn’t perfect. But the take away here is that if you really understand your strategy, you can use logic to in order to find better settings. If you’re a beginner and lack the knowledge for advanced optimization techniques, optimizing through the logic of probability is a powerful tool to have.