This month I have published a new article on Currency Trader Magazine which discusses the use of time filtering in order to improve a simple moving average technique. However the idea of this article was not simply to show that introducing additional degrees of freedom can enhance the historical performance of a trading strategy with optimization (an almost certainty) but that careful choosing of “time blocks” can lead to enhanced performance for trading systems with a reduced risk of curve fitting. On today’s blog post I want to talk a little bit more about this November article, why I believe it gives some very useful conclusions and what the next steps to continue this research are going to be. I would also like to discuss how this relates to Qallaryi and Asirikuy trading system design. As always you can download this article for free (only on Nov and Dec 2012) by following this link.
First of all let me say that the idea of time filtering – trading only within a fixed set of market hours – isn’t something new. In Asirikuy we have used systems with time filtering for more than 2 years and even moving average cross systems with time filtering – as suggested by Franco – were implemented in Asirikuy in the form of Qallaryi. However up until now it had been problematic to properly back-test Qallaryi – because the initial F3 system code had some problems – and it is only up until now that this strategy can truly be evaluated in a more reliable fashion. Thanks to the Asirikuy F4 framework it is now possible to evaluate Qallaryi properly and start studying how time filtering actually affects a trading strategy.
The main problem with time filtering comes when you realize that it introduces 24 new degrees of freedom that lead to an instant possibility for curve fitting. If I optimize a strategy with all this freedom, the result is usually a system that trades in a very spotty manner (for example trade at hour zero and not at 1, then at 2 and 4 but not at 3, etc). This spotty assignment of trading hours comes from the filtering of bad trades in the historical data that leads to a very strong curve fitting of the strategy. Time filtering without a reason leads to an excessive adaptation of a strategy to the particular quirks of the historical data it is being optimized on. In my mind there shouldn’t be reason why time filtering must be a “bad idea” only that it needs to be applied in a way that makes sense (not “brute forced” into a strategy).
Franco had initially made the suggestion to try to only trade crosses that happen when there are significant increases in volatility – such as market opening times – but I quickly found out that this lead to bad trading results because crosses that happen within these hours generally do not predict a continuation. When surges in volatility generate the cross, the “big part” of the move has already been exhausted in the initial movement. The trick was then to take the entirely opposite approach and filter time zones that are not widely known for their big increases in volatility. The filtering of these time blocks and the explicit evaluation of the removal of a market opening hour, leads to some very interesting conclusions (which you can read on the CT article).
In general this article attempts to show that time filtering can be a very valuable tool to improve trading systems provided that it is implemented in a way that obeys some good rationale. Implementing time filtering by strict optimization seems to be a bad idea – can easily lead to curve fitting – so a good level of intervention in assigning blocks and avoiding “spotty hour behaviour” is fundamental to arrive at more robust trading results. If you would like to learn more about trading systems and how you too can learn to design trading strategies please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)