--- id: empyrical-reloaded version: "0.5.12" 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) license_treatment: permissive maintenance: aging --- # empyrical-reloaded — empyrical computes performance and risk statistics commonly used in quantitative finance License: permissive · Maintenance: aging · Downloads: 161.7K/mo ## 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 above — 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 pip install empyrical-reloaded uv add empyrical-reloaded poetry add empyrical-reloaded ## Installing 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_current - Install friction: low - Maintenance: aging - Downloads: 161.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags financial performance metrics, portfolio risk analysis, return and drawdown calculation, alpha beta computation, sharpe ratio calculator, quantitative-finance, portfolio-analysis, risk-metrics [View on SkillFed](https://skillfed.io/packages/empyrical-reloaded) · [View on PyPI](https://pypi.org/project/empyrical-reloaded/)