Systematic Trading Continued. Unwrapping the onion

Photo
tags
By NikolayFrolochkin from Pixabay

Systematic Trading Continued. Unwrapping the onion

by SCOTTMARCH 15, 2017

One continual theme in my own trading is that every time I think I have it figured out – I get punched in the face with a unexpected problem. The tendency is to go more complicated, but often the solution is a degree of acceptance around the nature of the game. Sometimes my edges work, sometimes they don’t. Sometimes they stop working for long periods, 6 months or more. That’s actually ok for me, but it’s not ok for other people. The ultimate systems you choose have to suit your personality. If you cannot handle extended periods of working hard without making money (I can) then you have to retool your systems to avoid this.

My opinion is that the best edges are robust. Robust edges tend not to disappear, but not post objectively high results either (in SQN, Sharpe or expectancy). I’m an investor in a fund with the following returns (after fees) off a very simple and standard approach to trend following, no different to a number of other firms doing very similar things. You can see this is clearly an amazing investment, but it is lumpy, producing 108% in 2008 but a few negative years. Sharpe ratio is only .7 or so, not institutional grade for most people. But the edge is robust, demonstrably provable and the system is simple and I understand it. It is almost inconceivable that in 20 years (the timeframe I intend to keep this investment) I will be looking at an empty account saying “I wonder why trend following stopped working”. Almost certainly, if the bear dreams come true, the odds are strong that this will post a triple digit year. This, for me, is the gold standard of a robust edge.

mulvaney

My opinion is that simplicity is sophistication, and complexity is laziness.

The first thing you need to figure out, before you go any further is:

Is it an edge? – Use a scatter plot to figure that out. If you don’t want to do that then pick the classic edges which other professionals use and you won’t go too far wrong.

This is actually a special day for me on Evilspeculator. For years when I was a regular here I was telling people to get off their asses and do the damn work of finding some edges and exploiting them. Mostly my advice went unheeded but every now and again someone gives me hope, just like Bobby did when he went all out on system creation. User Francis (Mulv) has gone out of his way to provide some excellent statistics on the fakeout setup which Ivan provided us with.

What he discovered is a classic property of mean reversion systems, which segues into a classic mistake we often make in backtesting. That problem would be selection bias, where if we select any random entry and test it on a market we know has gone up, then it will probably show an edge. We can subvert this tendency to bullshit ourselves by testing random markets (and keeping the results from ourselves so we can’t trick ourselves). Professionals call this “out of sample data”. Another method is to sequester part of your available data and keep it aside, then test your data against it, to see if your hypothesis matches clean data. One thing for sure we know

Mean reversion works DRAMATICALLY BETTER in the direction of the higher timeframe trend. So if this works as a short setup, as a long setup it should be better (or something is very wrong)

Let’s dive deep and take a look at the bounty he has provided. I haven’t had the time to personally verify these statistics, but at a glance they look right. Take it for what it is, an interesting learning exercise you can apply to your own potential setups, rather than an authoritative data set. Also, there is a significant chance I’ve misinterpreted the data, since it’s not my spreadsheet I’m working with. If so, mea culpa, but the learning exercise remains.

If you want detailed instructions on how to do this click here (and read the bit about adding the regression lines). I’ll break down the results for you. Firstly Francis has tested with and without the condition of the “break of the low of the setup bar”, so we can dive deep and see how much, if at all, it changes things.

The reason we want to test firstly without the break of the low/high and then with is that so we can test everything one at a time. Maybe if the setup works with the break of the low the effect is only due to the break. That is the kind of thing we want to know.

fo

At this stage I’ll look at just the long setups. As expected the short side in a bull market is categorically not an edge (in fact not surprisingly shorting the emini has been a good way to get your face ripped off the last 7 years). So bottom line, we have to take all these results with a grain of salt since it is a strong market.

Firstly lets look at what the market does on the day after making a double bottom (without breaking the high). You can see this is a decent positive correlation, the points are reasonably clustered (ok R squared value). This tells us what we would probably expect, that the market is trying to go up making a double bottom. One thing that would be worth testing is buying the close and selling the following close. Or alternatively buying the old spike low on a limit and selling the following close.

foday1

Day 2, however, is showing that the first day was just a blip. Market is now negatively correlated. Not what we would want to see, but perhaps the low is being retested (that’s drawing a very long bow)

foday2

On Day 3 we have a weak positive correlation, so the market is trying to rise.

foday3

So what do we have here? We have a market with very weak tendency to rise on day 0 and day 3 after making a double bottom. This is not at all what we would expect from a strong edge, aside from day zero it’s not an edge at all.

When we move on we will consider, firstly how it behaves with the break of the lows/highs as part of the condition. Then we will consider it as a component of mean reversion, at bollingers/keltners/50 bar highs/lows. The logic for this is sensible, perhaps a reversal setup is better at an extreme.

For now we have to conclude that there is nothing inherently bullish about a double bottom in ES beyond an intraday bounce. That’s great to know, and tomorrow we will continue.

My apologies for this being slower going than I thought, and apologies for rambling a little today. I’ll pick it up again tomorrow :-)
Published at Wed, 15 Mar 2017 10:43:19 +0000

About the author

TheWire

Online resource for daily updates and information relating to investing stocks, bonds, forex, real estate and much more.