Machine learning · Advanced · Weekly
RL Trading Agent
How it works, and when it doesn't.
Monte Carlo-based position sizing reduces maximum drawdown by ~25% versus fixed sizing while sacrificing only ~8% of expected return — a highly favorable risk/return trade-off.
Holding SPY
Q-table state 11: trend=bear (SMA20=760.2 vs SMA50=764.5), vol=high (RV=22.1%), momentum=neg (21d=-2.3%). Q-values: Cash=0.0051, Long=0.0072, Short=0.0050. Best action: Long.
Why it works
Monte Carlo simulation models the distribution of possible portfolio outcomes by running 10,000 scenarios from the historical return distribution. This provides probabilistic risk estimates — when tail risk is elevated (high downside probability), position sizes are automatically reduced.
The signal logic
- Run 10,000 Monte Carlo simulations of 20-day forward returns
- Fit GEV distribution to tail outcomes
- Long when 95th percentile downside < 5% (manageable tail risk)
- Watch when 95th percentile downside 5-10%
- Cash when 95th percentile downside > 10% (elevated tail risk)
When it fails
Historical simulation assumes future returns match historical distribution. Fat-tailed events not in historical data cannot be properly modeled.
- Best market
- Stable regimes where historical volatility fairly represents future risk
- Worst market
- Unprecedented events with no historical analog (COVID March 2020)
Backtest
| Sharpe ratio | -0.75 |
| Annual return | -9.1% |
| Worst drawdown | -14.0% |
| Trades in the backtest | 69 |
Backtest on daily bars, positions taken the bar after the signal (no look-ahead).
RL Trading Agent, live.
Re-scored after every close.
The platform runs this and 32 other strategies against the live tape each day — with the evidence behind every number.