Continuing the topic of copyright and original techniques, I should once again shed light on the topic of statistics of trading strategies. One of the areas of my research is finding ways to move from the camp of algo enthusiasts, working with an effective stop-loss, to the camp of those participants who pay more attention to the predictive ability of entries. Hereinafter “a stop-loss” is used interchangeably with “a stop”.
Let's look at an example: Which strategy seems more comfortable to you?
- Smart stop:
- 200 trades per year
- 35% of profitable trades and 65% of unprofitable trades
- The exact size of the stop is unknown
- Historical profit size is about 3 times more than the stop
- There are 1-2 unprofitable quarters in a row in the historical interval
2. Smart entry:
- 600 trades per year
- 65% profitable of trades and 35% of unprofitable trades
- The stop’s value is always known and it is relatively small
- Take profit size is equal to the stop loss size
- There is not a single unprofitable quarter in the historical interval.
The second option seems more attractive to me, but why is a small stop necessary with this approach? There are 2 reasons for this.
1. When we deal with inefficiencies, market participants often realize that they have been led into a trap and quickly retract opportunities to exploit this inefficiency. Therefore, we need to close the position rather quickly.
2. When optimizing a strategy, a fitting algorithm will most likely get you a large stop-loss size, but this is dangerous: while waiting for a position to close, many entry signals will be missed. For the smart entry method to work well, this option is not suitable for us.
Why move from a smart stop approach to a smart entry approach?
1. Those who have learned to work with patterns can use effective stops in the portfolio as well, and those who work in only one direction will end up with a monotonous portfolio of strategies.
2. Psychologically, the 2nd option of strategy sets suits me more, emotionally I feel calmer when I have more than 50% of profitable trades.
3. If something goes wrong, I can quickly diagnose negative results and replace the portfolio strategy without waiting for a negative quarter.
4. When working with trailing stops and other smart stops, it is impossible to apply market statistics, since in the process of holding a position (usually from 1 day to 3 or even more), we miss a large number of signals and, as a result, are missing out on trading opportunities.
5. When the exact value of the stop is unknown, we cannot use money management efficiently, since there are too many missed stops.
Hint: Strategies that include smart stops are relatively stable, especially in our volatile times.
Problems and solutions
One of the problems with the smart entry approach is that it is quite difficult to identify qualitative predictors of entry triggers. To do this, you have to use machine learning, look inside the candle, at the order flow. All this requires writing new software, developing unusual concepts, so the project is long-term and still in a state of active research.
Also, when developing a strategy with an equidistant stop, I encountered obstacles. As a rule, strategy developers test a robot using a fixed trading volume, or "% of capital". In the case of equidistant stops, this leads to problems:
• If our signals are accurate and rather rare, then there is no problem. But it is likely that a lot of signals will be issued, which will lead to high transaction costs (slippage due to a large size, large commissions) and, most importantly, an increase in account volatility. That is why it is the big stops that are found during optimization, which makes any search for the predictive ability of entries meaningless.
• The logic of our algorithm becomes easy to reverse-engineer while analysing the history of our activity in the market, especially when using fixed stops. .
A complete solution to these problems is a complex kind of inputs, which are based on really worthwhile predictors derived from research.
Let's look at a simpler solution - some designed transitional option that partially solves the above problems of equidistant stops.
The logic of this technique is as follows: knowing the allowable leverage on each of the futures, as well as the frequency of signals of our strategy (which depends on the accuracy of the predictor), we can calculate the size of each transaction in such a way as to hit 80-100 percent of all signals of this predictor, thus tossing "all possible coins" (or the maximum possible (in terms of risk) part of them).
In other words, we enter on each signal with a certain number of contracts as long as the capital allows us within safe leverage.
With this approach, the problem of account volatility goes away, since in fact there are more transactions, but:
a) they can be multidirectional;
b) the entry does not take place for the entire amount allocated to the strategy;
c) equity should be smoothed out and drawdown should decrease;
d) and most importantly - the commission remains at the usual level, and small slot slippage is minimized.
When using a limit order, a small lot is absorbed more easily, unless, of course, there is no “powerful price level” nearby.
As a result, we get a strategy that enters 1-3 lots on each signal, however, when the leverage limit that we specified for the strategy is exhausted, the entries stop, protecting you from commissions.
Because the strategy can enter both sides at the same time, in the presence of high-quality entries, it is possible to achieve good optimization of the Initial Margin.
Advantages of the multiPlay technique, which works in both directions:
- Initial Margin falls and you can work with less risk or with greater leverage
- It becomes much more difficult to calculate the trading logic, especially in public trading
- Equity volatility decreases, its smoothness improves.
Parameter stability (according to an integrated indicator, that includes NetProfit, Drawdown, Recovery)
Here’s an example of a strategy using this technique. As always, I warn you - this is not a strategy for real trading, but an example of a technique - trading it “as is” I DO NOT recommend. I am attaching the code to modify it if you like the idea.
- 5-minute candles
- 7 years lookback
- Trade volume = 1 contract per signal
- Maximum 30 open positions
- Optimization in 4 years
- Limit orders
- Commissions taken into account
How to use and improve this technique?
You can improve the optimization of collateral by adding 2 DataSeries LongShares and ShortShares. This is necessary so that the strategy does not enter all contracts in one direction, but leaves a part of the capital for opposite positions. This is the best optimization of capital. Personally, I am more interested in closing positions as soon as possible, it is better to enter again and exit quickly again.
Is this approach a panacea for all the problems of algorithmic strategies?
As I pointed out earlier, this is a transitional stage. It is likely that many effective entries with the same small stop will look much better, but such entries with great predictive power are not easy to find.
I am sure that this technique will be useful to many, at least from the position that if you do not know how to identify the predictive ability of entries, such a stop will be able to provide you with guiding principles when looking for them in Wealth-lab.
And, of course, you need to test everything using your own experience. To do this, you need to run tests on candles and ticks, assess strategies’ extent of stability, and diversify your portfolio of strategies.