empyrical-reloaded
empyrical computes performance and risk statistics commonly used in quantitative finance
What it is and what it does
Empyrical-reloaded is a quantitative finance metrics library that calculates standard performance and risk statistics from return data. It accepts numpy arrays or pandas Series and computes metrics ranging from simple statistics (max drawdown, volatility) to advanced measures (alpha, beta, Value at Risk, Sharpe and Sortino ratios). The library also supports rolling-window calculations to track metrics over time, and includes utility functions to fetch historical price data from Yahoo Finance or Fama-French risk factors.
The package is designed for portfolio analysis, backtesting workflows, and financial research. Its main dependencies are numpy, pandas, scipy, and bottleneck, making it lightweight for a quantitative finance tool. It runs on Python 3.10–3.13 and is permissively licensed under Apache 2.0, so it can be used in commercial and proprietary projects. The aging maintenance status (last release 439 days ago) means new features are unlikely, but the codebase is stable and the repository remains active.
Use it for:
- Calculate max drawdown and other risk metrics from a backtest return stream to evaluate strategy performance.
- Compute alpha and beta against a benchmark to measure active management skill and systematic risk exposure.
- Generate rolling Sharpe or Sortino ratios to track risk-adjusted returns over time windows.
- Fetch historical S&P 500 or other asset returns from Yahoo Finance for comparative analysis.
- Access Fama-French risk factors for multi-factor performance attribution studies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Computes financial return and risk metrics—including drawdown, alpha/beta, Value at Risk, Sharpe and Sortino ratios—from return arrays or pandas Series, with support for rolling window calculations and optional data fetching from Yahoo Finance or Fama-French sources.
Yes, if you need standard quantitative finance metrics and accept aging maintenance. The library is stable, dependency-light, and permissively licensed. Install it for portfolio analysis, backtesting, or academic finance work. Avoid it if you require active development, cutting-edge risk models, or real-time data integration beyond Yahoo Finance.
Install
empyrical-reloaded on PyPI
pip
pip install empyrical-reloadeduv
uv add empyrical-reloadedpoetry
poetry add empyrical-reloadedInstalling empyrical-reloaded
Before you install
Low friction: pure Python wheel with five standard dependencies (numpy, pandas, bottleneck, scipy, peewee). Maintenance status is aging—last release 439 days ago—but the repository is active (last commit 2025-12-12) with no archived status, so core functionality remains available.
License in practice
Apache 2.0 permissive license allows commercial and derivative use with attribution and license propagation requirements. No restrictions on bundling or modification for your own use.
Quickstart
pip install empyrical-reloaded
import numpy as np
from empyrical import max_drawdown, alpha_beta
returns = np.array([.01, .02, .03, -.4, -.06, -.02])
benchmark_returns = np.array([.02, .02, .03, -.35, -.05, -.01])
max_drawdown(returns)
alpha, beta = alpha_beta(returns, benchmark_returns)
Requires Python 3.9+; numpy>=2.0 requires pandas>=2.2.2. Optional dependencies (yfinance, pandas-datareader) have their own constraints—pandas-datareader is not compatible with Python>=3.12.
Verify before relying
- Whether peewee is actually used at runtime or is a build/test-only dependency
- Performance characteristics when processing large return series or many rolling windows
- Accuracy validation against other financial metrics libraries for edge cases
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — numpy, pandas, bottleneck, scipy, peewee |
| Maintenance | aging — 439 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 161,706/month — #10,624 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: empyrical_reloaded-0.5.12-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
quantstatsQuantStats computes portfolio performance…
permissive · top 15,000 on PyPI
riskfolio-libRiskfolio-Lib builds optimized investment…
permissive · top 15,000 on PyPI
backtestingBacktesting.py lets you define and test trading…
agpl · top 15,000 on PyPI
yfinanceFetches financial and market data from Yahoo…
permissive · top 1,000 on PyPI
yahooqueryRetrieves financial data from Yahoo Finance…
permissive · top 15,000 on PyPI
skfolioskfolio is a Python library for portfolio…
permissive · top 15,000 on PyPI
gs-quantGS Quant is a Python toolkit for quantitative…
permissive · top 15,000 on PyPI
ft-pandas-taProvides 130+ technical analysis indicators and…
permissive · top 15,000 on PyPI
pyportfoliooptPyPortfolioOpt implements portfolio…
permissive · top 15,000 on PyPI
pandas-taProvides over 150 technical analysis indicators…
unclear · top 5,000 on PyPI