Warnings and caveats

Executive summary

Mean reversion, support and resistance

Before diving into the trade signal backtesting, let's take a brief statistical look at how the moonraker meanline and bands interact with price. Does the data support the intuition that price gravitates towards the mean, and that the meanline and edges of the bands act as support and resistance?

The picture at right overlays on the moonraker bands the likelihood that, if price is at a given distance from the mean, it will move towards the mean in the next 1 hour, 2 hours, etc. It's aiming to answer a concrete practical question: if price is this far above/below the mean right now, how likely is it that it'll be closer to the mean in 1 hour? In 4 hours? In a day? These curves were generated by taking averages over price histories of all coins included in commando.

For example, focusing on the edge of the upper band at +12.5% above the meanline, we can see that there's a bit above a 50% chance that price will move closer to the mean by the next hour close, and this increases to above 70% by 24 hours. After 3 days, there's an above 80% chance that price will have moved towards the mean.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/aeeb97e4-d77e-4b3d-82a1-f2ef1ef0d5e4/Mean_reversion_likelihood.png

Qualitatively, the likelihood that price reverts to the meanline increases as price moves further from the mean, and this happens slightly faster as price deviates below the mean than above. This is the bullish bias in crypto assets: on average a move below the mean reverts sooner and faster than a move above. Notice also that about midway through the bands the curves level off and likelihoods of reversion decrease. As price deviates 20% or more from the meanline a different phenomenon becomes evident, with the odds increasing that the meanline will move towards the price.

To visualize support and resistance, I've plotted the distribution of bitcoin hourly closes on the moonraker lines, showing the probability (horizontal axis) of price being a certain percentage (vertical axis) from the meanline. There's something like a bell curve centered on the meanline, but what looks like noise here is statistically significant deviation from a bell curve. Notice that within 1-2% above or below the mean, the curve flattens, and it doesn't peak exactly at the meanline. This is price clustering slightly above or below the meanline — it's acting as support or resistance. The same phenomenon occurs at the edges of the bands. The rapid dropoff in probability abruptly slows down as price spends more time clustering below the upper band or above the lower band.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bcb1ec31-345f-4856-a4b4-bcf7d74b57c1/Bitcoin_support_and_resistance.png

Next we'll look at trading strategies using the moonraker meanline and bands. On top of mean reversion, we're leveraging another basic feature of moonraker: the meanline has low variance and is predictable. As any meanline should, it moves very slowly compared to price, but in addition it doesn't periodically reset to wherever price is the way that VWAP and TWAP lines do. That's key to its tradeability — we can rely on the meanline and bands not abruptly moving in the near future.

Closes above and below the meanline

A candle close above the mean indicates that price spent some time above the mean, with higher timeframe closes giving a stronger indication that price is accepted above the mean. Our first strategy tests whether price being above the mean in fact signals bullish conditions. For all coins listed on commando, I tested the following strategy: open a long on a close above the mean when the previous close was below the mean, and once price closes below the mean, exit the next time price is within 0.6% of the meanline (the tight band drawn around the meanline in tradingview). Note that, once a close below the meanline has happened and we're looking to exit, we don't ask for a close within 0.6% of the meanline, only that price get there.

The image below shows the historical outcomes of this strategy, with each box listing: average return percentage, number of winning trades / number of trades ~ % winners, average number of entry signals per week, average time in trade. The stats for individual coins can be found here.