Blockchain technology offers a wealth of public data, but transforming this raw information into
actionable insights can be challenging. Amberdata simplifies the process by providing powerful
tools that aggregate, distill, and analyze blockchain data across multiple dimensions. This report
demonstrates how quantitative traders can leverage Amberdata’s on-chain data to develop
profitable trading signals for Ethereum (ETH). While the focus here is on Ethereum, the
strategies and insights explored can be applied to other blockchains, unlocking even more
potential for traders.
Profitable Ethereum Trading Strategies Using On-Chain Data: This report explores 14 Ethereum trading strategies based on stablecoin issuance and Uniswap activity. While some strategies yielded consistent profitability, others underscored the complexities of working with blockchain data.
Z-Score Strategy Proves Effective: A Z-score-based strategy focused on stablecoin issuance delivered positive returns across different market conditions, particularly in bearish and sideways markets. It achieved a 7% return during the 2021 bear market, outperforming a simple buy-and-hold approach.
Challenges with Correlation-Based Signals: A strategy based on the correlation between stablecoin issuance and ETH price showed poor performance, delivering a -16% return after excluding outlier events. This highlights the difficulties of relying on simplified assumptions about on-chain data relationships.
Uniswap Pool Data Offers Long-Term Profit Potential: Analyzing Uniswap’s USDC/ ETH pool provided profitable signals, especially during bearish markets. The strategy generated a 12% return from June 2021 to June 2022, significantly outperforming the market’s -27% return over the same period.
Amberdata Simplifies On-Chain Data Analysis: Amberdata streamlines the process of working with complex blockchain data by providing high-quality, ready-to-use datasets. This allows traders to focus on strategy development and execution, rather than data preparation.
Below we dive deeper into the trading strategies tested, focusing on key methodologies like the z-score and correlation and the insights that can be drawn from numerous uncorrelated sources such as Uniswap V2 data.
In this report, we conducted extensive backtesting on a variety of trading strategies using both on-chain and off-chain data, with a focus on Ethereum (ETH). Our goal was to explore how data from stablecoin issuance and Uniswap activity could be leveraged to generate profitable trading signals. We traded with an initial capital of $100,000 and accounted for 1% in exchange/transaction fees. All trades were executed on centralized exchanges, using one-hour price intervals.
To size our trades, we employed a risk-parity sizing method. This approach adjusts the size
of trades based on market volatility, allowing us to buy more ETH in calmer markets and scale down in more volatile conditions. The key metric for volatility was the standard deviation of the hourly percentage change in ETH’s closing price, calculated over a trailing period of 11 to 34 days, depending on the strategy.
Once volatility was measured, we normalized the results into a range between 0 and 1, allowing
us to interpret the normalized value as the percentage of our portfolio to allocate to a trade. For example, if normalized volatility was 0.1 (low), it would imply a 90% portfolio allocation (1 - 0.1 = 0.9). To ensure responsible allocation, we further divided this by 2, capping the allocation to 50% of our portfolio for any single trade. However, over the course of a simulation, it’s likely that more than half of the portfolio could be allocated across multiple trades.
We developed and tested a total of 14 trading strategies using data from stablecoin issuance and Uniswap v2 pool activity. These strategies varied in their underlying logic, parameters, and order sizing methodologies. Of these 14 strategies, we identified three that stood out—two of which were successful in generating positive returns, and one that did not. We have included the failed strategy in this report to illustrate how complex data and false assumptions can lead to poor results. Each strategy underwent optimization, followed by performance evaluation over three distinct market periods: a bearish market, a sideways market, and a bullish market.
The statistics for all 14 strategies are detailed at the bottom of this report, and the strategies are available in our GitHub repository.
Pearson Correlation Strategies (corrandcorr_vec): These strategies focus on the correlation between stablecoin issuance and the price of ETH, using the Pearson correlation coefficient. The main strategy, corr, compares the correlation over the past 30 days with the correlation over the entire dataset. If the recent correlation was higher, we bought ETH; if lower, we sold. The corr_vec strategy is described in further detail in this report.
Rolling Sum Strategy (rolling_sum): This signal looks for continuous periods of stablecoin issuance or burning. If stablecoin issuance increased for four consecutive hours, we bought ETH; if it decreased for four hours, we sold.
Simple Moving Average (SMA) Strategy (sma): This is a standard moving average crossover strategy, using 1-day and 7-day periods. If the 1-day SMA exceeded the 7-day SMA, we bought ETH; if it was below, we sold.
Stablecoin Z-Score Strategy (sb_zscore): Described in detail later, this strategy utilizes z-scores to measure deviations in stablecoin issuance from the norm and uses these signals to enter or exit trades.
Standard Deviation Strategies (stddev_aboveandstddev_below): These strategies rely on mean reversion and breakout logic. In stddev_above, if stablecoin issuance was 1 standard deviation below the previous week’s mean, we bought ETH, expecting a rebound. If issuance was 1 standard deviation above the mean, we sold, anticipating a pullback. stddev_below reverses this logic, treating above-average issuance as a signal for market breakout rather than reversion.
Standard Deviation Sizing Strategies (stddev_below_sized,stddev_below_ sized2, stddev_below_sized2week): These strategies build on the previous standard deviation strategies by incorporating order sizing. Instead of sizing trades based on price volatility, we sized them inversely to the standard deviation of stablecoin issuance. stddev_below_sized2 fires sell signals when issuance is two standard deviations below the mean, and stddev_below_sized2week uses a 14-day rolling window instead of the standard 7-day window.
Uniswap Pool Strategies (uni_flowanduni_vec): These strategies analyze the flow of ETH in the Uniswap V2 USDC/ETH pool. uni_flow calculates the mean and standard deviation of ETH inflow/outflow over 7-day periods. If the inflow exceeded the mean by more than one standard deviation, we bought ETH; if the outflow was below one standard deviation, we sold. The uni_vec strategy is described in more detail later in this report.
Volatility and Moving Average Combination Strategy (vol_sma): This strategy combines a 1-day and 7-day SMA crossover with volatility-based order sizing. The same volatility sizing methodology from the beginning of this report was used here.
Volatility SMA with Stop Loss (vol_sma_sl): Similar to the vol_sma strategy, this variation added a stop-loss mechanism. A stop-loss was set 10% below the entry price on every buy order, limiting potential losses on individual trades.
Among the strategies we tested, two showed consistent positive returns when applied to various market conditions. These strategies capitalized on patterns in stablecoin issuance and Uniswap pool activity, demonstrating how traders can effectively use on-chain data to generate profitable signals.
However, one of the strategies we tested—based on the correlation between stablecoin issuance and ETH price—did not perform as expected. The strategy’s assumptions were too simplistic, and the results highlighted the complexity and challenges of on-chain data analysis. We have included this strategy in the report to underscore the importance of thorough testing and realistic assumptions when developing trading algorithms.
The strategies detailed in this report, namely sb_zscore, corr_vec, and uni_vec, will be explored
in more depth in the following sections, with full backtesting results and further analysis. Each strategy was optimized to specific market conditions, providing insight into how on-chain data can be harnessed for trading opportunities.
The first trading signal we developed is based on the issuance data of select stablecoins, including DAI, USDC, LUSD, TUSD, HUSD, FEI, MIM, FDUSD, USDT, and PYUSD. The hypothesis behind this strategy is straightforward: a significant increase in stablecoin issuance could signal an imminent breakout in ETH prices, as it might reflect heightened market interest. Conversely, a sharp decline in issuance could indicate a cooling period, leading to lower ETH prices.
We measured the issuance of stablecoins on an hourly basis and used a Z-score to track deviations from the average issuance level. The Z-score measures how far each hour’s issuance is from the mean, in terms of standard deviations. To ensure robustness, we used an 11-day trailing period to calculate the mean and standard deviation for each hour.
Here’s how the signal was interpreted:
No stop-losses were used in this strategy. The parameter values (11-day period, buy Z-score >4, sell Z-score <-11) were optimized through backtesting across several market periods.
(1) Sell z-score on the x-axis, buy z-score on y-axis.
(2) Number of days in the rolling window on the x-axis, buy z-score on y-axis.
(3) Number of days in the rolling window on the x-axis, sell z-score on the y-axis.
To assess the performance of this strategy, we backtested it over a three-year period from June 2021 to June 2024, covering three distinct market environments: bearish, sideways, and extremely bullish. This long-term approach allowed us to evaluate the strategy across various market events and cycles, minimizing the risk of overfitting.
Bearish Market (June 2021 - June 2022):
The strategy eliminated potential losses and achieved a 7% return, outperforming the -27% return of a buy-and-hold strategy.
With a Sharpe ratio of 0.6, the strategy demonstrates effective risk-adjusted returns.
The chart below illustrates the consistency of the trades, with the green and red lines indicating winning and losing trades, respectively.
Sideways Market (June 2022 - June 2023):
Our strategy produced an 18% return, compared to the -4% return for buy-and-hold.
Despite market volatility, the strategy capitalized on several good trades, effectively managing risk in unpredictable conditions.
Extremely Bullish Market (June 2023 - June 2024):
While a simple buy-and-hold strategy generated an impressive 100% return, our strategy yielded only 9%. Though this underperformance in a strong bull market may seem disappointing, it’s essential to remember that our strategy is designed to perform well in diverse market conditions, not just during bull runs.
The Z-score strategy proved to be effective in managing risk and generating consistent returns, particularly in less favorable markets. While the returns during the extremely bullish market were modest, the strategy’s ability to navigate bearish and sideways markets demonstrates its robustness.
One key limitation of this strategy is the lack of a stop-loss mechanism. Without stop-losses, the strategy was vulnerable to prolonged losses in unfavorable trades. Introducing a simple 10% stop- loss could potentially improve the overall return profile by cutting losses early, especially during periods of sharp market corrections.
Green and red lines show winning and losing trades, respectively. The strategy worked effectively to mitigate losses in a downward trend, shown also by the win rate of 50%.
This Z-score-based strategy highlights how traders can leverage on-chain data, such as stablecoin issuance, to create effective and profitable trading signals. As we continue exploring more strategies, we’ll further investigate how to fine-tune parameters and enhance performance across different market environments.
Another signal we explored was based on the correlation between stablecoin issuance and the price of Ethereum (ETH). Using the Pearson correlation coefficient, we hypothesized that over time, as the price of ETH trends upwards and the Ethereum network matures, there would be an increasing correlation between the number of stablecoins issued and ETH’s price. This assumption was based on the idea that a larger, more trusted Ethereum network would see more stablecoins issued. Additionally, sudden changes in correlation could signal a significant market event, which we aimed to capitalize on by trading ETH.
The strategy worked as follows:
Buy Signal: When the correlation between stablecoin issuance and ETH price increased significantly over a given time window, we assumed this meant the network was seeing healthy growth, and we bought ETH.
Sell Signal: If the correlation weakened or dropped rapidly, we interpreted this potential market slowdown or change, and we sold ETH.
While the concept seemed promising, the results of this strategy did not meet our expectations. When we optimized the parameters and tested the strategy over three years, the performance was disappointing.
One of the key issues with this strategy was the presence of outlier events. A highly volatile period in November 2022 accounted for nearly all of the strategy’s profits. Specifically, over three days in November (10th, 11th, and 12th), the strategy made almost $10,000 due to rapid market shifts. However, excluding this outlier, the strategy’s performance painted a much bleaker picture.
Large outlier day where the strategy makes nearly all its money
Without the outlier, the strategy posted a -16% return, compared to a 40% return for buy-and-hold over the same time frame. Moreover, the win rate was only 20%, meaning the strategy was losing money on most trades. The account value graph (shown below) illustrates a nearly consistent decline, with no clear period of sustained profit-making.
Simply removing the outlier gives a much clearer picture of how the strategy performs.
As this is just a subset of the report you can download and read the full report, here.
Learn more about what went wrong, lessons learned, Uniswap V2 USDC/ETH Pool Strategy, How It Works: Quantifying Swap Activity with Z-Scores, Backtesting Results Across Different Market Conditions, and more!