This is my entry for the Numerai/Ocean competition.
Hope you enjoy.
Let me know if there are any questions!
Factor Analysis of Cryptocurrency Returns Using Momentum Indicators
This is my entry for the Numerai/Ocean competition.
Hope you enjoy.
Let me know if there are any questions!
Factor Analysis of Cryptocurrency Returns Using Momentum Indicators
Ok, I think that hasnât worked? Its set to private? Here is the text version:
This report investigates the effectiveness of momentum-based indicators in predicting cryptocurrency price movements, using Numeraiâs discretized return data. Key methodologies include the application of Simple Moving Average (SMA) and Moving Average Convergence Divergence (MACD) indicators, with a focus on identifying both inductive and anti-inductive price patterns. Through a series of experiments, optimal window sizes for momentum indicators were determined, and the performance of these indicators was evaluated across different subsets of cryptocurrencies. Simulations of future returns suggest a high probability of profitability using the SMA-based MACD (SMACD) strategy. However, potential limitations such as data discretization and coding errors are acknowledged. The results indicate that momentum-based strategies, particularly those employing SMACD, offer promising predictive power in the cryptocurrency market, with significant opportunities for further research.
Introduction
In technical analysis, various indicators have been developed to predict asset price movements, with momentum-based indicators being among the most popular. Indicators like the Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), Simple Moving Average (SMA), and Exponential Moving Average (EMA) are all variations of the fundamental idea that an assetâs expected return is, in some way, influenced by its past returns.
Numeraiâs crypto contest provides historical return data for various cryptocurrency assets, categorized into five discrete bins that approximate a bell curve. This raises an intriguing question: can momentum indicators, typically based on raw price data, still function effectively when applied to these binned returns?
In this study, I will explore this question by comparing different momentum-based indicators and their respective parameters to determine whether any of them show a significant correlation with future returns. Additionally, I will consider refinements such as focusing on different subgroups of cryptocurrencies, and I will evaluate the confidence intervals of these models to assess the robustness of their future performance.
Numeraiâs signals data consists of discretized returns for the top cryptocurrencies, recorded at each weekday to maintain consistency with their other competitions. These returns are calculated over a 30-day time horizon. Notably, the dataset reflects the top cryptocurrencies at each individual timestep, rather than the top cryptocurrencies as of the current date. This approach helps mitigate the risk of survivorship bias, as it includes assets that may no longer be in the top ranks at present. One major advantage of using Numeraiâs data is its simplicity, as the required data has already been collated and preprocessed. Additionally it can be accessed freely and easily via their api, as detailed on Numeraiâs website.
The dataset spans from June 1, 2020, to May 22, 2024 (at the time of writing), covering periods of both bull and bear markets. This broad timeframe provides a diverse range of market conditions, which is essential for testing the robustness of momentum-based indicators across different market environments.
In this analysis, I tested various momentum indicators by examining their correlation with Numeraiâs targets. Initially, I used a 20-day window for most indicators, as suggested by prior research, with the MACD (Moving Average Convergence Divergence) calculated as the difference between 20-day and 100-day moving averages. Additionally, I experimented with a longer 100-day Simple Moving Average (SMA).
Since Bollinger Bands are typically represented as a discrete step function, which isnât suitable for direct correlation analysis, I modified the Bollinger Bands to use a ratio of the average price divided by the standard deviation. This adjustment allowed for a continuous measure that could be better correlated with the targets.
Momentum indicators can correlate with future returns in two primary ways:
In this case, the latter, anti-inductive momentum, appears to be the dominant effect. Therefore, I have inverted the following graph to present anti-correlations as upward trends, which I believe makes the visualization more intuitive.
The results show that the MACD, which is composed of the âMACD line,â the âSignal line,â and the âMACD histogram,â performs comparably to the SMA. However, its performance varies across different periods, highlighting the importance of considering multiple indicators over different time horizons.
To refine the analysis, I focused on the two most promising indicators identified in the first approach: the Simple Moving Average (SMA) and the Signal Line from the MACD. I applied these indicators across various subsets of cryptocurrencies to investigate whether different types of coins exhibit distinct momentum behaviors.
The subsets of coins were derived based on themes, which were generated using ChatGPT. These themes categorize coins into groups, such as âutility tokensâ and âgovernance tokens.â Each subset contains approximately 10 coins, with some overlap between the lists. Correlations were calculated within each subset to assess the performance of the SMA and Signal Line indicators.
To avoid double counting due to the 20-day prediction horizon, hypothesis tests were conducted on every 20th data point. The specific coin subsets will be listed in the appendix for reference.
In the case of the MACD Signal Line, the âutility tokensâ and âall tokensâ subsets showed stronger correlations with future returns compared to the entire universe of coins. These correlations were significant at the standard 95% confidence level, and even at the 99.5% confidence level for the âall tokensâ subset, without corrections for multiple hypothesis testing.
For the SMA indicator, the âgovernance tokens,â âutility tokens,â and âall tokensâ subsets demonstrated better correlations than the entire universe. These results were significant at the 95% confidence level, with the âall tokensâ subset reaching significance at the 99.8% confidence level, again without correcting for multiple hypothesis testing.
These findings suggest that certain subgroups of cryptocurrencies may be more responsive to momentum-based indicators. The results indicate potential opportunities for emphasizing specific subgroups, such as utility and governance tokens, in momentum-based analysis to achieve better predictive performance.
In this iteration, I conducted a grid search to identify the optimal window size for momentum indicators. Since we are only exploring a single dimension of parameters (the window size), a simple grid search was sufficient, eliminating the need for more complex optimization algorithms.
The results indicate that short windows of 5-20 days are optimal for capturing anti-inductive momentum (where assets revert to the mean), while longer horizons of around 200 days are more effective for detecting inductive momentum (where past performance continues into the future).
These findings suggest that the difference between the 10-day and 200-day windows could yield an effective MACD (Moving Average Convergence Divergence) indicator. To test this, I calculated the MACD using both the traditional Exponential Moving Average (EMA) and a Simple Moving Average (SMA) for a more direct comparison. I delayed the start of the analysis by 250 days to ensure that both the 10-day and 200-day averages were fully established.
Interestingly, the SMA-based MACD outperformed the traditional EMA-based version, suggesting that the simpler approach may be more effective in this context.
To assess the robustness of the SMA-based MACD (or SMACD), I simulated future returns by randomly sampling 20-day chunks of data over 10,000 iterations. The resulting graph of projected returns indicates a 95% probability of achieving a profit within just over 100 days.
While the findings from the SMA-based MACD (SMACD) simulation are promising, itâs important to consider several caveats:
Assuming these results hold, the SMA-based MACD seems to be an effective momentum indicator with a high probability of generating positive returns. Further research should explore the behavior of this indicator across different cryptocurrency subgroups, as this could provide additional insights and opportunities for model refinement.
P.S. I am AKA âduckmatterâ on discord/the desight submission site.
Source code is available upon request.
I enjoyed reading your report. Analysis of momentum-based indicators always interest me. I agree that SMA and MACD have an impressive predictive power in cryptocurrency price variance. I also like the way you approach to determining optimal window sizes and evaluating indicator performance across different cryptocurrency subsets. Your recognition of potential coding errors and the impact of data discretization reflects a balanced and realistic perspective
Thank you for your comments on my post and good report. I also enjoyed reading your report.
The idea of SMA-based MACD and the idea of categorizing the tokens by token type is interesting. Is the price movement similar for each type of token? I thought it would be more useful to classify them by price movement rather than by type.
Thanks!
Categorizing the tokens by price movement is an alternative worth considering. Price movement can differ between types of coin, for example meme coins tend to have dramatic bubbles! How would you suggest identifying coins by price movement? Binning them by volatility, perhaps?
Not sure if Iâm right (weak on my finance skills), but maybe - Use RSI to categorize tokens into overbought, oversold, or neutral conditions, which can help identify potential price reversals or sustained trends (or) as you said Volatility, Calculate the standard deviation of daily or weekly price changes for each token over a specified period (e.g., 30 days, 90 days) maybe?
Well, the idea is to categorise coins by type and then look at indicators like RSI to order the coins within each category. This means there is no point in using RSI or SMA to categorise coins, only to use the same indicator to order the coins within the categories! However, the idea of using one indicator to categorise and then another to order - for example, categorise by 90-day SMA and then order by 20-day SMA is quite intriguing. They will have to organise another contest so we can try new ideas!
Wow!!! you have done a really great work
the analysis and insights are well-studied
good luck