Stress test
The Monte Carlo in the Stresstest tab, its settings, VaR and CVaR per horizon, recovery and the distribution of losses.
A backtest shows a single path. The stress test shows how widely the paths that can arise from the same history spread.
How it is calculated
QuantDesk runs a block bootstrap of the daily results. Blocks of consecutive days are recombined so that good and bad phases stay together. Drawing days one by one breaks up exactly the losing streaks that blow up an account, and produces a picture that is too friendly. The tails of the daily results are trimmed (winsorize).
Settings
| Setting | Range | Meaning |
|---|---|---|
| Läufe (runs) | 100 to 10,000 | How many paths are drawn |
| Blocklänge (block length) | 1 to 60 days | How many consecutive days stay together |
| Winsorize | 0 to 5 % | How much is trimmed at the tails |
| Miss Rate | 0 to 100 % | Share of trades removed at random before drawing, as if they had been missed |
| Forced Loss je N Trades | 0 to 10,000 | Every Nth trade is replaced by the average loss; 0 switches this off |
| Ruin ab Verlust (ruin from loss) | 1 to 99 % | From which loss a path counts as ruin |
Seed and path length in years are fixed alongside. Rechnen (calculate) sends changed values to the server. Miss rate and forced loss deliberately make the history worse: they show how much room is left when trading does not run as smoothly as in the export.
What the tab shows
Paths
The paths as a fan, either for the drawdown or the run-up. Alongside: the largest decline per run, how long phases below the previous peak last, and the largest run-up per run.
Decline and recovery
On the left you set a current depth with a slider and see how long it takes across all runs to get from there to a new high. On the right you see how long recovery takes after a run has breached a VaR or CVaR threshold.
VaR and CVaR
The table shows the loss per period that the runs do not exceed at the stated confidence, for the horizons day, week, month and year. CVaR (expected shortfall) is the average of the cases beyond that. All values are a percentage of the account. Cornish-Fisher adjusts the VaR for skew and kurtosis of the returns.
Loss risk
The bad cases appear as steps, split by month and year. Everything is counted as "N out of 1,000", such as how many months and years within the runs closed negative. The ruin threshold has its own marker below, with its frequency.
Limits
The stress test draws from the strategy's own history. Anything that never happened there, such as a market in a completely different state, does not happen in the paths either. The distribution describes the spread of this history and is not a forecast.