The IN and OUT strategy is a very popular strategy on this forum. Unlike many here I have been very skeptical of the strategy in general in all its forms, because its alleged performance relies solely on what seems to me highly overfitted in-sample backtests. Although most acknowledge the strategy is overfit to some degree, most assume overfitting will result in a somewhat less spectacular real life performance. The reality is, that it is likely, it will not just fail to meet expectations, but generate negative alpha in the long run.

To illustrate the point, I've constructed my own version of IN & OUT. The strategy switches between QQQ and TLT at the market open, while positions are based on the closing price. Most of the IN & OUT strategies incorporate the sector ETFs XLI and XLU, so I will do as well, with the difference, that I will use exponential movong averages to calculate the trends. Additionally I consider the covariance between QQQ and TLT. I calculate an exponentially weighted historic daily covariance between QQQ and TLT:

The figure clearly shows, that QQQ and TLT show a very negative covariance in periods of crisis over the considered time frame. As such the strategy is as follows,

Exit QQQ and enter TLT when:

EMA XLI < EMA XLU (filter setting alpha = 0.05 ~ SMA 40 days)

EM COV QQQ/TLT < exit limit (filter setting alpa = 0.1 ~ SM COV 20 days, exit limit = -1e-4)

As such there are three adjustable parameters (two filters, and an exit level for covariance), which is relatively conservative compared to some of the alternatives presented on this forum. Applying this strategy we obtain the following equity curve:

The stats are as follows:

CAGR: 27.0%, Sharpe ratio: 1.64, Max drawdown: 15.9%

Not bad, right?

Unlike the other versions of IN & OUT, it's actually fairly easy to extend the data set to include a longer history, since the only ETF that starts in 2007 is TLT. We will extend the TLT data with the mutual fund VUSTX, which has a high correlation with TLT. We thus have a data set going back to 1999, which includes another major crisis. So what's the out-of-sample performance? Here it is:

CAGR: -5.65%, Sharpe ratio: -0.24, Max drawdown: 69.4%

How can this be? The answer is simple. the strategy is overfit, a conclusion that we could have determined from the ETF data alone, which I will discuss in an upcoming post.