EconBase
← Back to paper

A Multi-Layer Machine Learning and Econometric Pipeline for Forecasting Market Risk: Evidence from Cryptoasset Liquidity Spillovers

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

19,003 characters · 11 sections · 16 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

A Multi-Layer ML–Econometric Pipeline for Forecasting Market Risk: Evidence from Crypto Liquidity Spillovers

abstractWe test whether liquidity/volatility proxies of a small set of core cryptoassets exhibit spillovers that forecast market-wide risk. Our pipeline stacks three statistical layers (A: core LV$\leftrightarrow$core returns; B: PC(LV)$\leftrightarrow$PC(returns); C: vol-PCs$\to$cross-sectional “volatility crowding”) and complements them with VAR IRF/FEVD granger1969,sims1980, HAR-X corsi2009simple, and a leakage-safe ML protocol (time splits, early stopping, validation-only thresholding, SHAP). Using daily data from 2021 to 2025 ($1462\times 74$; latest artifacts under \showtt{output/run_20250808_221301}), we find significant Granger links across layers and moderate OOS performance. We report only the most probative figures (pipeline overview, Layer A heatmap, Layer C robustness, VAR FEVD, and a test-set PR curve) while providing full CSV/PNGs in the artifact directory.

Introduction

Liquidity and volatility co-move across assets, producing spillovers during stress periods amihud2002,chordia2000commonality,diebold2012better,barunik2018measuring. We ask whether a compact set of core coins contains enough information to forecast market-wide risk. We operationalize a three-layer chain of evidence:

itemize[leftmargin=1.05em] • Layer A: core liquidity/volatility (LV) $\leftrightarrow$ core returns. • Layer B: principal components of LV $\leftrightarrow$ principal components of returns. • Layer C: volatility PCs $\to$ a cross-sectional “volatility crowding” target.

We then estimate compact VARs for IRF/FEVD interpretation, fit HAR-X with HAC errors, and train early-stopped XGBoost models on chronological splits. Contributions: (i) a cross-sectional L2 “crowding” target aligned to vol-PCs; (ii) a leakage-aware forecasting protocol; (iii) reproducible artifacts (logs/CSVs/figures) under \showtt{output/run_20250808_221301}.

Related Work

We build on classical tools for dynamic dependence and volatility modeling. Granger causality and VARs provide the workhorse framework for testing predictive links and impulse propagation granger1969,sims1980. Our liquidity/volatility proxies follow standard microstructure and range-based measures—Amihud illiquidity and Parkinson high/low volatility—and are complemented by GARCH-type variation amihud2002,parkinson1980,bollerslev1986. To capture long-memory structure, we adopt HAR-X with HAC inference corsi2009simple,newey1987. For forecasting and interpretability, we employ gradient-boosted trees and SHAP explanations chen2016xgboost,lundberg2017unified. Relative to this literature, we connect core-coin microstructure signals to a market-wide cross-sectional “volatility crowding” target via a multi-layer causality chain, and we evaluate predictability under a leakage-aware protocol (see Figure 1).

Method

Data and Preprocessing

We assemble daily prices/volume from public aggregators (Yahoo Finance, CoinMarketCap) and build an engineered panel with $1462\times 74$ entries (latest run under \showtt{output/run_20250808_221301}). The core coin set is ETH, BTC, YFI, DOT, XEM, BNB, \textsc{ARK}. From these, we compute log-returns, Amihud illiquidity amihud2002, turnover, and two volatility proxies (GARCH(1,1), Parkinson high/low). For interpretability, we retain key raw indicators for major cores and form principal components for the rest; the returns PCs keep $k{=}3$ explaining $85.26\%$ cumulative variance. To attenuate mechanical leverage effects, for each core we regress volatility proxies on its own return and keep residuals (residual vol/turnover columns). For comparison, we also construct legacy market targets based on $14$-day realized volatility and its rolling-standardized variant (\texttt{market_rv14}, \texttt{market_rv14_rs}); all artifacts/CSVs are exported under \showtt{output/run_20250808_221301}.

Core-coin selection. We endogenously select “core” coins by constructing a directed Granger network on standardized log-returns and keeping the strongest senders by PageRank brin1998pagerank. Specifically, \[ i \to j \ \text{iff}\ \min_{\ell=1,\dots,5} p_{i\to j}(\ell) < 0.05, \] and we rank nodes by PageRank on $G^\top$ (damping $\alpha{=}0.85$), taking the top-$N$ and enforcing a small whitelist $\{\textsc{BTC},\textsc{ETH},\textsc{BNB}\}$ for coverage. The latest run yields ETH, BTC, YFI, DOT, \textsc{XEM}, \textsc{BNB}, \textsc{ARK}. From these, we compute log-returns, Amihud illiquidity, turnover, and two volatility proxies (GARCH(1,1), Parkinson high/low). For interpretability, we retain key raw indicators for major cores and form principal components for the rest; the returns PCs keep $k{=}3$ explaining $85.26\%$ cumulative variance. To attenuate mechanical leverage effects, for each core we regress volatility proxies on its own return and keep residuals. We also construct legacy targets (\texttt{market_rv14}, \texttt{market_rv14_rs}); all artifacts/CSVs are under \showtt{output/run_20250808_221301}.

Targets and Factors

From daily data on core coins (e.g., BTC, ETH, BNB, YFI, \dots), we compute log-returns, Amihud illiquidity, turnover, and high/low-based volatility. For each group, we form PCs. The volatility crowding target is \[ \textstyle \mathrm{mkt\_xsec\_vol\_l2}(t)=\sqrt{\frac{1}{K}\sum_{k=1}^{K} z_k(t)^2},\quad z_k(t) = \frac{\mathrm{PC}^{(\mathrm{vol})}_k(t)-\mu_k}{\sigma_k}, \] optionally rolling-standardized over a window $W$.

figure*[figure* omitted — 1,082 chars of source]

Layered Granger and VAR

We run block-Granger tests granger1969 in small VARs sims1980 with BIC-selected order (fixed-lag variants for robustness). We report F, $p$, and BH-FDR $q$. Two compact VARs are used for interpretation: (i) a “main” block (LV + two vol-PCs + target); (ii) a vol-only block (vol-PCs + target), with orthogonalized IRFs and FEVDs plus Ljung--Box $Q(10)$ checks. We implement block-Granger tests in small VARs (order by BIC, with fixed-lag variants for robustness) and report the F-statistic, $p$-value, and Benjamini--Hochberg FDR $q$ for each layer.

HAR-X with HAC

Following corsi2009simple, we regress a market risk target $y_t$ (our cross-sectional crowding or RV variants) on daily/weekly/monthly averages of volatility PCs:

equation[equation omitted — 149 chars of source]

where $\overline{v}_{t-a:t}$ denotes the mean of vol-PC regressors over the indicated window. Inference uses Newey–West HAC standard errors.

ML Protocol (Leakage-Safe)

We construct an $H$-day risk index by blending short-horizon dispersion in features with structural shocks extracted from VARs. For $H{=}10$,

equation[equation omitted — 174 chars of source]

where $\sigma^{(\mathrm{feat})}$ is a rolling standard deviation of selected inputs and $\epsilon^{(\mathrm{struct})}$ are rolling mean absolute structural shocks. We run chronological splits (70%/15%/15% train/valid/test) with uniformly lagged features ($+1$ day) to ensure “use today to forecast $t{+}H$”. Models are XGBoost chen2016xgboost with early stopping; we tune only on validation. The classification threshold is chosen on the validation set to maximize F1,

equation[equation omitted — 100 chars of source]

then frozen for the test set (positives correspond to the top 15% risk regime). SHAP values lundberg2017unified are computed on the fitted booster for attribution; full predictions/curves reside under \showtt{output/run_20250808_221301}.

Experiments

We use the latest run directory \showtt{output/run_20250808_221301} and robustness folder \showtt{output/robust_output/compare_20251001_013842}. Full tables/CSVs are exported there; we include only the most probative figures below liu2023forecasting,wang2023machine,qiu2021forecasting.

\noindentKey findings Layer A: 25/35 block-Granger tests are significant at $p{<}.05$ with BH-FDR control; liquidity/volatility of BNB, XEM, and YFI lead their own returns, while returns Granger-cause residual vol/turnover for most cores.

Layer B: 5/15 PC-to-PC links are significant; examples include $\mathrm{pcLV}\!\to\!\mathrm{returns\_PC3}$ and $\mathrm{pcRET}\!\to\!\{\mathrm{amihud\_PC1},\mathrm{turnover\_PC1}, \\ \mathrm{garch\_vol\_PC3},\mathrm{park\_vol\_PC1}\}$.

Layer C: the raw market cross-sectional crowding target \showtt{mkt_xsec_vol_l2} is significantly predicted by volatility PCs at lag $3$ ($p{=}0.0146$); standardized or leave-$k$-out variants are not significant in the latest run.

ML: the risk-index regressor attains test $R^2{=}0.53$; the classifier reaches ROC-AUC $0.74$ and PR-AUC $0.47$, using a threshold tuned only on validation and frozen on test.

Baselines: persistence-based regressions (AR/HAR-X) nearly saturate level prediction ($R^2{\approx}0.998$), while in classification logistic regression achieves a higher ROC-AUC ($\sim$0.90) but lower PR-AUC ($\sim$0.44); our leakage-safe XGBoost instead delivers the best PR-AUC ($0.47$$0.52$ across RS windows), which is the more informative measure under imbalance and demonstrates its superior early-warning ability.

table[table omitted — 527 chars of source]

\noindentLayer A and B.

figure[figure omitted — 961 chars of source]

\noindentLayer C robustness.

figure[figure omitted — 1,094 chars of source]

\noindentVAR interpretation.

figure[figure omitted — 963 chars of source]

\noindentML evaluation (classification).

figure[figure omitted — 1,003 chars of source]
figure[figure omitted — 996 chars of source]

\noindentBaseline comparison. Under class imbalance (positives $\approx$ top 15%), PR–AUC is the primary discriminator. While a calibrated Logit can post a high ROC–AUC (near 0.90), our XGBoost achieves a higher PR–AUC (0.47 vs.\ $\sim$0.44), reflecting earlier concentration of true positives at actionable recall. We therefore emphasize PR–AUC and F1 at the validation–chosen, test–frozen threshold; full per–window metrics are in the artifacts.

\noindentCompact Layer C table.

\IfFileExists{output/robust_output/compare_20251001_013842/robust_layerC_table.tex}{

table[table omitted — 244 chars of source]

}

Discussion and Limitations

Layer A shows LV/volatility (BNB, XEM, YFI) Granger-causing returns, while returns drive residual vol/turnover. Layer B links a non-market returns PC to vol-PCs. Layer C shows vol-PCs leading our cross-sectional crowding target at short lags. Limitations: modest sample length; sensitivity to RS-window in Layer C; potential structural breaks adelopo2025interconnectedness,hasan2022liquidity. We therefore provide robustness grids, alternative targets (RS vs. raw; leave-$k$-out), baselines and DM/CI comparisons in the artifacts.

\noindentReproducibility. All results are fully reproducible from the artifact folder \showtt{output/run_20250808_221301}: we fix chronological splits and random seeds, export config.json and pipeline.log, and release the aligned CSVs and figure scripts that regenerate every table and plot.

Ethics

Risk forecasts can influence capital allocation; misuse may amplify herding. We export thresholds/diagnostics/SHAP for transparency and position this as an early-warning tool, not a trading recommendation.