--- id: pyxirr version: "0.10.8" license: Unlicense license_treatment: permissive maintenance: aging --- # pyxirr — Rust-powered collection of financial functions for Python. License: permissive · Maintenance: aging · Downloads: 1.1M/mo ## 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 above — 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 pip install pyxirr uv add pyxirr 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_current - Install friction: medium - Maintenance: aging - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags xirr irr calculation, financial functions python, cash flow analysis, npv fv computation, day count conventions, vectorized financial math, rust financial library, financial-math, rust-backed, vectorized [View on SkillFed](https://skillfed.io/packages/pyxirr) · [View on PyPI](https://pypi.org/project/pyxirr/)