wincurse
Selection-corrected Sharpe ratios for the winning backtest.
Abstract
Gives median-unbiased Sharpe ratio estimates and confidence intervals with valid coverage for the best of many backtested strategy variants. For quantitative researchers, portfolio managers and allocators who are shown the best variant of a parameter sweep.

1Motivation
Researchers try many correlated variants and report the best one, so its backtest Sharpe ratio is biased upward and its usual confidence interval is too narrow. Existing tools test whether the winner beats zero; wincurse estimates what to expect from it, using the 2024 “Inference on Winners” method (Andrews, Kitagawa and McCloskey).
2Method
- Estimate every variant's Sharpe ratio and their joint covariance (delta method with HAC or bootstrap).
- Identify the winner and the truncation region implied by having selected it.
- Invert the truncated-normal distribution for a median-unbiased estimate and conditional intervals.
- Build hybrid intervals bounded by a simultaneous projection set.
- Report naive, Deflated Sharpe Ratio and other comparators side by side.
3Results





4Usage
4.1 Analyze a parameter sweep
Reads a returns matrix of all variants, reports naive versus corrected estimates and intervals, comparators and diagnostics, and writes an HTML tear sheet.
wincurse analyze returns.csv --alpha 0.05 --method hybrid --report tearsheet.html
5Installation
pip install git+https://github.com/Thesimpleex/wincursePython 3.11 or later. Not on PyPI; installs from GitHub.
6Specification
- Runs
- Python 3.11+, CLI
- Built with
- Python, NumPy, SciPy, pandas, rich
- License
- MIT
- Version
- 0.1.0
Source code, issues and releases: github.com/Thesimpleex/wincurse. License: MIT.