QF-Lib
A modular Python library with an advanced event-driven backtester and high-quality tools for quantitative finance - portfolio construction, time series analysis, risk monitoring, and publication-ready reporting.
Multi-tool for any type of financial research
Portfolio optimisers, rich charting, adapted Pandas containers, and exporters to PDF, Excel, or email - everything you need to analyse and present results.
Learn more ↓
Developed at CERN, available as open source
Developed at the CERN Pension Fund and released under the permissive Apache License 2.0. Join the community on Discord or contribute on GitHub.
License →
Powerful, event-driven Backtester
Simulate market open, close, and custom events. Test alpha models, position sizing, commissions, and slippage on historical data - then move to production with the same architecture.
Learn more ↓QF-Lib is a Python library that provides high quality tools for quantitative finance. A large part of the project is dedicated to backtesting investment strategies. The Backtester uses an event-driven architecture and simulates events such as daily market opening or closing. It is designed to test and evaluate any custom investment strategy.
Get started#
Installation
Install QF-Lib, optional data providers, and settings.json.
Tutorials
Backtesting, alpha models, data providers, and portfolio construction.
Tutorials →API reference
Auto-generated module and class reference.
API Reference →Community
Questions and collaboration on Discord.
Contact us →