AQAI QuantAI research lab for systematic strategies

Automated analysis

This analysis was drafted by our research engine and has not been checked by a human editor. It may contain errors. It separates the paper’s own results from our tests, and any figures called ours come from our own backtest.

Our automated analysisOur backtest

The headline Sharpe here is momentum on the leader basket

Four clustering engines, two overlapping CRSP universes, and a winner that changes with both.

2026-09-08 · 7 min read · US equities

Reviewing: Lead-Lag Relationships in Financial Markets: A Comparison of Multiple Clustering Algorithms · Ruichen Deng and Yichi Zhang · Read it on arxiv

Our backtest of this idea

Our automated quick test, not the paper's

Rolling DTW Clustered Lead-Lag Momentum for Liquid US Stocks

Backtest period 2020-01-01 to 2024-07-01 · hypothetical, net of modelled costs

Why these figures are not the paper's (1)

Our own audit found this run does not follow the paper faithfully (14)

  • deviation left undescribed by the audit (invalidates: MiniRocket_KMeans_med 679-asset lead-strategy Sharpe 0.866 and associated Table 2 lead metrics; KShape_med 1028-asset lead-strategy Sharpe 0.267 and associated Table 3 lead metrics)
  • deviation left undescribed by the audit (invalidates: MiniRocket_KMeans_med 679-asset lag-strategy Sharpe 0.739 and associated Table 2 lag metrics; Ensemble_mod 1028-asset lag-strategy Sharpe 0.474 and associated Table 3 lag metrics; paper-reported gross lag-strategy return distributions, hit rates, profit-loss ratios, drawdowns, and Sharpe-test p-values)
  • deviation left undescribed by the audit (invalidates: All paper-reported lead and lag trading returns, volatility, Sharpe ratios, hit rates, profit-loss ratios, drawdowns, and Sharpe-test p-values because negative-signal periods are no longer short)
  • deviation left undescribed by the audit (invalidates: Direct comparability of this specification's net performance with every gross performance figure in Tables 2 and 3)

10 further finding(s) are described in the note.

These are our findings about our own implementation, not criticisms of the paper. Read the figures below as a description of what we ran.

Jan 2020Total 27.5%Jul 2024
Sharpe
0.39
Total Return
27.5%
Max Drawdown
-39.3%
CAGR
5.6%
Volatility
15.6%
Beta vs SPY
0.44
Trades
60,055

What the paper reports for its own strategy

  • Sharpe 0.866, annual return 6.21%, annual volatility 7.17%, max drawdown -63.908, hit rate 0.520, profit-loss ratio 1.079 — MiniRocket_KMeans_med, lead strategy, 679 CRSP assets, 2000/01/03–2019/12/31, transaction costs not mentioned
  • Sharpe 0.808 / 0.790 (KShape mod / med), lead strategy, 679 assets, same period; drawdowns -67.604 / -69.418
  • Sharpe 0.801 (DTW_KMedoids_med, lead, 679 assets), annual return 5.80%, drawdown -70.276 — the baseline this paper is improving on
  • Sharpe 0.793 (DTW_KMedoids_med, lag, 679 assets), annual return 5.83%, drawdown -109.148; best lag Sharpe on that dataset
  • Best on 1028 assets: Sharpe 0.474 (Ensemble_mod, lag), annual return 3.85%, drawdown -751.317; lead-strategy Sharpes only 0.156–0.267
  • Sharpe hypothesis-test p-value 0.0 for every reported algorithm/strategy combination

The paper's best figure, a Sharpe of 0.866, comes from a strategy leg that places no trade from a lead-lag relationship. Algorithm 1 makes the construction clear. Leader returns form the signal, and the lead leg trades those same Leaders.

Deng and Zhang begin with daily closing prices from two Wharton CRSP equity panels. Each sliding window contains 21 sessions, and the method clusters the 21-day return sub-series within it. Dynamic time warping aligns every pair of assets inside a cluster and produces local lag values. The method reduces those lags to one value for each ordered pair, using either mode, the most frequent local lag, or median. It then forms the lead-lag matrix as M[i,j] = L_ij - L_ji. Row sums become leading scores, which order the assets from most leading to most lagging.

The ranking is divided into Leaders and Laggers. The signal takes the sign of an exponentially weighted moving average applied to the average Leader return. Section 4.2 calls these excess returns, while Algorithm 1 says returns. The spans are p = {1,3,5,7}. Trading the Leader basket with that signal creates the paper's "lead" strategy; trading the Lagger basket creates its "lag" strategy. The window then advances by a step w, and the process starts again.

Delayed diffusion supplies the economic claim. Recent returns from a subset of related names should forecast the rest of their cluster when those names move first. The lag leg is meant to collect that forecast. Four clustering engines feed the procedure. Two come from the DTW-KMedoids baseline used in earlier lead-lag work and MiniRocket-KMeans, which applies K-means to convolutional positive-proportion features. KShape instead uses a shape-based distance derived from normalized cross-correlation. A hard-voting ensemble retains a pair in the same cluster only when KShape and DTW-KMedoids agree. Every engine selects the cluster count K by maximizing the average silhouette coefficient rather than holding it at 3.

From synthetic lags to CRSP returns

The evidence begins with a synthetic lagged multi-factor model. It has K=3 factors, noise sigma ranging from 0.5 to 3.0, and 100 repetitions for each configuration. Adjusted Rand index declines with rising noise for all four engines. KShape leads at low noise; MiniRocket-KMeans leads at high noise. The ensemble records the lowest error on the estimated lag matrix.

The real-data tests cover 679 assets from 2000/01/03 to 2019/12/31 (5,211 days) and 1,028 assets from 2000/01/31 to 2019/07/01 (4,880 days). Together they produce 32 backtest rows. MiniRocket-KMeans with median lag aggregation delivers the best result on the lead leg: Sharpe 0.866, annualized return 6.21%, annualized volatility 7.17%, drawdown reported as -63.908, hit rate 0.520, and profit-loss ratio 1.079. On the same leg and universe, the DTW-KMedoids baseline reaches 0.801 with 5.80%. The tables mention no transaction costs.

Which leg tests the lead-lag claim?

The two PnL definitions settle the issue. The signal takes the sign of the EWMA of mean Leader returns. Lead-leg PnL then multiplies that signal by mean Leader returns. Clustering chooses the basket, but its own recent returns forecast and trade it. This is time-series momentum on the leaders.

Propagation is tested by the lag leg. On the 679-asset panel, its best Sharpe is 0.793 for DTW-KMedoids median, below the lead leg's 0.866. A lead-lag account implies the reverse ordering.

The Leader definition adds another problem. The methodology section gives the Leader fraction alpha as 0.25. Later, the experiments section states: "We take the top 75% of time series after ranking as the Leader and the remaining as the Lagger." With 75%, the lead strategy becomes momentum on three quarters of each cluster. We could not establish from the text which fraction generated the tables. We also could not find which of the four EWMA spans or which window step w was used. And we found no benchmark using plain time-series or cross-sectional momentum without clustering, the comparison needed to show what clustering contributes.

The second CRSP panel changes the winner

On the 1,028-asset panel, the same MiniRocket-KMeans median lead-leg pipeline drops from 0.866 to 0.160, with annualized return of 1.33%. Every result in the lead column lies between 0.156 and 0.267. The strongest row on the panel comes from the ensemble with mode aggregation on the lag leg, at 0.474 and 3.85% a year. Yet the same ensemble is weakest on the 679-asset lead leg, at 0.643 and 0.679.

Both universe and leg change the winner.

Two overlapping CRSP samples drawn from the same market across nearly the same two decades should preserve the algorithm ranking if that ranking captures something durable. We previously examined a model ranking that reverses when the evaluation criterion changes in our note on EGARCH versus plain GARCH. Here, changing the stock count produces the reversal.

The paper says the ensemble "achieves the best performance under the lag strategy in the dataset containing 679 assets." Table 2 reports Ensemble_mod at 0.573 and Ensemble_med at 0.609 for that panel, both trailing DTW-KMedoids median at 0.793. The ensemble leads the lag leg only on the 1,028-asset panel, where it reaches 0.474 against 0.371 for DTW-KMedoids mode. The sentence identifies the wrong dataset.

The authors offer an explanation for the ensemble's weak lead-leg result. Their second contribution describes it as overly conservative under the trading strategy, discarding some effective lead-lag pairs, and better suited to high-noise, large-sample settings where stability takes priority. The ranking remains unresolved. The algorithm finishes last on the 679-asset lead leg (0.643 and 0.679), then first on the 1,028-asset lag leg (0.474).

Drawdown and significance

The abstract gives drawdown as "-63.9%". On the larger panel, the same column contains -1766.753 for KShape mode on the lead leg and -1161.520 for MiniRocket mode on the lag leg. Values below -100% indicate an additive, unnormalized PnL series rather than a compounded equity curve. Consequently, the -63.9 figure cannot represent a percentage of capital or support comparison across the two datasets.

The significance claim has a separate arithmetic problem. According to the abstract, hypothesis-test p-values for the Sharpe ratios of all strategies equal 0.0, which verifies the statistical validity of the lead-lag trading strategy. Every one of the 32 rows reports the same 0.0. A Sharpe of 0.156 across 4,880 days, roughly 19.4 years, produces a t-statistic near 0.69. A t of 0.69 is indistinguishable from zero. The paper gives no test procedure or standard errors and applies no adjustment for 32 configurations. Gross of costs, the headline 0.866 over 20 years has a t near 3.9, so its own arithmetic supports the top row. The identical zeros do not.

Figure 3 contrasts the average silhouette score under optimal K with fixed K=3 for DTW-KMedoids, KShape and MiniRocket-KMeans. The gain follows almost automatically because maximizing a criterion over a grid containing 3 cannot yield less than its value at 3. Silhouette measures separation between clusters. The paper's first contribution also claims improvement in final backtesting, yet the tables contain only optimal-K runs. No fixed-K=3 backtest column supports that claim. The connection appears only in prose. Neither a figure nor a table relates silhouette level to lag-matrix MSE or Sharpe; the MSE curves vary noise and window size only.

Our out-of-sample implementation

We ran one automated implementation, and the following figures are ours. It covers 2020-01-01 to 2024-07-01, or 1,131 trading days, with no overlap with the paper's sample. The universe starts from the annual point-in-time top 200 US large caps and retains the 100 most liquid names by trailing 21-session dollar volume. We used MiniRocket features, K-means with silhouette-selected K, median DTW lags within clusters, and the lowest-quartile RowSum as Leaders. The strategy bought an equal-weight Lagger basket when the span-1 EWMA of Leader returns exceeded 10bps, otherwise holding cash. We charged 7.5bps one way plus square-root impact across 60,055 trades.

Net Sharpe was 0.39, with CAGR of 5.56%, volatility of 15.59%, and maximum drawdown of -39.26%. Our win rate of 51.44% and profit factor of 1.08 sit close to the paper's 0.520 hit rate and 1.079 profit-loss ratio. The coin-flip hit rate reproduced; the Sharpe did not. The paper's best lead-leg row reports 0.866 with 6.21% return and 7.17% volatility, while its strongest 679-asset lag row reaches 0.793.

Our strategy is a long-only lag leg. These portfolios differ, so the comparison is not like-for-like. Returns are close at 5.56% against 6.21%. Volatility accounts for the full Sharpe gap, at 15.59% against 7.17%. Our choice to replace the paper's signed PnL with a long-or-cash gate converted a market-flat series into a directional position. Realized beta to SPY was 0.44. Daily rebalancing costs, a 100-name sleeve in place of 679, and a window dominated by the COVID crash and 2022 explain the remainder. This pass failed to reproduce the 0.866 and primarily provides evidence about our implementation. It is one automated pass rather than a verdict on the authors' work.

A lag leg that beats plain time-series momentum, after costs and on a universe unused for parameter selection, would change my mind. Until then, the 0.866 remains a momentum result carrying a clustering label.

Our backtest stops at 2024-07-01, and everything after that date is deliberately left untouched so the same strategy can be checked out of sample later.

How our backtest worked

The steps the code we ran actually executed, from its strategy card. Ours, not the paper's — it is one automated implementation of the idea, not the authors' own.

At each daily close:
1. Select the annual point-in-time top 200 non-ADR US stocks by capitalization.
2. Retain the 100 names with the highest trailing 21-session mean dollar volume and complete data.
3. Build 21-close paths; the executable implementation z-scores each path.
4. Extract MiniRocket features and run K-means across a tractable sqrt-based K grid; choose K by silhouette score.
5. Within each non-singleton cluster, align every pair with DTW and estimate median directional lag.
6. Form the antisymmetric lag matrix and rank stocks by RowSum, with lower scores treated as more leading.
7. Label the lowest 25% in each cluster as Leaders and the remainder as Laggers.
8. Compute the equal-weight Leader close-to-close return and its span-1 EWMA.
9. If EWMA > 0.001, target an equal-weight long portfolio of valid Laggers; otherwise target cash.
10. Cap each position at 10% of equity and gross exposure at 100%. Execute rebalances at the close using MOC orders.
11. Exit when the gate fails, a stock ceases to be a Lagger, or it leaves the eligible universe. Charge fixed one-way costs plus square-root impact on every trade.