Inside BitBank · Engineering an Autonomous AI Research Lab · 5 of 10
Feature Discovery, Representation Learning, and Synthetic Markets
2026-07-24 · 12 min read
The strongest signal may not be a hand-written indicator. It may be a reusable representation learned from market structure before any trading label is introduced.
Listen to chapter 5
Narrated with BitBank's OmniServe text-to-speech pipeline. Opus · MP3 fallback
Traditional quantitative research begins with indicators: moving averages, oscillators, ranges, volume ratios, and handcrafted interactions. These are useful because they express hypotheses in a form we can inspect. They are also a narrow vocabulary for a market whose structure changes across assets, venues, and regimes.
Features Are Compressed Hypotheses
A feature transforms raw history into a statement. A moving-average distance says recent price relative to a slower reference may matter. Realized volatility says the path of returns contains risk information. Order-book imbalance says available liquidity on each side may shape the next move.
Good feature engineering makes the hypothesis, units, lookback, and availability time explicit. The danger is search: with enough windows and nonlinear combinations, a feature library can become a machine for manufacturing accidental correlation.
Automatic Discovery
Automatic feature discovery searches transformations rather than writing each by hand. Genetic programming, symbolic regression, differentiable feature layers, and agent-generated code can propose candidates. The most valuable systems do more than maximize training score. They penalize redundancy, fragility, complexity, turnover, and dependence on one time period.
Every discovered feature still needs a causal type. Does it use only closed candles? Does it require a cross-sectional universe? Can it be updated incrementally? Does production have the same source and history? Automation should generate those questions with the expression.
Learning Without a Trading Label
Profitable-trade labels are sparse, noisy, and highly sensitive to fees and horizons. Self-supervised learning uses abundant unlabeled sequences instead. A model might reconstruct masked intervals, predict the next latent segment, distinguish aligned from corrupted windows, or learn which views came from the same market state.
The result is an encoder: a function that maps a long, messy history into a compact representation. Downstream tasks can use that representation for return forecasting, volatility, anomaly detection, clustering, or regime recognition.
What Should a Market Embedding Preserve?
A useful embedding should preserve information relevant across tasks while discarding nuisance variation. Two windows may be similar even if one asset trades at 100 dollars and another at 10,000. Scale normalization can expose shared dynamics. But normalizing too aggressively may remove liquidity or volatility differences that genuinely matter.
This is why representation quality needs probes. Can a small model recover volatility, trend, drawdown state, liquidity, or venue identity from the embedding? Does nearest-neighbour retrieval find intuitively related regimes? Does the representation remain stable under harmless perturbations and change under meaningful ones?
Regimes Without Rigid Labels
Markets are often described with fixed regimes such as bull, bear, calm, and crisis. Real states overlap and evolve. A learned continuous representation can express degrees of trend, stress, correlation, and liquidity without forcing every hour into one box.
Clustering the embedding may still reveal useful groups, but the clusters are research tools, not natural laws. Their boundaries and economic interpretation must be tested out of sample.
Cross-Asset Transfer
Pretraining across many assets exposes a model to more patterns than one pair can provide. It can learn general structures—volatility bursts, momentum decay, liquidity shocks—then adapt to a smaller market. Pair identity, venue, and asset metadata help the model distinguish what should and should not transfer.
Negative transfer is real. A representation dominated by the most liquid assets may erase behaviour in thin markets. Evaluation should report results by pair and regime, not only one global average.
Synthetic Data as a Stress Instrument
Synthetic markets are valuable when used to ask controlled questions. We can create paths with jumps, volatility clusters, spread widening, missing data, delayed feeds, correlation breaks, or liquidation cascades. A strategy that fails under these known mechanisms reveals something even if the simulation is not a perfect model of reality.
Generative models can create more realistic sequences, but visual plausibility is not sufficient. If a generator memorizes history or omits rare tails, it can make a fragile model look safe. Synthetic data should supplement real holdouts, never replace them.
Counterfactual Data
One promising use is counterfactual testing: keep most of a historical episode fixed while changing one element. What if fees doubled? What if fills were delayed? What if the strongest correlated asset was unavailable? What if the same price path arrived with thinner volume?
These tests separate a model's intended mechanism from incidental context. They are particularly useful for agents, which can generate and run a library of adversarial scenarios automatically.
A Feature Store Must Also Be an Evidence Store
Production feature stores emphasize retrieval. Research needs more: definitions, lineage, ownership, availability, validation results, known leakage risks, compatible frequencies, and experiments in which a feature helped or failed. That evidence prevents a popular feature from spreading without its assumptions.
Representation learning expands what the system can perceive. It does not solve the decision problem. Chapter six covers the proving ground: backtests, chronological validation, execution simulation, statistical comparison, and the many ways a convincing result can still be wrong.
The complete series
- Building an Autonomous AI Research Loop
- Market Data as Research Infrastructure
- Forecasting Models: From Baselines to Transformers
- Scaling AI Systems: GPUs, CUDA, Distributed Training, and Autonomous Research
- Feature Discovery, Representation Learning, and Synthetic Markets
- Honest Backtesting: The Discipline of Trying to Be Wrong
- Risk, Uncertainty, and the Power to Abstain
- Production ML: Serving, Monitoring, Drift, and Rollback
- Coding Agents as Research Collaborators
- Toward a Self-Improving Market Research Lab