Why you should use an autoadaptive approach

Today’s markets are not the same as they were 30 years ago. The impact of algorithmic trading on the markets is significant and changes and fundamental movements within the markets are much faster than ever before. Today, knowing how to adapt is more important than ever in history. And that should also be one of the features of your current ATS.

There are many ways to approach an adaptive ATS problem; from simple methods to very sophisticated ones (which are technically far below the capabilities of an ordinary user). Still, a common user need not despair as there are still some solid approaches to ensure greater customization of our ATS systems to ever-changing markets.

Today I will describe three of these methods and my experiences with them. I would like to note that these are basic approaches available to any ordinary user.

1. Adaptive indicators

A variety of autoadaptive indicators have been around for many years. Their principle is quite simple – these indicators most often contain one of the means of measuring volatility or market trends.

A simple example of such indicators can be KAMA (Kaufman’s Adaptive Moving Average). There’s nothing complicated about that. You just need to add one more component to a regular moving average – a component that “calculates” where the markets are at the moment; whether they are currently in a trending or non-trending phase. For example, Perry Kaufman used another of his own indicators called the Efficiency Ratio (ER) for KAMA. This indicator simply fluctuates in the range of 0 – 1; a market closer to number 1 would trend and a market closer to 0 would trend less. After that, all that remains is to choose a period range – e.g. from 2 to 50. Connecting to an ER indicator results in an auto-adaptive version of a moving average that uses a higher value of the set range as the ER approaches 0 (when ER is at 0, EMA uses period 50). The reason for this is that there is too much “noise” in the market and therefore lower periods are highly inappropriate. Or vice versa – when the market is trending, lower EMA numbers are automatically used and ER approaches number 1 (when ER is at 1, period 2 is automatically used). The periods of the EMA indicator are not fixed here. They change dynamically in the range of 2 to 50 (or other chosen range) depending on how the market moves.

In practice, such settings of auto-adaptive indicators look quite simple. For example, AMA has three parameters to set.

The first parameter specifies the period calculated by the ER indicator, the second and third parameters define the period of the EMA period, which automatically adjusts to the current market situation (based on the ER indicator).

In practice everything works very well and reliably and the indicator is really auto-adaptive – it easily adjusts EMA numbers to the current market situation.

My experience with adaptive indicators is mixed. Most of them are quite interesting (e.g. KAMA), while some, according to my experiments, are on par with all other ordinary indicators.

This adaptive category isn’t bad at all, but it’s not as functional as the second category that I use all the time.

2. Regular re-optimization of the systems

Based on my experience and in hindsight I find it impossible to have a “universal” combination of parameters in our system. The markets move and change too quickly. With the help of a high-quality process, it is possible to find a truly robust combination of parameters for our system (ie settings of indicator periods, etc.), but nothing compares to regular, high-quality re-optimization.

Regular re-optimization is not complicated. Basically, after a certain predetermined time, you perform a re-optimization of your system in order to obtain new parameters in line with the latest market development. It means those who are better adapted to the current environment. The process of periodic re-optimization can also be simulated – it’s a fairly simple thing called Walk Forward Analysis (WFA) which can be simulated in many programs these days.

What is WFA? It’s nothing magical or complicated. We simply take data with which we backtest regular re-optimization of our system. We divide such data into 10 identically sized segments (we will try to simulate regular optimization 10 times) and then we divide each segment into two parts – one smaller and one larger. The larger part, typically 70-80% of the data, is used for the optimization called In-Sample (IS). Here we perform a basic backtest and look for (tweak) parameters that will make our system more interesting – not only from a profitability point of view, but also from the point of view of equity curve stability. Then we take the selected parameters and test the rest of the data – 20-30% that we didn’t use for the primary backtest and thus for an optimization of the parameters. This remaining data is called Out-Of-Sample (OOS) and shows us how the system is able to constantly adapt. If the system has such a capability, then we also carry out regular re-optimization in live trading.

Today, I personally re-optimize each of my systems on a regular basis, ie I consider each system that I trade to be auto-adaptive. The process of re-optimizing and choosing an ideal period and especially the execution period is very important.

3. Having a plan for when to shut down the system completely and when to use it again

This last point doesn’t seem relevant to the adaptive problem, but in my experience it is. Knowing when to turn the system off when conditions are unacceptable and when to turn it back on when we are coming out of our drawdown is one of the supreme adaptive skills in my view.

This task is extraordinarily difficult and can be approached in many ways. From fairly complex algorithms that can detect when the system is currently not suitable for a given market and automatically turn off such a system for a certain amount of time, to simple rules derived from our capabilities and common sense.

The basis for such an approach should always be a drawdown. The historical drawdown is an important indicator (even if it is “just” the backtest). Its surpassing in live trading definitely indicates something important, hence the rule of turning off the system when it exceeds the historical DD by 1.5x and turning it back on when it regains at least 50% of its recent one, for example Drawdowns achieved, a basic rule its way to use and test.

In this context, I have to mention another experience I’ve had: what I haven’t found useful at all, and what I consider to be one of the worst approaches, is filtering stocks using moving averages. For example, it means shutting down the system if its equity falls below its moving average. This method is very treacherous, has many pitfalls and simply does not work.

Surprisingly, a better use can be found in rules based on drawdowns. A more conservative and much better approach is to use MC and OOS intervals.

Conclusion

In this article I just “touched” an adaptive problem from the simpler point of view, accessible to a normal user, while using approaches that I fully support – e.g. WFA. From my experience, it’s not possible to create a good quality ATS without using some adaptive elements in our workflow. On the other hand, with regular intraday or swing ATS, there is no need to take an extreme approach and re-optimize the strategy almost every day or minute. An interval of a few months is more than enough. Nevertheless, it makes sense to constantly think about how to be as well prepared as possible for the constantly changing market environment and how to have tools at hand that help us to adapt better and faster.

Happy trading!