Class MonteCarloTradeShuffle
What reshuffling holds fixed and what it breaks: it preserves the
MULTISET of trade outcomes (win rate, average win/loss, profit factor
are invariant) and destroys their ORDER — so it isolates
"path/sequencing risk" from "edge". Its blind spot, stated plainly:
it assumes trades are exchangeable, so it UNDERSTATES risk for a
strategy whose losses cluster (serial correlation, regime dependence)
— a martingale that wins small and loses catastrophically looks
tamer reshuffled than it is. For serially-correlated PATHS use
BlockBootstrap on the return series; this class is the
per-trade complement, and the two disagreeing is itself the signal
that your trades are not independent.
Drawdown is computed on the cumulative P&L path (additive, so no
starting-capital assumption); the percentiles come from
MathUtils.percentile. Deterministic given the seed. Research
lane.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription
-
Method Details
-
analyze
- Parameters:
trades- the strategy's completed trades, ≥ 2; @param shuffles ≥ 100
-