EDM-CSDI for Financial Time Series (MSc Thesis)
Conditional diffusion models for generating S&P 500 returns and reproducing their statistical properties.
›Contents
Overview
Financial returns are difficult to model because they are not normally distributed: extreme movements occur more frequently than Gaussian models predict, volatility changes over time, and negative returns are often followed by increased market uncertainty.
This thesis investigates whether diffusion models can learn these properties directly from historical financial data.
I developed EDM-CSDI, a conditional diffusion model that generates daily Close log-returns from same-day Open, High, and Low market information. The model combines the temporal architecture of Conditional Score-based Diffusion Models with the training and sampling framework of Elucidated Diffusion Models.
The experiments use more than 40 years of daily observations from 210 long-running S&P 500 constituents. The generated returns are evaluated against the empirical data and classical GARCH-X and Merton-X models.
The main result is that conditioning provides the volatility-regime information missing from unconditional generation. Compared with unconditional EDM-CSDI, the conditional model:
- reduced the excess-kurtosis deficit from approximately 49% to 1%;
- improved the Wasserstein-1 distance by almost five times;
- achieved a CRPS skill score of 40.44% over an OLS baseline;
- reproduced heavy tails, volatility clustering, and the leverage effect more faithfully.

Forward diffusion progressively transforms financial returns into noise.

The learned reverse process reconstructs financial return sequences.
The problem
Financial returns exhibit several well-established stylized facts:
- Heavy tails: extreme movements occur more frequently than under a Gaussian distribution.
- Volatility clustering: periods of high and low volatility tend to persist.
- Leverage effect: negative returns are often associated with higher future volatility.
- Asymmetry: large downward and upward movements do not occur with the same frequency or magnitude.
Classical parametric models encode some of these properties explicitly, but their assumptions restrict the distributions they can represent.
Diffusion models offer a different approach: instead of specifying a fixed return distribution, they learn to generate it through a gradual denoising process.
The central research question was therefore:
Can diffusion models reproduce the distribution and stylized facts of financial returns, and does conditioning on Open, High, and Low prices improve their ability to represent different market regimes?
Data
The experiments use daily adjusted OHLC observations from 210 long-running S&P 500 constituents, each with at least 40 years of historical data.
Open, High, Low, and Close prices are transformed into log-returns relative to the previous Close:
The historical sequences are divided into sliding windows, with a strictly held-out set used to evaluate conditional generation.
Research design
The research was conducted in two phases.
Phase 1 — Replication
The first phase implemented and evaluated several score-based diffusion processes:
- Variance Exploding SDE;
- Variance Preserving SDE;
- GBM-inspired diffusion;
- linear, cosine, and exponential noise schedules.
These experiments established a baseline and tested whether a CSDI-derived Transformer could learn univariate Close-return distributions.
The strongest configurations learned the centre of the return distribution and reproduced the principal stylized facts at a reduced scale. However, they consistently underestimated higher-order moments and extreme events.
The GBM-inspired configurations failed to reproduce the empirical tails and generated approximately Gaussian samples.
Phase 2 — EDM-CSDI
The second phase integrated the CSDI architecture into the EDM framework.
The resulting model receives:
- clean Open, High, and Low returns;
- a noised Close return;
- a conditioning mask;
- temporal and feature embeddings;
- the current diffusion noise level.
During generation, Open, High, and Low remain observed while the model reconstructs the corresponding Close-return distribution:
This makes it possible to compare unconditional generation with generation informed by the market conditions observed during the same trading day.

High-level overview of the CSDI denoising network used within the EDM framework.
Distributional results
The decisive improvement came from conditioning the model on Open, High, and Low returns.
| Model | Standard deviation | Skewness | Excess kurtosis | W₁ ↓ | Tail exponent |
|---|---|---|---|---|---|
| Reference data | 1.0000 | -0.5864 | 39.5 | — | 4.418 |
| Phase 1 VE + Exponential | 0.9520 | -0.2382 | 14.3 | 0.0019 | 4.634 |
| EDM-CSDI, unconditional | 0.7523 | -0.2292 | 20.0 | 0.0029 | 4.640 |
| EDM-CSDI, conditional | 0.9487 | -0.5390 | 39.0 | 0.0006 | 4.572 |
The unconditional model tended to revert toward an average volatility regime. Consequently, it generated insufficient variance, skewness, and excess kurtosis.
OHL conditioning supplied information about the current market regime, allowing the conditional model to reproduce both ordinary observations and extreme movements more accurately.

Distribution of returns generated by conditional EDM-CSDI compared with the empirical reference. The model closely reconstructs both the central distribution and its tails.
Stylized facts
The conditional model produced the closest overall representation of the three stylized facts examined in the thesis.
Heavy tails
The empirical power-law tail exponent was approximately 4.42, compared with 4.57 for conditional EDM-CSDI. The model also reproduced the observed excess kurtosis almost exactly: 39.0, compared with 39.5 in the reference data.
Volatility clustering
Conditional EDM-CSDI reproduced the slowly decaying autocorrelation of absolute returns more accurately than the unconditional models.
The improvement was concentrated in high-volatility windows, supporting the interpretation that Open, High, and Low provide an informative volatility-regime signal.
Leverage effect
The model captured the negative relationship between past returns and future volatility more clearly than the classical baselines and unconditional diffusion models.

Reference and generated heavy tails, volatility clustering, and leverage effects for conditional EDM-CSDI.
Probabilistic results
The conditional model was also evaluated as a probabilistic predictor by generating 50 possible Close-return sequences for each conditioning window.
| Model | MAE ↓ | CRPS ↓ |
|---|---|---|
| Climatology | 0.65065 | 0.48235 |
| OLS with OHL predictors | 0.28520 | 0.21255 |
| EDM-CSDI, conditional | 0.19379 | 0.12659 |
This corresponds to a CRPS skill score of:
- 73.76% over climatology;
- 40.44% over the OLS baseline.
Prediction intervals were well calibrated at moderate confidence levels:
| Nominal interval | Empirical coverage |
|---|---|
| 50% | 53.05% |
| 80% | 82.52% |
| 90% | 90.50% |
| 95% | 94.02% |
| 99% | 96.84% |
The lower-than-expected coverage of the 99% interval indicates that the model remains overconfident for the most extreme observations—an important limitation for risk-sensitive applications.
Volatility regimes
The conditional model distinguished between low- and high-volatility windows more effectively than its unconditional counterpart.
This result helps explain the broader performance improvement: Open, High, and Low movements communicate whether the market is experiencing an ordinary or unusually volatile trading period.

Reference volatility compared with the volatility generated by conditional and unconditional EDM-CSDI. The conditional model responds more accurately to changing market regimes.
Limitations
The results are promising, but they do not imply that the model is ready for direct financial deployment.
The main limitations are:
- the experiments cover only long-running S&P 500 constituents;
- extreme prediction intervals remain overconfident;
- the central zero-return spike is not reconstructed perfectly;
- valid OHLC relationships such as are not explicitly enforced;
- evaluation focuses on statistical fidelity rather than trading or risk-management performance;
- rare events remain difficult to learn from historically imbalanced data.
Future extensions could evaluate the model across other asset classes and market regimes, enforce valid OHLC constraints, improve tail calibration, and assess its usefulness for Value at Risk, Expected Shortfall, option pricing, and stress testing.
Conclusion
Diffusion models can learn meaningful features of financial return distributions, but architecture and preconditioning alone are insufficient.
The critical improvement came from supplying the model with information about the current market environment. By conditioning Close-return generation on Open, High, and Low movements, EDM-CSDI moved beyond an average volatility representation and reproduced heavy tails, asymmetry, volatility clustering, and the leverage effect substantially more accurately.
More broadly, the project shows that conditioning is not merely an architectural addition: it provides the regime information necessary for generative models to represent the changing statistical behaviour of financial markets.