What is this? Monte Carlo simulation assumes you know the data-generating distribution. Bootstrap methods don’t - they resample your actual data to estimate confidence intervals, standard errors, and p-values. Use bootstrap when you want to know if your edge is statistically real without making distributional assumptions.
Horizon provides 11 bootstrap variants and jackknife bias estimation, all implemented in Rust for performance. These are non-parametric alternatives to Monte Carlo that work directly from observed data. The bootstrap is especially valuable in prediction markets where returns are non-normal and sample sizes are small.
IID Bootstrap
bootstrap_mean(), bootstrap_sharpe(), bootstrap_var(), bootstrap_edge() - classic resampling with replacement.
Confidence interval for the Sharpe ratio. Particularly useful because the Sharpe ratio’s sampling distribution is highly non-normal for small samples.
r = hz.bootstrap_sharpe(returns, n_resamples=10000, confidence=0.95, seed=42)print(f"Sharpe: {r.point_estimate:.4f}")print(f"95% CI: [{r.ci_lower:.4f}, {r.ci_upper:.4f}]")# If CI includes zero, your Sharpe isn't significantly different from zero