Sharing something I built that might be useful to people here — AnchorTest, MIT licensed, just numpy and pandas.
The core idea: instead of running your backtest once from a fixed start date, run it across every phase of your own rebalance cycle and look at the mean, median, min, and stdev of Sharpe instead of trusting one number. I did this on options-strategy-research (my own backtest project) and got Sharpe ranging from 0.35 to 1.46 across 30 phases of a 30-day cycle — a much wider spread than I expected the first time I ran it.
There's also a comparison function with the drawdown sign convention fixed (easy trap: drawdown's stored negative, so the “obvious” ≤ comparison quietly prefers a worse drawdown), and a check for a specific blending artifact where averaging phase-shifted backtest runs can inflate Sharpe with zero real skill behind it — validated against a synthetic control before you trust anything it tells you.
It's engine-agnostic, so it works fine against a QC backtest's equity curve or anything else that spits out a pandas Series. Not trying to replace anything QC does, just sits on top as a sanity check.
https://github.com/grant02339-ship-it/anchortest
Would genuinely like to know if anyone here has hit the single-anchor problem on a real QC strategy — feels like something this community in particular would run into a lot. Also doing free audits for the first 10 people who want their own backtest run through this, details in the repo.
Grant
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!