Synthetic Market Paths From GANs and VAEs
Generating artificial price paths that preserve the statistical fingerprints of real markets — fat tails, volatility clustering, correlation structure — using generative adversarial networks and variational autoencoders, for stress testing and data augmentation.
Prerequisites: Generative Adversarial Networks, Variational Autoencoders
Real market history gives you exactly one path — the one that actually happened. A backtest or stress test that only ever sees that single realized history can't tell you how a strategy would have fared through a crash that didn't happen, or through a milder version of one that did. Synthetic market paths address this by generating new, artificial price paths that never occurred but share the same statistical character as real markets — the same fat tails, the same tendency for volatility to cluster, the same cross-asset correlation structure — giving you effectively infinite variations to stress a strategy against.
An analogy: a flight simulator
A pilot doesn't train exclusively on the handful of real emergencies they've personally lived through — a flight simulator generates realistic-but-synthetic scenarios (an engine failure at a particular altitude, a wind shear on approach) that share the physics of real flight without needing to have actually happened. Synthetic market paths serve the same purpose for a trading strategy: generate scenarios that respect the same "physics" — the statistical properties real markets exhibit — without being limited to only the handful of crises history happened to produce.
Two different ways to generate a path
A variational autoencoder (VAE) learns a compressed, structured representation of real price paths (an encoder-decoder pair, like an ordinary autoencoder, but with the bottleneck constrained to follow a smooth probability distribution) and then generates new paths by sampling from that learned distribution and decoding. A generative adversarial network (GAN) instead trains two networks against each other: a generator that tries to produce realistic-looking paths, and a discriminator that tries to tell generated paths apart from real ones — the generator improves by learning to fool an increasingly sharp discriminator, and training stops when the discriminator can no longer tell the difference reliably. Both approaches ultimately produce the same kind of output — new, synthetic time series — via different training mechanics: VAEs optimise a reconstruction-plus-regularity objective directly, while GANs optimise an adversarial game with no explicit likelihood at all.
Worked example: stress-testing with generated paths
A GAN is trained on ten years of daily returns for a diversified equity portfolio, learning to generate synthetic daily-return paths of the same length. Once trained, it's used to generate 5,000 synthetic one-year paths. A trading strategy backtested only on the single real historical path shows a maximum drawdown of 12%. Run against the 5,000 synthetic paths instead, the same strategy shows a distribution of maximum drawdowns: a median around 13% (consistent with the one real path), but a 95th percentile of 24% and a worst case of 38% — synthetic paths that plausibly resemble real market behavior but happen to string together a worse sequence of shocks than history actually delivered. That distribution, unavailable from the single real path alone, is exactly the kind of tail-risk picture a stress test needs.
What this means in practice
Synthetic paths are used for stress testing beyond the specific crises history happened to contain, for data augmentation when training other ML models on a limited real-history sample, and for privacy-preserving research where sharing real position or return data isn't possible. Their entire value depends on the generator actually capturing the real statistical properties that matter — fat tails, volatility clustering, realistic correlations — rather than just producing smooth, statistically bland noise that looks like a price path but doesn't behave like one.
Synthetic market paths, generated by a trained GAN or VAE, provide many plausible alternative histories that share real markets' statistical fingerprints, letting a strategy be stress-tested against far more scenarios than the single historical path that actually occurred allows.
A generative model is only as good as its realism checks — an untested GAN or VAE can produce paths that look plausible to the eye but are missing fat tails, volatility clustering, or realistic correlation structure, giving a false sense of thorough stress testing. Always validate generated paths against known statistical properties of real markets before trusting results built on them.
Related concepts
Practice in interviews
Further reading
- Wiese et al., 'Quant GANs: Deep Generation of Financial Time Series'
- Goodfellow et al., 'Generative Adversarial Networks', NeurIPS (2014)