Crypto Feature Engineering for Regime Classification
Raw price data is a starting point, not a solution. If you've tried to classify Bitcoin market regimes using OHLCV data alone — maybe a rolling return, a moving average crossover, some volatility window — you've likely found that the signal degrades exactly when you need it most: at turning points. That's the core problem that crypto feature engineering is designed to solve. This post breaks down the feature categories that actually matter for regime classification, why derivatives data belongs in your feature set alongside price, and where the common approaches fall short.
Why Raw Price Data Fails at Regime Boundaries
Price-based features are lagging by construction. A 20-day rolling return tells you what happened over the last 20 days. A 200-day moving average tells you even less about what's happening now. These features are useful for trend confirmation in stable regimes, but they're structurally blind to the transitions between regimes — which is precisely where the risk is.
Consider Bitcoin's current position as of late April 2026. Price has been range-bound between roughly $67k and $76k for several months, down from a $126k ATH in October 2025. A simple trend-following feature would read this as a prolonged consolidation — which is accurate — but it says nothing about whether this consolidation is accumulation before a new leg higher, or distribution before a deeper correction. Those two scenarios require very different positioning.
The statistical problem is that price returns in crypto are non-stationary, fat-tailed, and regime-dependent. A feature that works well in a trending regime will produce noise in a mean-reverting one. Any classifier trained on price-only features is implicitly learning regime-specific patterns without knowing which regime it's in — a kind of circular dependency that limits out-of-sample performance.
The Four Feature Categories That Matter
1. Derivatives-Based Features
This is where the most information-dense signals live for crypto. Perpetual futures markets generate continuous data on positioning, leverage, and market sentiment that has no equivalent in traditional equity markets.
Funding rates are the most direct measure of leveraged sentiment. When funding is persistently positive, longs are paying shorts — a signal that the market is over-leveraged to the upside. When it flips negative and stays negative, as it has for 46+ consecutive days on Binance perpetuals as of late April 2026, it indicates sustained short pressure or at minimum a lack of leveraged bullish conviction. For regime classification, the raw funding rate is less useful than its derived features: rolling z-score, sign persistence (number of consecutive negative/positive periods), and the spread between funding on different exchanges.
For a deeper treatment of how funding rate streaks function as regime signals, see Bitcoin's Negative Funding Rate Streak: What It Means for Traders and Bitcoin Funding Rate Signal and Regime Detection.
Open interest normalized by market cap or spot volume gives you a measure of leverage buildup. Absolute OI numbers are hard to compare across time as the market grows, but OI/volume ratios are more stable. Sharp OI increases coinciding with price moves are a classic setup for cascading liquidations — a regime-transition signal worth encoding explicitly. You can read more on constructing this feature in our Bitcoin Open Interest Explained post.
Long/short ratios from top traders (as reported by exchanges like Binance and OKX) are noisier but can add marginal information when combined with other derivatives features. The key is using the change in the ratio rather than the level — regime transitions often show up as sharp reversals in positioning before price confirms.
This entire category falls under what practitioners call derivatives feature engineering — treating the derivatives market as a parallel data source rather than a secondary one.
2. On-Chain Features
On-chain data gives you a window into actual holder behaviour that derivatives can't provide. The most useful features for regime classification tend to be:
- SOPR (Spent Output Profit Ratio): Whether coins being moved are in profit or loss. A sustained SOPR below 1.0 indicates holders are realising losses — historically associated with late-stage bear markets or capitulation events.
- Exchange net flows: Sustained inflows to exchanges suggest selling intent; outflows suggest accumulation. The rate of change in net flows is more informative than the level for classification purposes.
- Realized price vs. market price: When spot price trades below realized price (the average cost basis of all circulating coins), the market is in a regime where most holders are underwater — a meaningful structural distinction.
- Active address momentum: Not the level of active addresses, but whether it's trending up or down relative to its own history. Regime transitions in bull markets are often preceded by address activity diverging from price.
3. Cross-Asset and Macro Features
Crypto doesn't trade in isolation, and regime classification that ignores macro context will miss a class of transitions driven by external factors.
The most practically useful cross-asset bitcoin ml features include:
- BTC/Gold ratio: A measure of risk appetite within the hard-asset space. When this ratio is declining, capital is rotating toward the more conservative store of value — a risk-off signal.
- DXY (US Dollar Index): A stronger dollar has historically correlated with crypto weakness. The direction of change matters more than the level.
- Equity volatility (VIX): Regime transitions in crypto often lag equity volatility spikes by hours to days. A VIX feature with a short lag can be a useful leading indicator for crypto regime shifts.
- Stablecoin dominance: The market cap share of stablecoins relative to total crypto market cap. Rising stablecoin dominance means capital is de-risking within crypto — a bear market or transition signal.
4. Microstructure Features
Market microstructure features capture the quality of price moves — information that aggregate OHLCV data obscures.
- Bid-ask spread dynamics: Spreads widen in uncertain regimes. A feature tracking the rolling average spread relative to its historical baseline can flag regime instability before price moves confirm it.
- Order book depth imbalance: The ratio of bid-side to ask-side depth at various price levels. In accumulation regimes, bid walls tend to be more persistent; in distribution, ask pressure dominates.
- Tick-level volume clustering: Are large trades clustered at specific price levels? Volume profile features derived from tick data can identify value areas that inform mean-reversion vs. breakout regime probabilities.
- Trade size distribution: The kurtosis of trade sizes over a rolling window. Unusual distributions (very large trades or very uniform small trades) can signal algorithmic or institutional activity changes that precede regime transitions.
Feature Construction Principles
Having the right feature categories is necessary but not sufficient. How you construct the features matters as much as what you include.
Stationarity first. Most raw crypto time series are non-stationary. Your classifier needs features that have consistent statistical properties across regimes. Log returns, z-scores with rolling windows, and percentage changes are your standard tools. Be careful with very long rolling windows — they smooth out the signal you're trying to capture.
Multiple time horizons. A funding rate z-score over 7 days captures different information than one over 30 days. Regime classification benefits from feature sets that span multiple time horizons simultaneously. A common approach is to compute the same base feature at 4-hour, daily, and weekly resolutions and include all three.
Interaction features. Some of the most powerful features for regime classification are interactions between categories. Funding rate × open interest change captures the combination of sentiment and leverage buildup. Price return × on-chain net flows captures whether price moves are backed by actual coin movement. These interactions encode domain knowledge that a model can't easily learn from raw features alone.
Avoid look-ahead bias obsessively. This is obvious in principle and routinely violated in practice. Any feature that uses data from time T to predict the regime at time T has look-ahead bias. Rolling statistics must use only data available at the point of prediction. On-chain data has reporting delays that need to be modelled explicitly.
Putting It Together: Feature Sets for Different Classifier Types
The optimal feature set depends on your classifier architecture.
For Hidden Markov Models, you want a small number of highly informative, relatively stationary features. Funding rate z-score, realized volatility, and OI/volume ratio are a reasonable starting triplet. HMMs are sensitive to feature scale and distribution — preprocessing matters more here than with tree-based methods.
For gradient boosted trees (XGBoost, LightGBM), you can afford a larger feature set and the model will handle feature selection implicitly. Include all four categories with multiple time horizons. Feature importance outputs from these models are a useful diagnostic for understanding which signals are actually driving classification.
For neural sequence models (LSTMs, Transformers), the feature engineering burden shifts somewhat toward architecture design, but raw inputs still need to be stationary and normalized. The model can learn temporal interactions, but it can't compensate for fundamentally noisy or non-stationary inputs.
RegimeRisk's classification engine uses a multi-layer approach that combines derivatives signals, on-chain flows, and macro context — essentially operationalizing the feature categories described here into a continuous regime score rather than a discrete label. The goal is to give traders a probabilistic read on regime state, not a binary signal that pretends certainty where none exists.
The Quant Crypto Trading Tools Landscape
For practitioners building their own pipelines, the data infrastructure question is non-trivial. Derivatives data (funding rates, OI, liquidations) is available from exchange APIs and aggregators. On-chain data requires either running your own node or subscribing to providers like Glassnode or Nansen. Cross-asset data is relatively straightforward via standard market data APIs.
The harder problem is building a feature pipeline that handles data quality issues, aligns timestamps across sources, and computes features without look-ahead contamination. Quant crypto trading tools that abstract this infrastructure layer are increasingly available, but the feature engineering logic — what to compute and why — remains a domain knowledge problem that tools can't fully automate.
If you're thinking about how these features map to actual trading strategy adaptation, the Trading Strategy and Market Regime Adaptation Guide covers the downstream application in more detail.
Key Takeaways
Crypto feature engineering for regime classification requires going well beyond price and volume data. The most information-dense signals come from derivatives markets — funding rates, open interest dynamics, and positioning ratios — which give you a real-time read on leverage and sentiment that price alone can't provide. On-chain features add a layer of holder behaviour context, while cross-asset and microstructure features help capture macro-driven transitions and the quality of price moves respectively. The construction principles matter as much as the feature categories: stationarity, multiple time horizons, and interaction features between categories are where much of the classification edge lives. Finally, the choice of classifier architecture should inform how you structure your feature set — a well-engineered small feature set will outperform a poorly constructed large one in almost every case.
Share this post
Track Bitcoin's Current Regime
See whether BTC is in a Bull, Bear, Range or Transition regime right now.
View Live Dashboard →