Registry / data / empyrical-reloaded

empyrical-reloaded

JSON →
library0.5.12pypypiunverified

empyrical-reloaded is a fork of the original empyrical library that computes performance and risk statistics commonly used in quantitative finance, such as Sharpe ratio, Sortino ratio, max drawdown, and others. Current version 0.5.12 targets Python >=3.9 and is under active maintenance with occasional releases.

pip install empyrical-reloaded
INSTALL
IMPORT
SIG · EMPYRICAL-RELOADED
E
empyrical-reloaded
datapythonv0.5.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

empyrical
import empyrical
import empyrical

Computes common risk/performance metrics from a returns series.

import pandas as pd import empyrical # Example returns series returns = pd.Series([0.01, -0.02, 0.03, 0.02, -0.01], name='Returns') # Compute Sharpe ratio (assumes risk-free rate = 0) sharpe = empyrical.sharpe_ratio(returns, period='daily', annualization=252) print(f"Sharpe ratio: {sharpe:.4f}") # Compute max drawdown max_dd = empyrical.max_drawdown(returns) print(f"Max drawdown: {max_dd:.4%}")
Debug
Known issues
breakingThe original 'empyrical' package was taken over by a malicious actor. 'empyrical-reloaded' is the maintained fork. Do not install 'empyrical' (0.5.10 or earlier) as it may be compromised.
fix
Uninstall empyrical and install empyrical-reloaded: pip uninstall empyrical; pip install empyrical-reloaded
affects: <0.5.11 of empyrical
gotchaMany functions require returns sorted in ascending order (oldest first). Passing a series in reverse order will produce incorrect results without warning.
fix
Ensure returns are sorted by date ascending before passing to empyrical functions
affects: all
gotcha'period' keyword is sometimes required, sometimes ignored. For example, 'sharpe_ratio' needs a 'period' to determine annualization, while 'max_drawdown' does not. Check docstrings.
fix
Always provide 'period' and 'annualization' for metrics that depend on frequency (Sharpe, Sortino, Calmar, etc.).
affects: all
deprecatedThe 'annualization' parameter default is set to None, which may raise a TypeError in future versions. You must explicitly provide it.
fix
Always pass annualization=252 for daily data, 52 for weekly, 12 for monthly.
affects: >=0.5.11 <=0.5.12
Upgrade
Version history
0.5.12latest on PyPI · released Jun 1, 2025
Audit
Dependencies
numpyrequiredcore dependency for numerical operations
pandasrequiredrequired for input data (Series/DataFrame) and output formatting
scipyrequiredused for statistical functions (e.g., beta, skew, kurtosis)
Agent activity
7 hits · last 30 days
node
4
Resources
empyrical-reloaded — pip install empyrical-reloaded · libregistry