v0.1.5 — November 2025

PyFund

Production-grade quantitative finance library in pure Python.Built for systematic traders who value correctness over marketing.

MIT LicensePython 3.10–3.13No external accounts required
python
>>> from pyfundlib.portfolio import RiskParityAllocator
>>> from pyfundlib.data import DataFetcher

>>> prices = DataFetcher.get_prices(
...     ["SPY", "TLT", "GLD", "DBC", "VNQ"], period="15y"
... )

>>> allocator = RiskParityAllocator(method="erc")
>>> weights = allocator.optimize(prices)

>>> print(weights)
{'SPY': 0.28, 'TLT': 0.41, 'GLD': 0.14, 'DBC': 0.09, 'VNQ': 0.08}

# True risk parity. One import. No configuration files.

What it actually does

No "AI-powered alpha". Just tools used by systematic desks every day.

Backtesting & Research

  • Vectorized engine (100× faster than backtrader)
  • Walk-forward analysis
  • Deflated Sharpe & PSR
  • Monte Carlo + stress testing
  • Position-level transaction logging

Portfolio Construction

  • Risk Parity (ERC, HRP, IVP)
  • Black-Litterman
  • Hierarchical Risk Parity
  • Maximum diversification
  • Mean-CVaR optimization

Execution & Live Trading

  • Alpaca
  • Interactive Brokers
  • Zerodha
  • Binance
  • Paper + live modes
  • Order-level slippage modeling

Machine Learning Pipeline

  • MLflow model registry
  • LSTM, XGBoost, LightGBM
  • Feature pipeline with lag/rolling stats
  • Versioned models + reproducibility

Philosophy

No Jupyter Lock-in

Works in scripts, Docker, cloud functions, and production servers.

Transparent & Auditable

Every calculation is vectorized, readable, and testable — no black boxes.

Zero Vendor Lock-in

MIT license. Fork it. Deploy it. Own your IP.

Used by systematic traders who don’t have time for marketing.

Contact Us
pip install pyfundlib

No sign-up. No waitlist. Just install and run.