0
$\begingroup$

I conducted a study with Moving Average Convergence Divergence (MACD)s in the range of

short_periods = range(10, 60)  # Example range
long_periods = range(40, 200)  # Example range
signal_periods = range(2, 10)  # Example range

The result was that MACD strategies have a better than buy and hold annualized return performance in the 99.75th percentile.

Can that happen under the Efficient Market Hypothesis?

Data (and scroll for the code below data): https://gist.github.com/rolandkofler/67c342cdad48b485356f70a5b877b3a2

Statistics of the result:

https://gist.github.com/rolandkofler/a53a580f1ddc62b533137be3ecbddb16

$\endgroup$
5
  • $\begingroup$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. $\endgroup$
    – Community Bot
    Mar 15 at 13:24
  • $\begingroup$ What is MACD?.. $\endgroup$ Mar 15 at 13:44
  • 2
    $\begingroup$ "Moving Average Convergence Divergence" thats a smoothing trend indicator $\endgroup$ Mar 15 at 13:45
  • $\begingroup$ It seems probably too good to be true, unfortunately. Where is a summary of the statistical results (all I see is 5 years of trades)? $\endgroup$
    – nbbo2
    Mar 15 at 14:55
  • $\begingroup$ upon request I added statistics of the result in a gist file $\endgroup$ Mar 15 at 16:54

1 Answer 1

2
$\begingroup$

The informational efficiency of bitcoin pricing increases over time, so if your results were based on a dataset from the very early stages of bitcoin trading, I would not attempt to dispute your findings, although a 99% outperformance rate seems too good to be true, even for the early days.

However, when it comes to the question of whether the MACD can outperform a buy-and-hold strategy over a wide range of parameters, given the current efficiency of bitcoin pricing, the answer is a definite NO.

The results you've presented are flawed and could just be the result of a chance. To calculate the MACD, you used:

data['price'].ewm(span=short_period, adjust=False).mean()

This may not work as you expect. According to the documentation found here and here, the ewm() function operates as an expanding window, not a rolling window. Thus, the span parameter does not indicate the size of the rolling window, but decay in terms of the span. This is not the correct way to calculate this technical indicator.

Based on that, I intuitively conclude that most of your strategies can be very similar because they rely on nearly identical values of calculated indicators as they will be dependent on each other. Then, the observed high outperformance across a wide range of parameters is probably just an artifact. In reality, it's likely that these strategies, which boast a 99% outperformance rate, have very similar entry points. Viewed as a singular (strategy) result, it could be attributed to pure luck, suggesting that further statistical testing is needed.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.