skillfed

pyxirr

Rust-powered collection of financial functions for Python.

pyxirr v0.10.8 1.1M downloads/30d#4,393 on PyPI221
Permissive license Unlicense AGING released

What it is and what it does

PyXIRR is a Python wrapper around Rust-implemented financial functions, designed to compute internal rate of return (XIRR), IRR, NPV, FV, and related metrics with high performance. It handles multiple input formats—iterators, numpy arrays, pandas DataFrames, dictionaries, and date-string pairs—and supports different day-count conventions (ACT/360, 30E/360, etc.) used in fixed-income and corporate finance. The library also includes private equity metrics like PME+ and direct alpha, plus numpy-like vectorization for batch calculations.

The package solves the multiple IRR problem by searching for a positive result near 0.1 (matching Excel's default) and falling back to conservative lower IRR estimates when multiple solutions exist. It has no external runtime dependencies, includes type annotations, and is optimized for speed through its Rust backend. Typical use cases span investment analysis, portfolio performance measurement, and financial modeling where fast, accurate cash-flow calculations are needed.

Use it for:

  • Calculate investment returns (XIRR) for portfolios with irregular cash flows and multiple entry/exit dates.
  • Compute NPV and IRR for capital budgeting and project evaluation with different discount rates.
  • Apply day-count conventions in fixed-income bond pricing and accrued interest calculations.
  • Batch-process financial metrics across multiple securities or funds using vectorized operations.
  • Measure private equity fund performance using PME+ and direct alpha against public market indices.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyXIRR is a Rust-backed library that computes financial functions including XIRR, IRR, NPV, and FV with support for multiple day-count conventions and vectorized operations on dates and cash flows.

Yes. PyXIRR is a solid choice for financial calculations: it has no runtime dependencies, supports modern Python versions (3.7–3.14), carries a permissive license, and offers significant speed advantages through Rust. The medium install friction is mitigated by pre-built wheels for common platforms. The aging maintenance status (284 days since last release) is a minor concern but not a blocker, given the stable, focused scope of the library and zero known vulnerabilities.

Install

pyxirr on PyPI

pip

pip install pyxirr

uv

uv add pyxirr

poetry

poetry add pyxirr

Installing pyxirr

Before you install

Medium install friction due to compiled wheels; however, pre-built wheels are available for Python 3.7–3.14 across macOS, Linux (multiple architectures), and Windows, reducing build overhead for most users. Last release was 284 days ago; repository is active but aging.

License in practice

Licensed under the Unlicense (permissive public domain equivalent), imposing no restrictions on use, modification, or distribution—suitable for commercial and proprietary projects.

Quickstart

from datetime import date
from pyxirr import xirr

dates = [date(2020, 1, 1), date(2021, 1, 1)]
amounts = [-1000, 1200]
result = xirr(dates, amounts)

Verify before relying

  • Whether the aging maintenance status (284 days since last release) signals a risk for future bug fixes or feature updates.
  • Compatibility and performance with very large cash-flow datasets or high-dimensional vectorized operations.

Package facts

License Unlicense (permissive)
Python support supports the current Python release (>=3.7)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance aging — 284 days since the last release
Last repo commit
First released
Downloads 1,082,630/month — #4,393 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyxirr-0.10.8-cp310-cp310-macosx_10_12_x86_64.whl; pyxirr-0.10.8-cp310-cp310-macosx_11_0_arm64.whl; pyxirr-0.10.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyxirr-0.10.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; pyxirr-0.10.8-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; pyxirr-0.10.8-cp310-cp310-manylinux_2_17_ppc64.manylinux2014_ppc64.whl; pyxirr-0.10.8-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; pyxirr-0.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pyxirr-0.10.8-cp310-cp310-musllinux_1_2_aarch64.whl; pyxirr-0.10.8-cp310-cp310-musllinux_1_2_armv7l.whl; pyxirr-0.10.8-cp310-cp310-musllinux_1_2_i686.whl; pyxirr-0.10.8-cp310-cp310-musllinux_1_2_x86_64.whl; pyxirr-0.10.8-cp310-none-win_amd64.whl; pyxirr-0.10.8-cp311-cp311-macosx_10_12_x86_64.whl; pyxirr-0.10.8-cp311-cp311-macosx_11_0_arm64.whl; pyxirr-0.10.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pyxirr-0.10.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; pyxirr-0.10.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; pyxirr-0.10.8-cp311-cp311-manylinux_2_17_ppc64.manylinux2014_ppc64.whl; pyxirr-0.10.8-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl

Keywords: python, fast, financial, xirr, cashflow, day count convention, PME

Development Status :: 4 - BetaLicense :: OSI Approved :: The Unlicense (Unlicense)Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: RustTopic :: Office/Business :: Financial

Tags

xirr irr calculationfinancial functions pythoncash flow analysisnpv fv computationday count conventionsvectorized financial mathrust financial library
financial-mathrust-backedvectorized

More Financial packages