Skip to content

Update quantstats requirement from >=0.0.64,<0.0.82 to >=0.0.64,<0.0.87 - #43

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/quantstats-gte-0.0.64-and-lt-0.0.87
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/quantstats-gte-0.0.64-and-lt-0.0.87

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 17, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on quantstats to permit the latest version.

Release notes

Sourced from quantstats's releases.

v0.0.86

Statistical corrections — these change reported numbers

  • Trade statistics on a DataFrame depended on the other columns in the frame (#556).

    avg_return(), avg_win() and avg_loss() masked the unselected cells to NaN and then called .dropna(), which drops whole rows on a DataFrame. Each column's average was therefore computed only over rows where every other column also qualified — so a strategy's average win was measured only on the days the benchmark also rose.

    Anyone calling reports.metrics() with a benchmark on DataFrame input got affected figures for Average Win/Loss, Payoff Ratio, Win/Loss Ratio, CPC Index and Kelly Criterion. .mean() already skips NaN column-wise, so the .dropna() is gone. On the reporter's data the Strategy Kelly moves from 0.21 to 0.25, matching the standalone call.

    Found from the data @​none2003 attached to #556.

  • rolling_greeks() computed alpha from full-sample means instead of each window's own (#554). Every window shared one baseline, so rolling alpha only moved when rolling beta did. On a strategy that starts earning an extra 10bp a day halfway through, alpha read 0.00057 before and 0.00056 after, where a regression on those windows gives 0.00035 and 0.00198. Rolling beta, and the beta-only rolling plots, are unchanged.

    Reported, diagnosed and fixed by @​WatchTree-19.

  • A time-varying rf Series collided in the _prepare_returns() cache (#555). The key formatted rf with its repr, which pandas truncates to the first and last few rows, so two rate series of the same length differing only in between shared an entry and the second caller was handed the first one's excess returns. The result depended on call order: sharpe(rf=B) returned −0.4388 on a fresh cache and −0.1952 if sharpe(rf=A) ran first. A Series rf is now hashed like the data.

    Reported, diagnosed and fixed by @​WatchTree-19.

If you use reports.metrics() with a benchmark on a DataFrame, or a time-varying risk-free rate, upgrading is recommended.

Changelog

Sourced from quantstats's changelog.

0.0.86

Statistical corrections - these change reported numbers.

  • Fixed trade statistics on a DataFrame depending on the other columns in the frame (#556). avg_return(), avg_win() and avg_loss() masked the unselected cells to NaN and then called .dropna(), which drops whole rows on a DataFrame. Each column's average was therefore computed only over rows where every other column also qualified, so a strategy's average win was measured only on days the benchmark also rose. Anyone calling reports.metrics() with a benchmark on a DataFrame got affected figures for Average Win/Loss, Payoff Ratio, Win/Loss Ratio, CPC Index and Kelly Criterion. .mean() already skips NaN column-wise, so the .dropna() is gone.
  • Fixed rolling_greeks() computing alpha from the full-sample means rather than each window's own means (#554, reported with a fix by @​WatchTree-19). Every window shared one baseline, so rolling alpha only moved when rolling beta did: on a strategy that starts earning an extra 10bp a day halfway through, alpha read 0.00057 before and 0.00056 after, where a regression on those windows gives 0.00035 and 0.00198. Rolling beta, and the beta-only rolling plots, are unchanged.
  • Fixed a time-varying rf Series colliding in the _prepare_returns() cache (#555, reported with a fix by @​WatchTree-19). The key formatted rf with its repr, which pandas truncates to the first and last few rows, so two rate series of the same length differing only in between shared an entry and the second caller was handed the first one's excess returns. The result depended on call order. A Series rf is now hashed like the data.

0.0.85

  • Fixed rar() charging the annual risk-free rate once per period (#552). It passed rf to _prepare_returns() without periods, so at a daily frequency a 5% rate was subtracted from every single day: the series was wiped out and the Risk-Adjusted Return pinned to -100% for any non-zero rf. rar() now takes a periods argument (default 252) and de-annualizes the rate, and reports.metrics() passes the report's own periods_per_year through.

    This was the second half of #552, which 0.0.84 did not address. 0.0.81 reported a plausible number here only because metrics() never passed rf into rar() at all; the standalone stats.rar(returns, rf=0.05) call has been wrong in every release that had it. On a sample series the row now reads 0.37 against 0.44 gross, where 0.0.82-0.0.84 read -1.00.

0.0.84

... (truncated)

Commits
  • 9ef4c6d fix: cross-column contamination, rolling alpha, rf cache key (#554, #555, #556)
  • a2448a2 fix: de-annualize the risk-free rate in rar() (#552)
  • 01323c1 fix: benchmark stats on gapped series, revert Kelly to fixed-odds (#552, #553)
  • 5a751dd fix: statistical corrections for 0.0.83 (#549, #546, #547, #493)
  • fec6f82 test: use the translated frequency alias in the 10Y window test
  • c564552 fix: support pandas 2.0 and 2.1 frequency aliases
  • ac9fcd3 ci: allow the test workflow to be triggered manually
  • ab275c6 style: apply ruff autofixes and formatting
  • 11b1542 fix: correctness and statistical fixes for 0.0.82 release
  • fbd10da fix: misc bugfixes for 0.0.78 release (#499, #501, #502)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [quantstats](https://github.com/ranaroussi/quantstats) to permit the latest version.
- [Release notes](https://github.com/ranaroussi/quantstats/releases)
- [Changelog](https://github.com/ranaroussi/quantstats/blob/main/CHANGELOG.md)
- [Commits](ranaroussi/quantstats@0.0.64...v0.0.86)

---
updated-dependencies:
- dependency-name: quantstats
  dependency-version: 0.0.86
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies, python. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants