PyStatsFinance
Financial and quantitative statistical computing for Python.
Status:
0.1.0— first module shipped. Return-series performance metrics are available now; more quantitative-finance methods are on the roadmap below.
PyStatsFinance is part of the open-core PyStatistics family:
| Package | Layer |
|---|---|
pystatistics |
Fundamental, general statistics |
pystatsbio |
Biotech / pharma statistics |
pystatsclinical |
Clinical-trial / clinical-research statistics |
pystatsgenomic |
Genomics / computational-biology statistics |
pystatsfinance |
Financial / quantitative statistics |
pystatsinsurance |
Actuarial / insurance statistics |
Like its siblings, it builds on pystatistics for the general statistical layer
and adds methods specific to quantitative finance.
What's available now (0.1.0)
Return-series risk and performance metrics:
from pystatsfinance import performance
returns = [0.01, -0.02, 0.03, -0.01, 0.02]
performance.sharpe_ratio(returns) # annualized Sharpe ratio
performance.annualized_volatility(returns) # annualized volatility
performance.max_drawdown(returns) # worst peak-to-trough decline
sharpe_ratio annualizes mean(excess) / std(excess) (sample standard
deviation; per-period risk-free rate). max_drawdown works on returns or a
price series (are_prices=True) and reports the decline magnitude with its peak
and trough indices. All three fail loud on empty/non-finite input, and the
Sharpe ratio is raised — not returned as inf/nan — when volatility is zero.
Roadmap (candidates, not commitments)
- Value-at-Risk and Conditional VaR (historical and parametric).
- Extended performance ratios (Sortino, Calmar, Information) and drawdown analytics.
- GARCH-family volatility and portfolio optimization.
Installation
pip install pystatsfinance
License
MIT © Hai-Shuo. Part of the SGCX open-core ecosystem.
Metadata
Release files for pystatsfinance 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pystatsfinance-0.1.1.tar.gz | 14.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pystatsfinance-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.9 kB
Release files / pystatsfinance-0.1.1.tar.gz
| Download URL | pystatsfinance-0.1.1.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6e5cc012705137cb96d345ca0ac3ef02ea4e90895403cbf9462b00f29f754e2
|
|
BLAKE2b-256 checksum How to use checksums |
6b2634c9b81949fbac33e056461220240689861c2c5874e1f97bc2ca53705b33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logRelease files / pystatsfinance-0.1.1-py3-none-any.whl
| Download URL | pystatsfinance-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ab7c868051e7c72b32a4a3036c917995884164e76c151dc068bbad9b81724b3
|
|
BLAKE2b-256 checksum How to use checksums |
6a70edab5892949c6dcb0f9b258f9c27667fa657ce09562e11dbf9e179c33825
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logSecurity for pystatsfinance 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pystatsfinance-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.