Skip to main content

Machine Learning for Price Prediction

What actually works in ML for crypto: regime classification, anomaly detection, and the reality of price prediction.

From Thrive on YouTube

Watch the matching Thrive video

Watch the series
VWAP Explained: How to Use VWAP and Anchored VWAP in Crypto

VWAP Explained: How to Use VWAP and Anchored VWAP in Crypto

Part of Charting and Market Structure. Education only. Not financial advice.

Machine Learning for Price Prediction: What Actually Works

The internet is saturated with claims about AI models that predict crypto prices. YouTube thumbnails promise "99% accuracy." Course sellers tout neural networks that "beat the market." The reality is far more nuanced, and understanding the gap between marketing and substance is essential for anyone considering ML-based trading. Some applications of machine learning in crypto trading genuinely work. Most do not. The difference lies in understanding what problems ML can solve and what problems are fundamentally unsolvable.

Feature Engineering: Where ML Starts

Every ML model is only as good as its input features. In crypto price prediction, the feature engineering process determines whether the model has any chance of success. OHLCV data (open, high, low, close, volume) is the baseline. Every model starts here, and every model that relies only on this data is competing against every other technical analysis approach that has ever existed.

Order book features add microstructure information: bid-ask spread, order book depth, imbalance ratios, and large order detection. These features provide genuine predictive power for very short-term (seconds to minutes) price movements but are noisy at longer timeframes. On-chain features (exchange flows, active addresses, transaction counts, DeFi TVL changes, whale movements) capture fundamental activity that is not visible in price data alone. These features tend to have predictive power at medium timeframes (hours to days).

Sentiment features derived from social media, news, and community channels add another dimension. The key is engineering features that capture changes in sentiment rather than absolute levels. A sudden shift from neutral to strongly negative sentiment, combined with on-chain exchange inflows, is a more powerful feature than raw sentiment score. The best feature engineering creates composite features that capture relationships between multiple data sources: divergences, convergences, and regime indicators.

Models: An Honest Assessment

Random forests and gradient boosting for regime classification. This works. Instead of trying to predict exact prices, these models classify market conditions into regimes: trending up, trending down, ranging, high volatility, low volatility. Regime classification is a solvable problem because market regimes exhibit persistent statistical properties that tree-based models can learn. Knowing the current regime lets you select the appropriate trading strategy (trend following in trends, mean reversion in ranges, reduced exposure in high volatility). This is one of the few ML applications in crypto with consistent real-world results.

LSTMs and transformers for next-candle prediction. This barely works. Recurrent and attention-based neural networks can be trained to predict the direction of the next candle (up or down) with accuracy slightly above random (52-55% in the best cases). The problem: after transaction costs, slippage, and execution imperfections, a 53% win rate with a 1:1 risk-reward ratio is marginally profitable at best. These models also suffer from severe overfitting. They learn patterns in training data that do not repeat in live markets. The published accuracy rates from academic papers and online tutorials are almost always inflated by methodological flaws (data leakage, lack of proper walk-forward validation, ignoring transaction costs).

Reinforcement learning for execution optimization. This is promising. RL agents that learn optimal execution strategies (when to split orders, how to time entries, how to manage partial fills) can reduce execution costs and improve fill quality. The environment is more stationary than price prediction: execution dynamics are governed by market microstructure that changes slowly. RL also shows promise for portfolio rebalancing, where the agent learns optimal rebalancing frequency and sizing through interaction with the market.

The Overfitting Epidemic

Overfitting is the single biggest reason ML trading strategies fail in production. A model that learns the training data too well (including its noise) will perform beautifully in backtests and fail in live trading. If someone shows you a backtest with a smooth, upward equity curve, the model is almost certainly overfit. Real strategies have drawdowns, losing streaks, and periods of underperformance. Demand walk-forward validation results (where the model is tested on data it has never seen, in chronological order) not in-sample backtests.

The Fundamental Problem: Non-Stationarity

Financial markets are non-stationary: the statistical properties of the data change over time. A pattern that was profitable in 2023 may not work in 2024 because market structure, participants, and dynamics have changed. ML models assume that the future resembles the past (at least statistically), and this assumption is violated more frequently in crypto than in traditional markets. Regulatory changes, new protocol launches, narrative shifts, and evolving market microstructure constantly alter the data-generating process.

Sample size is another fundamental constraint. Crypto markets are young: Bitcoin has existed since 2009, and most altcoins have much shorter histories. Training sophisticated ML models requires large datasets, but a model trained on 2017-2023 data is training on a period where the market structure changed dramatically multiple times. The data is not homogeneous, which violates the assumptions most ML algorithms rely on.

Walk-forward validation is the minimum standard for evaluating any ML trading model. Split the data chronologically: train on the oldest segment, validate on the next segment, test on the most recent segment. Then slide the window forward and repeat. If the model performs well across multiple walk-forward windows, it has a chance of working live. If it only works in one specific window, it is overfit to that period's characteristics.

Regime classification (tree models)Works. Classifying market conditions into trending/ranging/volatile states is solvable and practically useful for strategy selection.
Anomaly detectionWorks. Flagging unusual patterns in volume, flows, and behavior for human review is a proven application.
Execution optimization (RL)Promising. Reducing slippage, optimizing order timing, and improving fill rates through learned execution policies.
Next-candle direction (neural nets)Marginally works. 52-55% accuracy before costs, with high overfitting risk. Not a reliable standalone edge.
Exact price predictionDoes not work. Any claim of high-accuracy price prediction is either overfit, fraudulent, or cherry-picked.
Long-term portfolio allocationMixed. ML can help with diversification and risk budgeting but does not reliably predict which assets will outperform.
Feature engineering is king

The quality of input features matters far more than model complexity. Focus on on-chain, orderbook, and cross-source features.

Classify, do not predict

Regime classification is more reliable and useful than price prediction. Know the market state, then apply the right strategy.

Validate ruthlessly

Walk-forward validation is non-negotiable. In-sample backtests are meaningless for evaluating real-world performance.

Expect degradation

Non-stationarity means every model degrades. Plan for continuous retraining and model monitoring.

Ignore the hype

If someone claims 90%+ price prediction accuracy, they are selling you a fantasy. Real ML edges are small, fragile, and require significant infrastructure.