Comparing Overlapping Systems (Part 2)

Do your systems overlap?

In the last post, I compared three systems that traded the same instrument (SPY) in different ways, and also compared the combination of the three systems. Combining those systems reduced risk, which allowed us to increase our position size (either through more cash or using leverage). We could then realize a larger profit for the same amount of risk as we’d experience using just one of the systems.

There is still however a risk of our systems being overly correlated. We might end up throwing two buckets of money at the market, when we thought we were just throwing one bucket. How do we figure that out?

Imagine two simple systems that trade SPY. System A buys at the close of two down days in a row, and holds for four days. System B buys at the close of three down days, and holds for three days. System B will occur much less frequently than System A. However when System B is triggered, it is overlapped with System A 100% of the time. System A would enter one day, System B the next, and they would both exit on the same day. If you trade both systems, then every time System B enters the market, you have double the money exposed to the same risk.

The above is a toy example. However this correlation of trading systems can sneak up on you in subtle ways. Perhaps you’ve developed a nice little system using RSI. You then start playing with an interesting system using TRIN. You allocate a bucket of cash to each, and start trading.

What if it turns out RSI and TRIN indicators are correlated? Will we get signals from both systems to enter a trade at the same time? If the systems are correlated, should we dump one of them? Which one? We need to know, so we don’t blow up our account.

The ideal set of systems would have absolutely no overlap, so that they are not correlated at all. This is probably impossible to achieve when trading on the same instrument. However a combination of short and long systems by their very nature are going to be less correlated than two long systems. A signal that the market might turn down is not usually interpreted as a signal that the market might also go up!

The systems I described in the last post do indeed overlap some of the time. The graphic from last time again:

Trade #1 is a mean-reversion long position. It entered at the open of June 8th, 2007, and exited at the close of June 12th. System #2, the long momentum system, entered at the close of June 12th, and exited at the close June 24th. System #3, which is a shorting mean-reversion system, entered at the close of June 16th, and exited at the close of June 18th.

Systems 1 and 2 are essentially overlapping in the chart above, because I can’t use the funds from system 1 to fund system 2. They both trade at the close. Meanwhile, system 3 on this occasion is entirely contained within system 2. They’re bets on different directions on the market, but both come out winners. If I have to wait for my trade to settle, then I definitely can’t use the same funds in overlapping trades.

The question then becomes: how much overlap is going on?

Let’s view the overlap this way. Say System A trades 40 days out of the year, and System B trades 50 days out of the year. The number of days that are overlapped happen to be 20 days. The total number of days in trading is 40 + 50 – 20 (because 20 of those days are counted twice in the individual numbers). Divide the 20 overlapping days by the 70 days of trading, and you get 28.57% overlap.

overlap / ( System A + System B – overlap)

or

overlap / Total number of days traded

Below is a graph that shows the amount of overlap days, as a percentage of the total number days the two systems trade.

 

These percentages of overlap are, in my opinion, reasonable. I could perhaps do some sort of formal correlation check on them, but I’d have to know how to do that. So I’ll go with my gut. The time all three systems are overlapped, as a percentage of total trade days, is a tiny 1.04%.

Going further with this, the percentage of days that all three systems overlap, compared to the total number of possible trading days (in or out of the market) is a minuscule 0.23%. That’s a total of 10 days over 17 years of trading.

This creates some options, since the incidence of triple overlap is so rare. If our risk appetite outweighed our account’s robustness, we could choose to deploy half our account per trade, knowing we might miss a trade every year or so. We could decide to go with a 2x leveraged ETF rather than a 3x, and trade half our account at a time. Reserving a third for each system is not using capital wisely in this case.

Our first investigation told us how much the systems were overlapped, compared to the total number of days either one was in a trade. There’s another way to look at it though, which can be helpful when you have trades that vary in length.

Say for example you have a trade that averages 40 days per trade, and another that averages 3 days in a trade. With such a difference in average lengths, wouldn’t you want to know often the shorter trade was overlapped with the longer trade?

Refer to chart of the SPY trades above. System #3 is completely contained within System #2. If these systems were both long trades (they’re not) and the shorter duration system usually overlapped the longer duration system, we’d want to know about it. We might consider scrapping the shorter one…or not. But you’d want to know, right?

I took each pair of systems, and chose the system that traded the fewest number of days. I then calculated the number of days that the smaller trade overlapped the bigger trade. I divided that number by the total number of days the smaller trade traded.

Still unclear?

Say you had System A, which was in a trade 20 days of the year. Of System A’s 20 days of trading, 17 of those days also happened to be traded by system B. The other days System B trades don’t matter, because they’re not part of the overlap.  17 / 20 = 85%.

If the overlap was high, and both systems were trading the same direction (long vs short), I would then want to consider if I was adding correlated risk.

Above, “momo” is the long momentum system, “long” is the long mean reversion (“MR”) and short is the short MR system.

 

If these were all long-only systems, I would take a hard look at the middle column. Intuitively that middle column’s overlap seems pretty high. However since I’m comparing a short system to a long system, I am less concerned. One system will win either way the market goes, and because of the different exit criteria, often both will win.

After this analysis of both the system performance, expected risk, and lack of correlation, I feel comfortable trading all three systems using a leveraged version of SPY.

Traders often develop systems in isolation that work well. Many of these systems could be using the same inputs and the same triggers, and they may potentially be entering highly correlated trades. In many testing platforms, it’s difficult to code the effects of two or more systems together in a backtest. Testing your systems for timing correlation can help you avoid putting too much risk into play at once.

I hope the explanation of my process analyzing these three systems will help you test your own systems. And the good news is it can be done with Google Sheets or other spreadsheet software. No Python or R coding required.

Save

Save

2 thoughts on “Comparing Overlapping Systems (Part 2)”

  1. I have experienced the same issue when trading different but correlated equity markets in the same direction. I find that the second signal is often more powerful than the first from a profit and DD perspective. I will not hold back with my position sizing on the first trade on the off chance that a second market might setup. I have found that there is long term opportunity loss holding back a portion of risk with the first setup. However, due to the strength of the second signal, I will ‘over’ risk and take a partial position with the second market as watching this later signal (sometimes) run to the sky can be psychologically challenging! There is of course the risk of an outsized loss with both positions but it’s a risk that I find worth taking.

    1. Thanks for your comment, Ryan! I think it’s best practice to treat the two different signals as different systems, rather than a scaling-in of a single system. While the second signal may have a greater hit ratio or a higher average return, its relative infrequency might prove it to be worse in the long term. Fortunately these three systems don’t overlap each other – or rather, the most frequent one is not overlapped by the two less-frequent ones. But if they turned out to have a lot of correlation, I’d have to approach things differently. Sounds like you’ve got a handle on that (although it might be interesting to quantify your two systems to be sure.)

Leave a Reply

Your email address will not be published. Required fields are marked *