3. Materials and Methods
In this study, we investigate ML classifiers for predicting profitable short-term long entry signals in Bitcoin markets using historical BTC/USDT OHLCV data from January 2020 to November 2025. The analysis addresses three research questions: (RQ1) whether hierarchical multi-timeframe, price-level-agnostic features improve classification performance; (RQ2) which algorithms best discriminate profitable entries; and (RQ3) whether temporal cross-validation and a true out-of-sample holdout generalize learned patterns across expanding time periods. All analyses were conducted in Python 3.10 using pandas 2.0 [
52], NumPy 1.24 [
53], scikit-learn 1.3 [
54], XGBoost 2.0 [
49], LightGBM 4.1 [
51], numba 0.60 [
55] (for JIT-compiled simulations), and CCXT 4.3 [
56] for data retrieval.
3.1. Data Acquisition and
Preprocessing
OHLCV (Open, High, Low, Close, and Volume) data for BTC/USDT spot trading were sourced from the Binance exchange via the CCXT library, covering 1 January 2020, to 30 November 2025 (UTC timestamps). The data encompass diverse market regimes, including the 2020 COVID recovery and 2021 bull market, and the 2022 bear market (−76.9% drawdown), and the 2023–2025 recovery [
57]. Four temporal resolutions were used: 15 min (primary entry timeframe), 4 h (intraday context), 1 day (daily momentum), and 3 days (swing-cycle context, aggregated from non-overlapping daily candles aligned to the 17 August 2017 epoch). Technical indicators were pre-computed using TA-Lib [
58] with standard parameters [14-period Relative Strength Index (RSI)/Stochastic RSI, 12/26/9 Moving Average Convergence Divergence (MACD), 20-period Bollinger Bands (BB) with 2 standard deviations (
= 2), 14-period Average Directional Index (ADX)/Average True Range (ATR), and 12/26-period Exponential Moving Average (EMA)] and stored in Apache Parquet format.
Data integrity checks confirmed zero missing values, no duplicate timestamps, and strict temporal continuity. No candles were filtered for outliers (e.g., flash crashes were retained to reflect real trading conditions). Initial NaNs from insufficient indicator history were dropped. Higher timeframes were merged with 15-minute data using backward-looking as-of joins on timestamp-shifted columns (, where is the timeframe duration), ensuring that only fully closed candles were used and look-ahead bias was prevented. Forward-fill was applied exclusively (no backward-fill), and remaining NaNs were dropped.
3.2. Label Generation
Binary labels () were assigned following a simulation protocol designed to frame price forecasting as a classification problem, focusing on the success probability of an entry signal against dynamic exit parameters. Two entry mechanisms are considered, and results are aggregated through majority voting.
3.2.1. Entry Conditions and Trade
Simulation
For each of the 175,000+ 15 min candles, the algorithm evaluated the viability of a long entry based on three simultaneous technical criteria:
Stochastic RSI K: A value below 20, indicating an oversold condition.
Average Directional Index (ADX): A value above 25, ensuring the presence of trend strength.
Alignment of Moving Averages (EMA): Fast EMA (12-EMA) above slow EMA (26-EMA), confirming upward momentum.
Once an entry is validated at the close of candle i, the simulation engine evaluates the outcome of the position in subsequent candles. To ensure rigorous results, a conservative execution hierarchy was applied: the Stop-Loss (SL) is checked before the Take-Profit (TP) within the same candle, avoiding overestimation of profitability during high-volatility periods.
3.2.2. Aggregation by Majority
Voting
Given the arbitrary nature of fixing a single SL/TP pair, a multi-parameter consensus approach was adopted. Fifty-four distinct combinations were simulated for each signal, resulting from the Cartesian product of:
Stop-Loss (SL): .
Take-Profit (TP): .
For each signal
i, the final label
is determined by the arithmetic mean of the binary classifications across all
simulations. Let
represent the simulation outcome for the parameter combination
The label aggregated by majority voting is calculated through a step function applied to the convergence threshold of 0.5:
For clarity in applying the majority voting formula, consider a hypothetical scenario where an entry signal is identified by the algorithm in the BTC/USDT pair:
Entry Signal: The 15 m candle closing price is , with RSI < 20, ADX > 25, and 12-EMA > 26-EMA.
Simulations (N = 54): Are tested 54 risk management variations for this specific entry:
Configuration A (Agressive): SL = 1%, TP = 7%. The price drops to before rising. The SL is hit. Result: 0.
Configuration B (Conservative): SL = 5%, TP = 2%. The price fluctuates but reaches without touching . Result: 1.
Configuration C (Balanced): SL = 2%, TP = 2%. The price hits the profit target. Result: 1.
Aggregation:
After processing all 54 combinations, it is found that 38 simulations resulted in success (TP reached) and 16 resulted in failure (SL hit).
Calculation: .
Decision: Since , the final label for this sample is 1 (Positive).
This process ensures that the machine learning model only learns patterns that lead to statistically robust entries, regardless of short-term fluctuations that could invalidate tighter exit strategies.
This aggregation method produced 6951 balanced samples (~48.5% positive class), ensuring that the signals learned by the models represent profit opportunities across diverse risk-reward profiles.
A potential limitation of majority-vote aggregation is that it may smooth out extreme market signals: a highly profitable entry under aggressive risk parameters (e.g., SL = 7%, TP = 20%) may be classified as negative if conservative configurations dominate the vote. This design choice deliberately prioritizes entries that are profitable across diverse risk profiles, reducing sensitivity to any single SL/TP specification. However, it may underrepresent ultra-short-duration opportunities that only succeed under tight exit parameters and the majority-vote threshold of 0.5 itself constitutes an implicit choice that favors precision over recall in the label distribution.
3.3. Feature Engineering
A 37-feature pipeline was constructed, all normalized to price-agnostic forms (percentages, ratios, and bounded oscillators [0–1]) to ensure generalizability across price regimes.
Figure 1 summarizes the four-stage construction and alignment procedure.
The multi-timeframe construction differs from multi-scale signal decomposition methods in the order of operations and the admissibility of information at prediction time. Wavelet transforms [
41] and empirical mode decomposition [
42] decompose the price series into basis components whose support may span the entire series window. When such a decomposition is applied to the full dataset before the train/test split, observations that post-date a given prediction point may contribute to the basis functions used to characterize it—a form of look-ahead bias that the causal consistency requirement of López de Prado [
23] explicitly prohibits. This is not an intrinsic limitation of decomposition methods
per se, but a consequence of applying a global pre-processing step outside a causal window.
The present approach avoids this by construction. Each indicator is computed from an independently processed OHLCV series at a fixed calendar resolution (15 min, 4 h, 1 day, 3 days), with no global transform across the full time range. The critical alignment step is the timestamp shift:
where
t is the candle open time and
is the timeframe duration. Advancing the higher-timeframe index by one period before the as-of merge ensures that only fully closed candles enter the feature vector, implementing the information barrier prescribed by López de Prado [
23]. The empirical consequence of misapplying this step was measured within the five expanding walk-forward folds described in
Section 3.5: the uncorrected alignment produced mean fold ROC-AUC values of 0.73–0.81 across models, whereas the corrected alignment reduced these to 0.57–0.61, a decrease of approximately 0.20 points. The price-level-agnostic normalization (percentages, ratios, and bounded oscillators) further ensures that features do not depend on the absolute scale of the price series, maintaining interpretability across the full 2020–2025 price range and supporting generalization to assets at different price levels.
Base indicators (5 per timeframe, 20 total): RSI, Stochastic RSI (K/D), BB position, ADX.
Derived (4 per timeframe + 1 extra for 15 m, 17 total): EMA diff (%), trend direction (binary), 1-period return (%), BB width (%), 5-period return (15 m only).
Features were suffixed by timeframe (e.g., rsi_4h) and merged via timestamp-shifted as-of joins. Leakage safeguards included: forward-fill only, chronological sorting, lagged values only, and temporal splits. No log transforms applied (features bounded by design). The complete feature list is provided in
Appendix A.
3.4. Model Development
Although Deep Neural Networks (DNNs) are frequently identified in the literature as top-performing models due to their ability to capture complex, non-linear interactions [
18], we deliberately excluded them from this study. The primary reason is interpretability: in a financial context, the ability to trace predictive gains back to specific dominant signals—such as momentum, liquidity, or volatility—is essential for ensuring economic coherence and valid risk management [
18]. Neural networks often function as black boxes, where high-dimensional functional transformations obscure the relationship between predictors and outputs [
19].
The five classifiers spanned the following complexity levels: logistic regression (linear baseline), decision tree (nonlinear single tree), random forest (bagged trees), XGBoost (boosted trees), and LightGBM (histogram-optimized boosting). All used class_weight = ‘balanced’ (scikit-learn; Pedregosa et al. [
54]) or scale_pos_weight (boosting) to address fold-varying imbalance, with random_state = 42. Hyperparameters were tuned via GridSearchCV (inner 3-fold TimeSeriesSplit, optimising ROC-AUC), with the search space summarized in
Table 1:
The ranges were constrained to prevent overfitting (~7k samples). Logistic regression features were scaled using StandardScaler (fit on train only); for trees, raw features were used. Nested temporal CV ensured fair comparison of data. The best-performing hyperparameter configurations for all five models are listed in
Appendix B. Additionally, XGBoost was selected for feature importance analysis, as its native split-based importance scores provide a direct and interpretable measure of each feature’s contribution, in contrast to the coefficient-based interpretation of linear models.
Deep learning architectures—including long short-term memory networks (LSTM), gated recurrent units (GRU), temporal convolutional networks, and Transformer-based models—were excluded on two grounds. First, with 6951 training samples, even a minimal LSTM configuration (64 units, one layer) has approximately 10,000 trainable parameters, yielding a parameter-to-sample ratio that makes temporal generalization unreliable [
59,
60]. Recent benchmarks consistently demonstrate that gradient-boosted tree ensembles match or exceed recurrent architectures on tabular financial datasets of this scale, while providing substantially better sample efficiency [
59]. Second, tree-based models permit direct feature importance attribution via split-based gain scores, aligning with explainability requirements for reproducible financial forecasting research [
60]. The 6951 samples are sufficient for the five algorithms evaluated: logistic regression (one regularization hyperparameter), decision trees, and gradient boosting methods with low-depth constraints (three to six hyperparameters per model). Deep neural networks, which typically require tens of thousands of samples per parameter-dense layer to avoid overfitting, are therefore excluded on both sample-efficiency and interpretability grounds.
3.5. Validation Strategy
Models underwent 5-fold expanding-window TimeSeriesSplit [
61], initial data training, and subsequent testing of each unseen period, as summarized in
Table 2.
A true out-of-sample holdout used the full 2020–2024 training (6951 samples) on independently generated 2025 labels (1136 samples, Jan–Nov), unseen during development.
3.6. Performance Metrics
The classifier performance was evaluated using robust statistical metrics. The primary metric was the area under the receiver operating characteristic curve (ROC-AUC), selected for its threshold-independent ranking nature, enabling class discrimination assessment without arbitrary probability cutoffs. Complementary metrics included Accuracy, Precision, Recall (Sensitivity), and F1-score, following the definitions of Powers [
62]. Formal definitions are provided in
Appendix C.
3.7. Trading Simulations and
Assumptions
Simplified backtests compounded per-trade Profit&Loss (P&L) from the label engine (no capital/overlap constraints). Realistic dynamics were modeled using event-driven backtests: 100% equity per position (stress test), 0.1% entry slippage, intra-bar SL/TP priority, max 1 concurrent position, and compounding. No maker/taker fees (typically 0.04–0.2%), funding, or gap risk. 270 SL/TP/threshold combinations were evaluated descriptively [
22,
23]. Metrics: return, Sharpe (annualized, 252 trading days), and maximum drawdown.
3.8. Use of Artificial Intelligence
Tools
During the preparation of this manuscript, large language model tools (Claude Sonnet 3.5, Anthropic, San Francisco, CA, USA) were used to assist with text drafting, writing, and language polishing. Trinka (Crimson AI Pvt. Ltd., Mumbai, Maharashtra, India) was used for grammar and language correction. No AI tools were used for data collection, analysis, code development, result generation, or scientific interpretation. All data processing, modeling code, experimental results, and conclusions are solely the work of the authors.
3.9. Reproducibility
All random states are fixed to 42. Python version, library versions, and exact results are recorded in manuscript/results/training_results.json.
4. Results
This section presents a multi-layered evaluation of the machine learning models, moving from cross-validated classification performance to feature interpretability and, finally, to out-of-sample economic validation.
4.1. Five-Model Comparison
To establish a robust baseline, five classifiers representing different architectural complexities were evaluated using a 5-fold expanding-window approach.
Table 3 summarizes the average performance metrics, with models ranked by ROC-AUC. Random Forest achieves the highest ROC-AUC (0.6086), followed by Logistic Regression (0.5978), XGBoost (0.5915), and LightGBM (0.5857). Decision Tree achieves the lowest ROC-AUC (0.5668). All models fall within a narrow performance band of approximately 0.04 ROC-AUC units, indicating modest but consistent discriminative ability above 0.50 random baselines.
4.2. Fold-by-Fold Performance
To assess the stability of these predictions over time,
Table 4 details the performance across each temporal fold. Fold 1, which trains on the smallest dataset, consistently produces the weakest discrimination across all models (ROC-AUC near 0.51–0.54). Performance improves with additional training data, with folds 2–5 generally achieving an ROC-AUC of 0.56–0.63. Random forest achieved the highest individual fold score (0.6383, fold 2). The fold-level variation ranges from approximately 0.04 (LightGBM) to 0.08 (Decision Tree).
Figure 2 presents the fold-level trajectories. All models cluster within a ROC-AUC band of 0.51–0.64, with the weakest discrimination in fold 1 (limited training data). Random forest and logistic regression alternate as top performers across folds. XGBoost and LightGBM track closely throughout.
4.3. Feature Importance
The feature importance is represented on
Table 5, which shows the 15 most important features of XGBoost. The 4-hour Bollinger Band position is the single strongest predictor (8.4% share), followed by the 4-hour RSI (4.5%) and the 4-hour Stochastic RSI K (4.5%). The 4-hour timeframe contributes three of the top five features, suggesting that the intermediate-timeframe regime context is the most discriminative signal.
Figure 3 displays the top 20 features in a bar chart. The 4-hour Bollinger Band position is the dominant feature, and the remaining features are distributed more evenly across timeframes. The dominance of the 4-hour Bollinger Band position (8.37%) and RSI suggests that intermediate-term volatility and momentum regimes are the most discriminative signals. This corroborates findings that volatility and momentum are amongst the most reliable predictive signals in financial machine learning. To provide a broader perspective,
Table 5 aggregates these scores by timeframe.
4.4. Confusion Matrix
Table 6 shows the confusion matrix for the best-performing model on the final (largest) test fold.
4.5. Timeframe Contribution
Analysis
Table 7 aggregates XGBoost feature importance by timeframe. Importance is distributed more evenly across timeframes than might be expected, with the 4 h timeframe contributing the largest aggregate share due to the dominance of bb_position_4h. The 3-day and 1-day timeframes provide complementary context, while the 15 min timeframe—despite contributing 10 of 37 features—accounts for a smaller aggregate share, consistent with the interpretation that broader market regime features are more discriminative than short-term oscillator readings.
This timeframe-level aggregation constitutes an ablation-style analysis of each temporal resolution’s contribution to predictive performance. The 4 h scale provides approximately 2.5× the discriminative signal of the 15 min scale, while all four timeframes contribute meaningfully, the multi-resolution design cannot be reduced to any single scale without measurable loss.
4.6. Simplified Out-of-Sample
Backtest
A simplified backtest is conducted on the last temporal fold (fold 5), which serves as a strictly out-of-sample test set. Each model is trained on folds 1–4 and generates predicted probabilities for the test samples. A strategy is then simulated that enters a position only when the predicted probability exceeds a threshold and uses each signal’s realized outcome as the average per-trade P&L from the label generation.
Table 8 presents the results of the backtest. The number of trades decreases as
increases from 0.5 to 0.7, whereas the hit ratio generally increases. At
, logistic regression achieves the highest hit ratio (88.2%) but with very few trades (17), while XGBoost maintains a more practical balance of 60.5% hit ratio with 329 trades. The unfiltered rule-based baseline achieved 44.8% hit ratio across all 1158 signals. Most ML-filtered strategies reduce the maximum drawdown relative to the unfiltered baseline, although the improvement is modest given the models’ overall low discriminative power.
4.7. Out-of-Sample Evaluation (2025
Holdout)
Table 9 presents the 2025 out-of-sample classification metrics. To provide the most stringent test of generalization, all five models are trained on the complete 2020–2024 dataset (6951 samples) and evaluated on independently generated 2025 data (1136 samples). The 2025 labels were produced using the identical simulation engine and were not used during any stage of model development. Logistic regression achieved the highest ROC-AUC (0.6087), followed by random forest (0.5862) and XGBoost (0.5805). The model ranking partially shifts compared to cross-validation: Logistic Regression moves from second to first, suggesting that its simpler linear decision boundary is slightly better for a fully unseen period. All five models maintain ROC-AUC above 0.54, confirming that modest discriminative ability persists into 2025, although the signal is weak.
Table 10 shows the results of the 2025 out-of-sample backtest. At
, logistic regression achieved the highest hit ratio (76.9%) with 26 trades, while XGBoost reached 70.0% with 60 trades. The rule-based baseline without ML filtering achieved 48.9% hit ratio across all 1136 signals. ML-filtered strategies improve hit ratios relative to the unfiltered baseline, particularly at higher thresholds, although the trade-off between selectivity and trade count is more pronounced in ML-filtered strategies than in cross-validation. The modest improvements confirm that the ML filter provides a real but limited edge on unseen data.
4.8. Event-Driven Backtest
A full event-driven simulation is conducted on the 2025 out-of-sample period to complement the simplified backtest above. Unlike the simplified backtest, which sequentially compounds individual trade P&L values, the event-driven backtest models realistic trading conditions: capital allocation (100% of equity per position for single-asset BTC trading), compound interest (position size scales with current equity), entry slippage (0.1% cost applied to entry price), intra-bar stop-loss/take-profit execution using high/low prices, and a maximum of one concurrent position.
The XGBoost model trained on the full 2020–2024 dataset is used for signal generation within a two-phase hybrid strategy. In the first phase, the same rule-based entry condition used for label generation must be satisfied (Stochastic RSI K < 20, ADX > 25, EMA alignment); only candles meeting this filter are passed to the model. In the second phase, the model produces a predicted probability for the filtered candle; if this exceeds the threshold , a long position is entered. It is therefore important to note that the event-driven backtest evaluates a hybrid strategy—a rule-based pre-filter combined with an ML probability gate—rather than a pure ML signal. The ML component is effectively learning to discriminate profitable from unprofitable outputs of the base rule, not to generate entry signals independently. Positions are exited when the candle’s low reaches the stop-loss price or the candle’s high reaches the take-profit price, following the same conservative priority used in label generation (stop-loss checked first).
Table 11 presents the top configurations ranked by total return on the 2025 out-of-sample period across 270 parameter combinations (6 SL × 9 TP × 5 thresholds).
The best configuration (SL = 1%, TP = 2%, = 0.7) achieves a +35.97% return with 185 trades and a maximum drawdown of −17.56%. The consistent appearance of across all top configurations confirms that higher probability thresholds improve economic outcomes by filtering out lower-confidence signals. The asymmetric risk-reward ratio (SL = 1%, TP = 2%) captures small but frequent gains, with a win rate of 39.5% compensated by the 2:1 reward-to-risk ratio.
These figures represent a gross upper bound on achievable returns, obtained before any transaction costs. The Sharpe ratios remain low (0.08–0.14) and maximum drawdowns of 17–22% indicate substantial risk even in this optimistic scenario. Crucially, the backtest does not model exchange fees (typically 0.1% per trade), which would reduce net returns by approximately 37 percentage points across 185 trades at 0.2% round-trip cost—likely erasing the entirety of the observed profit. The central implication is that models with ROC-AUC ≈ 0.57 cannot be expected to generate economically significant returns once realistic costs are incorporated, and transaction-cost modeling is an indispensable step before any deployment decision.
Table 12 presents a cost sensitivity analysis for the best configuration (SL = 1%, TP = 2%,
= 0.7, 185 trades), illustrating how net return degrades across representative fee regimes.
5. Discussion
5.1. Model Comparison
The systematic comparison of five algorithms reveals that all models achieve modest but consistent discriminative ability, with ROC-AUC values ranging from 0.57 to 0.61. Random Forest achieved the highest average ROC-AUC (0.6086), followed by Logistic Regression (0.5978) and XGBoost (0.5915). Decision Tree achieved the lowest ROC-AUC (0.5668).
Although existing studies report high directional accuracies (often in the 0.70–0.80 range, compatible with ROC-AUC values well above 0.6), to the best of our knowledge, few studies explicitly publish ROC-AUC metrics alongside rigorous multi-timeframe alignment. Rehman et al. [
63] achieved better results; our results are arguably more realistic because of strict prevention of look-ahead bias in multi-timeframe data alignment.
The performance differences between the top models are small (0.6086 vs. 0.5978 vs. 0.5915). With only five cross-validation folds, these differences are unlikely to be statistically significant. Bootstrap 95% confidence intervals computed from 1000 resamples of the fold-level ROC-AUC scores confirm this: Random Forest [0.576, 0.641] overlaps substantially with Logistic Regression [0.561, 0.635] and XGBoost [0.555, 0.628], supporting the conclusion that no algorithm is meaningfully superior to the others. The practical implication is that model choice matters less than data quality: all five algorithms achieve similar discrimination when given properly aligned multi-timeframe features and rigorous temporal validation.
Random Forest achieves the best cross-validated performance, consistent with Breiman [
47]’s theoretical framework. Its bagging mechanism averages over de-correlated trees, offering lower variance than individual models. However, Logistic Regression achieves the highest 2025 holdout ROC-AUC (0.6087), suggesting that its simpler linear boundary generalizes slightly better to unseen periods—a finding that is consistent with the regularization benefits of linear models under distribution shift.
XGBoost and LightGBM provide competitive discrimination with the additional advantage of native feature importance through gradient-based splits [
50]. Their sequential error-correction mechanism and built-in regularization make them attractive for larger datasets where non-linear patterns may be more prominent.
Decision Trees serve as an informative lower bound: their performance (ROC-AUC 0.5668) shows that individual decision boundaries extract limited predictive signal and that variance reduction through ensembling or boosting provides meaningful improvement.
5.2. Multi-Timeframe Feature
Contributions
Feature importance analysis reveals that intermediate-timeframe features provide the strongest discriminative signal. The 4 h Bollinger Band position is the single most important feature (8.4% share), followed by 4 h RSI (4.5%) and 4 h Stochastic RSI K (4.5%). The 4-h timeframe contributes three of the top five features, suggesting that intermediate regime context is more discriminative than either short-term oscillators or longer-term momentum.
The importance distribution across timeframes is more balanced than might be expected, with all four timeframes contributing meaningfully. This finding validates the multi-timeframe design: models trained on only 15 min features would miss the majority of the discriminative signal provided by higher-timeframe context.
The prominence of Bollinger Band position—which measures where price sits relative to its recent range—suggests that the model captures mean-reversion dynamics at the 4 h scale. Oversold entries (Stochastic RSI K < 20 on 15 m) are more likely to succeed when the 4-hour Bollinger Band position indicates room for upward movement. The 3-day and daily features provide complementary context about broader market momentum, consistent with established multi-timeframe trading practice [
26].
The superiority of 4 h features over the 15-min timescale reflects a well-known phenomenon in quantitative finance: entry signals at sub-candle resolution are inherently noisy because individual 15 min bars capture transient order-flow imbalances that often reverse within the next few candles. In contrast, 4-h indicators capture mean-reversion cycles that persist over multiple 15 min periods, providing the regime context needed to assess whether a given entry timing is structurally favorable. The 15-min oscillators confirm the precise moment of the entry (i.e., oversold readings) but lack the capacity to determine whether the broader market structure supports a sustained price recovery. The ablation analysis in
Table 7 confirms that removing the 4 h features would eliminate approximately one-third of the model’s total discriminative signal.
5.3. Price-Level-Agnostic
Design
The normalization of all features to percentage or ratio form is a deliberate design choice with important practical implications. Bitcoin’s price varied from approximately $5000 (March 2020) to over $60,000 (2021) during our study period. A model using raw MACD values would implicitly learn that a given MACD level indicates a particular market state when, in reality, this represents very different conditions at different price levels.
By expressing MACD as a percentage of price, Bollinger Band width as a percentage, and using only bounded oscillators (0–100 scale), we ensure that the feature space remains stationary across price regimes. This is essential for temporal cross-validation to be meaningful: the model must learn patterns that persist across different market conditions, not artifacts of changing price scales.
We use the term “price-level-agnostic” rather than “asset-agnostic” to be precise about the scope of this contribution. The pipeline eliminates dependence on absolute price levels, which is a necessary—but not necessarily sufficient—condition for cross-asset generalization. Other asset-specific factors (e.g., market microstructure and liquidity profiles) may influence transferability to other cryptocurrencies or asset classes. Empirical validation on additional assets (e.g., ETH/USDT) using the identical feature pipeline is identified as future work.
5.4. Temporal Validation and Overfitting
Prevention
The expanding-window validation strategy provides realistic estimates of generalization performance. Unlike standard
k-fold cross-validation, which violates temporal dependence and can leak future information into training data [
22,
61], our approach guarantees that every test observation occurs strictly after all training observations.
The relatively consistent performance across folds (after fold 1) suggests that the learned patterns, while weak, are genuinely persistent rather than artifacts of specific time periods. However, the overall modest discrimination (ROC-AUC 0.57–0.61) indicates that entry prediction from technical features alone is a fundamentally difficult problem, consistent with weak-form market efficiency arguments [
24].
The ROC-AUC values observed in our study are substantially lower than the values above 0.80 is sometimes reported in the cryptocurrency prediction literature. We attribute this gap primarily to our strict prevention of look-ahead bias in multi-timeframe data alignment (see
Section 5.6). Studies that align higher-timeframe indicators using open timestamps—a subtle but common practice—inadvertently allow the model to see future information, inflating apparent performance.
The 2025 out-of-sample evaluation provides evidence that the modest discriminative ability persists on unseen data. When trained on the full 2020–2024 dataset and tested on independently generated 2025 data, all five models maintain ROC-AUC above 0.54, with Logistic Regression achieving 0.6087. The mean ROC-AUC change from cross-validation to the 2025 holdout is small (approximately 0.01 for most models), suggesting stable but limited generalization. The shift in model ranking—Logistic Regression leading out-of-sample versus Random Forest leading cross-validation—may indicate that simpler decision boundaries generalize slightly better when trained on the full five-year dataset.
5.5. Market Regime Dynamics
During the 2020–2024 sample, Bitcoin traversed several distinct market regimes: a sharp COVID-19 sell-off and subsequent recovery in 2020; a parabolic bull run culminating near 69,000 USD in November 2021; and a deep 2021–2022 bear market with peak-to-trough drawdowns exceeding 70%, followed by a gradual recovery in 2023–2024 [
63,
64,
65,
66]. These dynamics are consistent with empirical analyses that document pronounced bull and bear phases in Bitcoin markets [
63,
67]. The 2025 out-of-sample period further stresses the models, as Bitcoin trades in a post-halving environment shaped by reduced block rewards, evolving market microstructure, and renewed institutional participation [
66,
68]. Over this holdout year, the ML-filtered strategy achieves a +35.97% event-driven return before costs on 185 trades (SL = 1%, TP = 2%, threshold = 0.7), concentrating exposure on a subset of high-confidence entry signals rather than full market exposure. Although realistic transaction costs would substantially reduce this gross performance, the positive out-of-sample result under such volatile conditions suggests that even modest discriminative ability can be economically meaningful when combined with appropriate risk management [
64,
67].
5.6. Comparison to Literature
Our results provide a sobering complement to the existing cryptocurrency prediction literature, while many studies report ROC-AUC values above 0.80 [
4,
30], our results—obtained with strict look-ahead bias prevention—suggest that realistic discriminative ability from technical features alone is more modest (ROC-AUC 0.57–0.61). This gap highlights the critical importance of proper multi-timeframe data alignment, which is rarely discussed in existing studies.
Our study avoids common pitfalls identified by Bailey et al. [
22] and Harvey et al. [
69]: we use temporal validation (not random splits), report all five models tested (not just the best), provide fold-level results (not just averages), and explicitly address multi-timeframe look-ahead bias. This transparent reporting provides a more realistic—if less impressive—picture of expected performance.
5.7. Multi-Timeframe Look-Ahead Bias: A Methodological
Contribution
During the development of this study, we identified and corrected a subtle form of look-ahead bias specific to multi-timeframe feature engineering that, to our knowledge, has not been explicitly discussed in the literature. The issue arises when higher-timeframe indicators are merged with lower-timeframe data using backward-looking as-of joins.
In most OHLCV datasets, the timestamp field represents the candle’s open time. A 4 h candle opening at 08:00 and closing at 12:00 carries the timestamp 08:00, but its close price, RSI, MACD, and all derived indicators reflect information available only at 12:00. When this candle is merged with 15-minute data using a backward as-of join on the timestamp column, all 15 min candles between 08:00 and 11:59 receive indicator values that would not, in reality, be known until 12:00. This effectively grants the model 1–4 h of future information for 4-h features, 1–24 h for daily features, and 1–72 h for 3-day features.
The magnitude of this bias is substantial. Before correction, our models achieved cross-validated ROC-AUC values of 0.73–0.81; after correction, the same models achieved 0.57–0.61. This is approximately 0.20-point inflation shows that even well-designed validation strategies (temporal cross-validation, expanding windows) cannot protect against bias introduced at the feature construction stage.
The correction is straightforward: before the as-of merge, shift the higher-timeframe timestamp forward by the candle duration (e.g., add 4 h for 4 h candles and 1 day for daily candles). This ensures that the merge only matches candles that have fully closed before the decision point. We recommend that all multi-timeframe studies explicitly verify this alignment, as the bias is difficult to detect from classification metrics alone.
5.8. Limitations
Several limitations should be acknowledged:
Single asset: The study focuses exclusively on Bitcoin. While the price-agnostic feature design is intended to generalize, empirical validation on other cryptocurrencies or asset classes is needed. Future validation on ETH/USDT and BNB/USDT using the identical pipeline, without retraining, would constitute a direct test of the price-level-agnostic design claim and assess whether the learned entry-signal patterns transfer across assets with different liquidity profiles and volatility regimes.
Dataset size: The 6951 labeled samples, while sufficient for the algorithms tested, limit the complexity of models that can be reliably trained. Larger datasets from higher-frequency data or multi-asset labeling could support more complex architectures.
Label quality: Labels are derived from a rule-based simulation with fixed entry conditions (Stochastic RSI < 20, ADX > 25, EMA alignment). Different entry conditions would produce different labels and potentially different results. The majority-vote aggregation mitigates sensitivity to specific stop-loss/take-profit parameters but not to the entry rule itself.
Trading simulation limitations: The event-driven backtest models capital allocation, compound interest, slippage, and intra-bar execution but does not include exchange fees (typically 0.1% per trade), market impact, or partial fills. These costs would reduce net returns by approximately 37 percentage points for the best configuration (185 trades × 0.2% round-trip cost), potentially erasing most of the observed profit.
Stationarity assumption: The model assumes that patterns learned from 2020 to 2024 data will persist. Cryptocurrency markets are known for regime shifts and structural changes that may invalidate historical patterns.
Hybrid strategy architecture: The event-driven backtest evaluates a two-phase hybrid strategy, not a pure ML approach. Candles must first satisfy the rule-based entry condition before the ML probability gate is applied. Consequently, the ML component learns to filter the outputs of a specific base rule, and its performance is conditional on that rule’s characteristics. Alternative entry conditions would produce different label distributions, different model behaviors, and potentially different economic outcomes.
Classical machine learning scope: This study evaluates five classical and ensemble classifiers. Deep learning architectures—including LSTM, GRU, temporal convolutional networks, and Transformer-based models—were excluded on sample-efficiency and interpretability grounds. With 6951 training samples, these architectures face an unfavorable parameter-to-sample ratio that limits their generalization potential on this dataset. However, this design choice means that the reported results cannot be directly compared with deep learning benchmarks, and the relative performance of recurrent or attention-based architectures under the same strict temporal validation framework remains an open empirical question.
5.9. Implications for Forecasting
Applications
The prediction pipeline developed in this study has practical relevance for several forecasting use cases. Probabilistic classifiers can rank candidate entry signals by predicted confidence, providing a calibrated filtering layer for downstream decision systems. The multi-timeframe feature pipeline can serve as one component of a broader forecasting engine, combining ML-derived signals with fundamental analysis and portfolio-level risk constraints.
From a model evaluation perspective, the temporal cross-validation framework provides a template for stress-testing forecasting models before deployment. Practitioners and researchers increasingly require that ML forecasting systems demonstrate robustness to regime changes and out-of-sample degradation [
28,
29]. The expanding-window validation used here, which exposes the model to progressively longer historical periods, including the 2022 bear market, addresses this concern directly.
However, translating classification performance into a deployed forecasting system involves additional methodological considerations. Model outputs must be calibrated to produce reliable probability estimates. The relationship between probabilistic forecasts and economic outcomes depends critically on transaction costs, position sizing, and market microstructure—factors that are outside the scope of this paper but represent important steps for any applied ML-driven forecasting system.
5.10. Future Work
Several directions for future research emerge from this study:
Cross-asset validation: Applying the identical 37-feature pipeline to other liquid cryptocurrencies (ETH, BNB, and SOL) and examining whether the price-level-agnostic design transfers without retraining.
Transaction cost modeling: Extending the event-driven backtest to incorporate exchange fees, market impact, and partial fills to determine whether the gross upper-bound return of +35.97% yields any positive net return under realistic trading costs.
Alternative data integration: Incorporating order-flow data (order book imbalance and trade intensity), on-chain metrics (network activity and exchange flows), and sentiment indicators (social media and news) to complement the technical feature set.
Adaptive retraining: Investigating online learning or periodic retraining schedules that allow the model to adapt to regime changes without catastrophic forgetting of previously learned patterns.
Ensemble stacking: Combining the five models evaluated here through stacking or blending to potentially achieve superior discrimination by exploiting the complementary strengths of different algorithm families.
Deep learning benchmarking: Future work should evaluate LSTM, GRU, temporal convolutional networks, and Transformer-based architectures under the identical temporal validation framework used here—applying the same timestamp-shift alignment, expanding-window cross-validation, and 2025 out-of-sample holdout. This would establish whether deep learning models provide meaningful discriminative gains over gradient-boosted ensembles when look-ahead bias is rigorously controlled and would address the open question of whether the reported ROC-AUC ceiling of 0.61 is a property of the feature set or of the model family.