empyrical-reloaded

The maintained fork of Quantopian's empyrical — risk statistics, no plots.

by Stefan Jansen

Last updated

From
Free
Licence
Apache-2.0
Self-hosted
Yes
Platforms
Library

What it is

empyrical is the statistics layer that Quantopian pulled out of Zipline and pyfolio — plain functions over an array or Series of returns. sharpe_ratio, sortino_ratio, calmar_ratio, omega_ratio, max_drawdown, tail_ratio, value_at_risk, alpha_beta against a benchmark, up and down capture ratios, and a roll_* variant of most of them for windowed calculation. NumPy arrays and pandas Series both work, and the return type follows the input.

Quantopian closed in late 2020 and the package froze with it. This is Stefan Jansen's fork — the same maintainer who keeps Zipline-reloaded, pyfolio-reloaded and alphalens-reloaded alive — under the original Apache-2.0 licence and the original empyrical import path. What the fork has bought is compatibility rather than features: Python 3.10 through 3.13, pandas 2, NumPy 2, wheels on PyPI and conda-forge, and a docs site the original never had.

Pricing

Free, Apache-2.0, nothing to buy. The fork keeps Quantopian's copyright notice in LICENSE.

Data & coverage

Numbers in, numbers out — the library holds no market data and no instrument model. Two optional extras exist for convenience rather than for production: empyrical-reloaded[yfinance] downloads price series from Yahoo Finance, and empyrical-reloaded[datareader] fetches Fama-French risk factors and FRED treasury yields through pandas-datareader. The README warns that pandas-datareader does not work on Python 3.12 or newer, which makes the factor helper unusable on a current interpreter.

Integrations

It is the metrics layer underneath the reloaded Quantopian stack — Zipline-reloaded, pyfolio-reloaded and alphalens-reloaded all depend on it — and it drops into anything that can produce a returns Series.

Limitations

  • Repository activity, checked 19 September 2026. Release 0.5.12 on 1 June 2025, last commit to main on 29 July 2025, one open issue, not archived, maintained by one person. Fifteen months without a release is not dead, but it is not a project absorbing changes either.
  • pip install empyrical still gets Quantopian's 2020 package, sdist only, whose install requirements pull pandas-datareader unconditionally. The obvious install line is the wrong one.
  • No plotting and no reporting of any kind. You get floats and Series.
  • The base install pins peewee<3.17.4 — an ORM, inside a statistics package, capped for build reasons — which can collide with anything else in the environment that wants a newer peewee.
  • PyPI still classifies it Development Status :: 4 - Beta, inherited from the original.

Alternatives

QuantStats for the same family of metrics plus charts and an HTML tearsheet; ffn if your input is a price DataFrame rather than returns and you want a comparable statistics table with portfolio weighting on top.

Specs

Interfaces
Python, Python
Export
None
Asset classes
Stocks, ETF
Markets
Global
Platforms
Library
AI features
None
Pricing verified
Capabilities verified
Coverage verified

Also from Stefan Jansen

Also worth comparing

  • ffnPerformance stats, drawdowns and portfolio weights from a DataFrame of prices.
  • QuantStatsHTML tearsheets and about eighty risk metrics from one pandas series of returns.
  • archGARCH and the rest of the volatility-model family, plus the tests you need around them.
  • pandas-taThe DataFrame indicator library whose repo is gone and whose last release is a year old.
  • PyPortfolioOptPrices in, weights out — efficient frontier, Black-Litterman and HRP.
  • Riskfolio-LibTwenty-six convex risk measures, four objectives, one cvxpy-backed optimiser.

FAQ

Is the original empyrical dead?

In every practical sense, yes. Quantopian's last release was 0.5.5 on 13 October 2020 and the last commit to master landed the next day — a packaging fix adding six to the requirements, which never shipped because the release had already gone out. The repository is not archived and 28 issues are open, but nobody has answered one since 2020.

What do I actually install?

Run pip install empyrical-reloaded, or conda install empyrical-reloaded -c conda-forge. The import path is still empyrical, so existing code needs no edits — and for the same reason you should not install both packages into one environment.

Is empyrical-reloaded itself actively developed?

It is maintenance-only. Release 0.5.12 shipped 1 June 2025 and the last commit to main was 29 July 2025, a README typo fix; the last substantive change was NumPy 2.0 compatibility in September 2024. One issue is open and the repository is not archived. Treat it as a library that is kept installable rather than one that is growing.

How is this different from QuantStats?

empyrical returns numbers and nothing else — no plots, no report, no tearsheet. QuantStats wraps a similar set of statistics in charts and an HTML tearsheet, and carries yfinance as a hard dependency to do it. If you are computing metrics inside your own pipeline, the smaller dependency is this one.