Simulation
Quant Finance Lab
Build a synthetic market from a handful of parameters, run a simple trend-following rule against it and compare the result with buying and holding. Every number on this page is generated in your browser from the inputs you set.
Synthetic dataDataset: synthetic daily index, 504 trading days, base 100. Daily log-returns drawn from a seeded normal distribution. Units: index points; returns in percent.
Results
| Results | Trend rule | Buy and hold |
|---|---|---|
| Total return | – | – |
| Annualized volatility | – | – |
| Maximum drawdown | – | – |
| Sharpe ratio (risk-free rate 0%) | – | – |
| Longest time below a previous peak | – | – |
| Position changes | – | – |
Synthetic data
| Trading day | Trend rule | Buy and hold | Drawdown (Trend rule) | Invested |
|---|
Assumptions · Limitations
Assumptions
- Daily returns are independent draws from a normal distribution: no fat tails, volatility clustering or autocorrelation unless you add the shock.
- The trend rule is fully invested when the index closes above its moving average and holds cash (earning 0%) otherwise. Signals use yesterday’s close, so there is no look-ahead.
- Trading cost is charged in basis points each time the rule switches between invested and cash. Taxes, spreads and slippage are ignored.
- Annualization uses 252 trading days.
Limitations
- Synthetic data cannot tell you how a rule would have behaved in real markets.
- A single seed is one possible path. Change the seed to see how much results vary by luck alone.
- Trying many settings and keeping the best one is overfitting. The Research section explains why.