Research
Machine Learning-Based Bitcoin Trading Under Transaction Costs: Evidence From Walk-Forward Forecasting
Machine-learning models can produce forecasts of hourly Bitcoin returns that look useful on statistical criteria, but a forecast is not the same thing as a profitable trade once fees, spread, and…

- arXiv
- 2606.00060
- Published
- 2026-05-19
- Authors
- Andrei Bysik, Robert Ślepaczuk
AI summary
Overview
Research area: Quantitative finance and financial machine learning — specifically short-horizon (hourly) cryptocurrency return forecasting and the translation of forecasts into net-of-cost trading strategies.
Technical level: Advanced. The paper assumes familiarity with walk-forward optimisation, gradient-boosted trees, recurrent and attention-based neural networks, EGARCH volatility models, and block-bootstrap inference.
Scope: A controlled comparison of XGBoost, LSTM, and iTransformer forecasts on roughly 70,000 hourly BTC/USDT observations under a 27-fold walk-forward protocol, testing whether a cost-aware execution filter can turn weak hourly predictability into positive performance after 10 basis points of transaction costs.
What This Paper Is About
Machine-learning models can produce forecasts of hourly Bitcoin returns that look useful on statistical criteria, but a forecast is not the same thing as a profitable trade once fees, spread, and slippage are deducted. The authors ask whether such forecasts survive contact with transaction costs, and whether the way a forecast is converted into a position — the execution rule — matters as much as the model that produced it. Their answer is that naive sign-based trading collapses under costs, while a filter that only trades when the forecast is large enough to justify the cost restores profitability in selected configurations.
Key Contributions
-
Trading-first evaluation. Machine-learning forecasts are judged directly by realised net-of-cost trading performance rather than treated as a secondary simulation after statistical forecast metrics, using the same data, features, walk-forward design, cost assumption, and trading rules across all models.
-
A cost-aware execution filter. The paper introduces and tests a simple rule that permits a position change only when the forecast magnitude exceeds a transaction-cost-based threshold scaled by a parameter λ, directly targeting the turnover channel through which short-horizon strategies fail.
-
A controlled three-architecture comparison. XGBoost (tree-based tabular learning), LSTM (recurrent sequence modelling), and iTransformer (attention across variables rather than timestamps) are compared on hourly BTC/USDT data inside one common walk-forward framework, so performance differences can be attributed to model design rather than experimental setup.
-
A six-part empirical programme. The study tests naive sign strategies under costs, the effect of the cost-aware filter, the value of technical-indicator and EGARCH feature enrichment, architecture ranking, MSE versus MAE training loss, and the effect of the validation-set model-selection criterion.
Main Findings
-
Naive sign strategies fail after costs: All three models produce positive gross trading performance in selected configurations, but sign-based strategies fail once transaction costs of ten basis points are imposed.
-
The filter is the decisive mechanism: The cost-aware execution filter sharply reduces turnover — by more than an order of magnitude — and restores positive net performance in selected XGBoost configurations. With c = 0.001 and λ = 2.0, a long-only entry or exit requires a forecast magnitude above 0.20%, while a long-short reversal requires above 0.40%.
-
Best headline result: The strongest long-only XGBoost strategy produces annualised returns above 65% with a Sharpe ratio above one.
-
No formal dominance over buy-and-hold: Formal Sharpe-ratio comparisons against the passive benchmark do not reject after bootstrap adjustment, and fold-level diagnostics show performance is uneven across market regimes.
-
XGBoost leads descriptively but not statistically: XGBoost outperforms LSTM and iTransformer in the main cost-aware long-only comparison, but paired circular block-bootstrap tests do not support statistically robust dominance after multiple-testing correction.
-
Feature enrichment is mixed: Technical indicators improve performance in selected configurations, while EGARCH-derived features do not deliver a uniformly robust incremental gain.
-
Loss function and selector effects are fragile: MSE performs better than MAE descriptively in the main XGBoost specification, but the difference is statistically fragile; the model-selection criterion changes point estimates and strategy rankings, but no selector pair shows robust dominance.
-
Execution design dominates: The main obstacle in hourly cryptocurrency trading is not only weak predictability but also the way forecasts are converted into trades.
Methodology in Plain English
The authors download hourly open, high, low, close, and volume bars for the Binance BTC/USDT USD-margined futures contract from December 2017 to January 2026, using the first month as a burn-in for rolling features. Missing hours are filled by carrying the previous close forward and setting volume to zero, keeping the hourly grid regular without inventing price paths. After preprocessing there are 70,872 observations, and the effective walk-forward evaluation sample contains 70,128.
The prediction target is the next-hour log return. Three feature sets are nested: raw OHLCV; OHLCV plus technical indicators; and OHLCV plus technical indicators plus EGARCH volatility features. Technical indicators are computed causally within each fold over rolling windows of 3, 6, 12, 24, 48, 72, 168, and 336 hours plus six lagged-return variables, generating a candidate pool of 94 variables. Candidates are mapped into 10 selection groups, ranked inside four sequential training blocks by absolute Spearman correlation with the next-hour return, and the best-ranked candidate per group is kept — so 10 technical variables are added per fold. EGARCH is fitted on the training segment only with a constant mean and Student-t innovations, with orders (1,1,1), (2,1,1), (1,1,2), or (2,1,2) chosen by AIC, contributing conditional volatility, log conditional volatility, and the standardised residual.
Evaluation uses a non-anchored rolling walk-forward: 12 months of training, 3 months of validation, 3 months of test, advancing three months per fold for 27 sequential out-of-sample test folds. Hyperparameters are tuned with Optuna's Tree-structured Parzen Estimator — 50 trials per fold for XGBoost and 40 for the two neural models — and after selection each model is retrained on training plus validation before being applied once to the held-out test window.
Trading is simple. A baseline rule maps the sign of the forecast into a long-only or long-short position, with 10 basis points charged per unit of turnover. The cost-aware variant only changes position if the absolute forecast exceeds λ times the cost of the implied trade; otherwise it holds the previous position. Returns are compared with paired circular block-bootstrap tests applied to realised return differentials.
Why This Matters
The paper reframes a common research question. Instead of asking only whether crypto returns are predictable, it asks whether predictability survives execution — and shows that the execution rule can matter more than the model, the features, or the loss function. For a literature that often reports strong statistical fit and then adds costs as an afterthought, that is a useful discipline.
Real-world applications:
-
Algorithmic trading desks: The λ-scaled magnitude threshold is a cheap, model-agnostic way to cut turnover on any hourly signal generator without retraining the model.
-
Retail and prop crypto strategies: The finding that naive sign-following dies at 10 basis points is a practical warning for anyone deploying hourly signals on futures.
-
Model selection and risk governance: Reporting gross and net performance side by side, plus bootstrap tests against a passive benchmark, gives a template for honest strategy evaluation.
-
Feature engineering decisions: The result that technical indicators help in some configurations while EGARCH features do not provide uniform gains helps practitioners avoid assuming volatility-regime features are free value.
Industry relevance: The paper's central claim — that the prediction-to-trading gap, driven by turnover, is the binding constraint in short-horizon crypto trading — maps directly onto how systematic crypto funds size, filter, and gate their signals.
Future Directions
-
Richer execution modelling. The backtest does not simulate order-book depth, partial fills, maker–taker routing, or time-varying bid–ask spreads; the authors flag transaction-cost sensitivity analysis in their robustness section, but realistic microstructure simulation is the natural next step.
-
Cost-aware execution combined with direction-aware losses. The paper positions its execution filter as an alternative to specialised objectives such as Mean Absolute Directional Loss and Generalised Mean Absolute Directional Loss; testing whether the two approaches compound is an open question.
-
Statistical power and formal dominance. Bootstrap tests cannot separate XGBoost from LSTM and iTransformer, nor MSE from MAE, nor one selector from another. Longer samples, additional assets, or pooled testing across folds would be needed to settle those rankings.
-
Extension beyond BTC/USDT hourly futures. Whether the filter's advantage generalises to other cryptocurrencies, other frequencies (the paper notes tick and minute data carry stronger bid–ask bounce and quote-flickering effects), or traditional assets is untested here.
Target Audience
Quantitative researchers and graduate students in financial machine learning and market microstructure; systematic traders and quant developers working on intraday crypto strategies; and risk or model-validation teams who need a concrete demonstration that forecast accuracy and net trading profitability are separate objects requiring separate scrutiny. Readers without a background in walk-forward evaluation, neural architectures, or bootstrap inference will find the methodological sections demanding.
Authors’ abstract
This paper investigates whether machine learning forecasts of hourly BTC-USDT returns can be converted into economically meaningful trading performance after transaction costs. Using approximately 70,000 hourly observations from 2018-2026, XGBoost, LSTM, and iTransformer are evaluated in a 27-fold walk-forward protocol. All three models produce positive gross trading performance in selected configurations, but naive sign-based strategies fail once transaction costs of ten…
The full abstract on arXiv