Modelling Cryptocurrency Price Action: A Machine Learning Perspective

Cryptocurrency, emerging as the latest asset class in the finance sector, is distinguished by its entirely digital nature. Unlike traditional assets, I have a view that cryptocurrencies embody a blend of features from stocks and commodities, making them uniquely positioned for analysis through machine learning techniques. This blog post delves into the nuances of modelling cryptocurrency price action, emphasizing both short-term and long-term perspectives.

Understanding Cryptocurrency as a Hybrid Asset Class:

Cryptocurrency's digital-only presence and decentralised structure set it apart from conventional asset classes. Its behaviour reflects aspects of both stocks and commodities, influenced by market dynamics, investor sentiment, and technological developments.

  • Stock-Like Attributes: Cryptocurrencies exhibit volatility and trading patterns like stocks, especially in shorter time frames. This includes responses to market news, investor sentiment, and economic indicators.
  • Commodity-Like Characteristics: Over longer periods, cryptocurrencies share similarities with commodities. This includes a finite supply (akin to gold or oil), lack of direct earnings, and their use as a store of value or medium for transactions.

Short-Term Price Action Modelling:

In the short term, cryptocurrency price action often mimics the behaviour of stocks, making momentum strategies particularly effective.

  1. Market Efficiency and Investor Participation: Given their recent emergence, cryptocurrencies represent a less mature market with fewer participants compared to traditional asset classes. This leads to inefficiencies and opportunities for alpha generation, often driven by the collective sentiment of a relatively small group of investors.
  2. Absence of Intrinsic Value: Cryptocurrencies, devoid of traditional intrinsic value measures such as earnings or physical assets, are predominantly driven by supply and demand dynamics. This makes them highly responsive to market sentiment, social media influence, and speculative trading.
  3. Sentiment-Driven Movements: The impact of influential figures (e.g., Elon Musk's tweets) or major events can cause significant price swings. Understanding and anticipating these sentiment-driven movements are crucial for short-term trading strategies.

Implementing a Momentum Strategy:

A practical example of this short-term approach is a Bitcoin momentum strategy I back-tested, which uses moving average crossovers for trading signals and a trailing stop-loss for risk management. This strategy alternates between Bitcoin and cash positions based on these signals, with the performance evaluated through returns and drawdowns.

 
 (Fig1: Results for a momentum strategy on BTC)

Experience this strategy in action: Bitcoin Momentum Strategy on Google Colab

Leveraging Machine Learning in Short-Term Crypto Trading:

  • Predictive Analytics: Technical indicators, such as moving averages, RSI, and Bollinger Bands, can be powerful tools for predicting short-term price movements. Machine learning algorithms can optimize the selection and parameterization of these indicators based on real-time market conditions, macroeconomic data, and investor sentiment. There are services online that employ Machine Learning to predict crypto prices. E.g., Into The Block
  • Sentiment Analysis and NLP: The application of Natural Language Processing (NLP) in analysing vast amounts of unstructured data from news, social media, and forums provides insights into market sentiment. Machine learning models can process this data to gauge the mood of the market and predict potential price movements.

 
(Fig2: Effect of famous tweets on BTC price)

 

 
 (Fig3: Machine Learning flow diagram for a sentiment price predictor)

  • Risk Management through AI: Machine learning can enhance risk management by identifying patterns and correlations in market data that may not be apparent to human traders. This includes the use of on-chain data, trading volumes, and historical price action to inform dynamic stop-loss levels and portfolio rebalancing strategies.

Long-Term Price Action Modelling:

Considering the long-term, cryptocurrencies more closely resemble commodities. This similarity suggests that, like commodities, cryptocurrencies might exhibit mean-reverting trends and respond to long-term market cycles.

  • Fixed Supply and Demand Dynamics: Most cryptocurrencies have a capped supply, influencing their long-term value. This scarcity, combined with varying demand, can lead to cyclical trends and potential mean reversion patterns over extended periods.
  • Volatility and Market Maturity: Cryptocurrency markets are notably volatile, but this volatility is expected to decrease as the market matures and more players participate, similar to the evolution observed in commodity markets.
  • Use Cases and Real-World Applications: Some cryptocurrencies, like Ethereum, have practical applications in the digital space (e.g., DeFi apps), akin to how commodities have real-world uses. This aspect could influence long-term pricing trends and cycles.

To substantiate our hypothesis that cryptocurrencies behave in a manner akin to commodities, we executed a detailed clustering analysis. This involved selecting the top five stocks and the top five most traded commodities, forming a diverse dataset representing significant market entities. We then applied sophisticated data processing techniques to extract relevant features from their price data, focusing on indicators like Simple Moving Average (SMA), Exponential Moving Average (EMA), Relative Strength Index (RSI), and Bollinger Bands.

Using these extracted features, we performed a K-Means clustering algorithm to categorize these assets into two distinct clusters. The intention was to identify intrinsic patterns and groupings that would reveal their underlying market behaviour. The clustering was designed to segregate stocks and commodities based on similarities in their price movement and volatility characteristics.

Subsequently, we introduced various cryptocurrencies into this model. Each cryptocurrency was classified into one of the two pre-defined clusters based on its price behaviour and how closely it aligned with the existing groups of stocks and commodities.

The results of this experiment were quite revealing. We observed that all the cryptocurrencies we analysed fell into the cluster associated with commodities. This clustering outcome suggests that, in terms of market behaviour and price movement patterns, cryptocurrencies share a greater resemblance with commodities rather than stocks. This finding provides empirical support to our initial hypothesis, indicating that cryptocurrencies might indeed be more like commodities in their market dynamics.

The code for the experiment can be found here (Link to code).

 
 (Fig4: Clustering of crypto acting more like commodities than stocks)

This observation suggests that phenomena typically observed in commodity pricing could potentially be applicable to cryptocurrencies. Notably, commodities are characterized by certain distinctive market behaviours, including mean reversion, seasonality, and trend-following patterns. To explore this further, a deeper examination of these specific attributes in the context of cryptocurrencies is warranted.

·       Mean Reversion: This concept posits that prices tend to return to an average level over time. In commodities, this is often driven by supply-demand dynamics. Analysing whether cryptocurrencies exhibit similar mean reversion patterns could offer insights into their pricing mechanisms.

·       Seasonality: Commodities often show price changes that are seasonal, influenced by factors like harvest cycles or annual demand fluctuations. Examining cryptocurrencies for similar seasonal patterns could reveal how external factors or investor sentiment cycles impact them.

·       Trend Following Many commodities exhibit strong trend-following behaviour, where prices move in sustained directions for periods. Investigating if cryptocurrencies also follow prolonged trends could help in understanding their market behaviour and in devising investment strategies.

Applying Mean Reversion and Seasonality Strategies:

Building on this long-term perspective, I explored a strategy based on mean reversion and seasonality trends in cryptocurrencies. This approach draws parallels to commodity markets, where such patterns are well-established.

Further evidence supporting this approach can be found in the academic paper "Seasonality, Trend-following, and Mean Reversion in Bitcoin" (Link to Paper). This study offers a comprehensive analysis of Bitcoin trading strategies based on historical maximum and minimum values, illustrating the viability of mean reversion and trend-following approaches.

 

 
 (Fig5: Defining MAX and MIN price points with different look backs)

 

 
 (Fig6: Defining the 4 strategies involving MIN and MAX values from different look-back periods)

 

Key Observations and Results:

(Fig7: Plot of the 4 strategies with different lookback periods)

  • Behavior at MAX and MIN: The analysis reveals that Bitcoin's risk profile varies significantly in different market conditions. It is riskier when below its maximum or above its minimum, indicating high volatility and drawdown potential.
  • Trend-Following vs. Mean Reversion: The study highlights the effectiveness of trend-following strategies when Bitcoin is at its maximum and the potential for mean-reversion strategies when it is at its minimum. This duality offers insights into managing and balancing risk and reward in cryptocurrency trading.
  • Lookback Periods and Market Dynamics: Shorter lookback periods align more closely with Bitcoin's fast-paced market dynamics, offering more responsive and potentially profitable trading signals.

Conclusion and Future Outlook:

Machine learning presents a transformative approach to cryptocurrency trading, offering dynamic and adaptive strategies that cater to both short-term and long-term market movements. By combining momentum-based approaches for short-term trading and mean-reversion strategies for long-term investments, traders can potentially capitalize on the unique characteristics of this digital asset class.

References:


Written By:

Aditya Bakshi

MS Financial Engineering Candidate, Class of 2025

New York University (NYU)

 

Email: aditya.bakshi@nyu.edu

LinkedIn: https://www.linkedin.com/in/adibakshi28/

 

Comments