Được TopGit lập chỉ mục từ metadata GitHub: stefan-jansen/empyrical-reloaded có 134 sao, viết chủ yếu bằng Python. Common financial risk and performance metrics. Used by zipline and pyfolio.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Common financial return and risk metrics in Python.
Maintenance and new projects
We continue to maintain Empyrical Reloaded for bug, security, and compatibility fixes.
Our new feature development focuses on ML4T Diagnostic,
part of the ML4T libraries.
For new projects, start with Diagnostic's maintained
Empyrical migration guide
and published documentation.
Check each recipe's package and release requirements before using APIs documented in source.
Keep annualization, periodic versus annual rates, missing-value policies and return/loss signs
explicit; similarly named metrics need not have equivalent behavior.
The historical ten-metric comparison,
frozen source migration recipe
and frozen capability reference
retain earlier tested versions and findings. They do not describe current successor coverage
or establish complete replacement of Empyrical.
Installation
Empyrical Reloaded supports Python 3.11 through 3.15. Python 3.9 and 3.10 are retired
for this release; historical packages retain their original Python requirements.
You can install it using pip:
pip install empyrical-reloaded
or conda from the conda-forge channel
conda install empyrical-reloaded -c conda-forge
The installer provides NumPy, pandas, SciPy and the other declared runtime dependencies.
Note that Numpy>=2.0 requires pandas>=2.2.2. If you are using an older version of pandas, you may need to upgrade
accordingly, otherwise you may encounter compatibility issues.
Optional dependencies include yfinance to download price data
from Yahoo! Finance
and pandas-datareader to
access Fama-French risk factors and FRED
treasury yields.
Empyrical computes basic metrics from returns and volatility to alpha and beta, Value at Risk, and Sharpe or Sortino
ratios.
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])
# calculate the max drawdown
max_drawdown(returns)
# calculate alpha and beta
alpha, beta = alpha_beta(returns, benchmark_returns)
Rolling Measures
Empyrical also aggregates return and risk metrics for rolling windows:
import numpy as np
from empyrical import roll_max_drawdown
returns = np.array([.01, .02, .03, -.4, -.06, -.02])
# calculate the rolling max drawdown
roll_max_drawdown(returns, window=3)
Pandas Support
Empyrical also works with both NumPy arrays and Pandas data
structures:
import pandas as pd
from empyrical import roll_up_capture, capture
returns = pd.Series([.01, .02, .03, -.4, -.06, -.02])
factor_returns = pd.Series([.02, .01, .03, -.01, -.02, .02])
# calculate a capture ratio
capture(returns, factor_returns)
-0.147387712263491
Fama-French Risk Factors
Empyrical downloads Fama-French risk factors from 1970 onward:
Requires optional dependency pandas-datareader - see installation instructions above.
Empyrical use yfinance to download price data
from Yahoo! Finance. To obtain the S&P returns since 1950, use:
Note: requires optional dependency yfinance - see installation instructions above.
import empyrical as emp
symbol = '^GSPC'
returns = emp.utils.get_symbol_returns_from_yahoo(symbol,
start='1950-01-01')
import seaborn as sns # requires separate installation
import matplotlib.pyplot as plt # requires separate installation
fig, axes = plt.subplots(ncols=2, figsize=(14, 5))
with sns.axes_style('whitegrid'):
returns.plot(ax=axes[0], rot=0, title='Time Series', legend=False)
sns.histplot(returns, ax=axes[1], legend=False)
axes[1].set_title('Histogram')
sns.despine()
plt.tight_layout()
plt.suptitle('Daily S&P 500 Returns')
Documentation
See the documentation for details on the API.
Support
Please open an issue for support.
Contributing
Empyrical Reloaded accepts bug, security, and compatibility fixes. Read the
contribution guide
for issue scope, regression evidence, review checks, and AI disclosure requirements.
Đọc thêm về stefan-jansen/empyrical-reloaded ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/stefan-jansen/empyrical-reloaded là nguồn chính thức.
stefan-jansen/empyrical-reloaded có phải mã nguồn mở không?
Có — stefan-jansen/empyrical-reloaded phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/stefan-jansen/empyrical-reloaded.
stefan-jansen/empyrical-reloaded có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho stefan-jansen/empyrical-reloaded. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
stefan-jansen/empyrical-reloaded có trang demo không?
Dự án có trang chủ ở https://empyrical.ml4trading.io/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
stefan-jansen/empyrical-reloaded còn đang phát triển không?
Commit gần nhất trên stefan-jansen/empyrical-reloaded là 8 ngày trước (theo timestamp GitHub). Repo có 53 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
stefan-jansen/empyrical-reloaded dùng license gì?
stefan-jansen/empyrical-reloaded phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về empyrical-reloaded?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về empyrical-reloaded.