Metadata-Version: 2.2
Name: qf-lib
Version: 4.0.0
Summary: Quantitative Finance Library
Home-page: https://quarkfin.github.io/qf-lib-info
Author: Jacek Witkowski, Marcin Borratynski, Thomas Ruxton, Dominik Picheta, Olga Kalinowska, Karolina Cynk, Jakub Czerski, Bartlomiej Czajewski, Zeynep Gültuğ Aydemir, Octavian-Mihai Matei, Eirik Thorp Eythorsson, Marek Bais
License: Apache License 2.0
Project-URL: Documentation, https://qf-lib.readthedocs.io
Project-URL: Source, https://github.com/quarkfin/qf-lib
Keywords: quantitative finance backtester
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.8
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.8.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas<=2.2.3,>=1.4.0
Requires-Dist: xarray<=2024.11.0,>=0.21.0
Requires-Dist: numpy<=1.26.4,>=1.19.3
Requires-Dist: matplotlib<=3.6.1,>=3.4.0
Requires-Dist: Pillow<=10.2.0,>=9.0.0
Requires-Dist: scikit-learn<=1.6.0,>=1.0.0
Requires-Dist: seaborn>=0.11.1
Requires-Dist: openpyxl<=3.0.9,>=3.0.7
Requires-Dist: WeasyPrint==52.5
Requires-Dist: Jinja2<=3.1.4,>=3.0.0
Provides-Extra: documentation
Requires-Dist: autodocsumm==0.2.9; extra == "documentation"
Requires-Dist: sphinx_rtd_theme==1.2.0; extra == "documentation"
Requires-Dist: Sphinx==5.0; extra == "documentation"
Requires-Dist: docutils==0.18.1; extra == "documentation"
Requires-Dist: markupsafe==2.0.1; extra == "documentation"
Provides-Extra: interactive-brokers
Requires-Dist: ibapi; extra == "interactive-brokers"
Provides-Extra: bloomberg-beap-hapi
Requires-Dist: PyJWT<2.0.0,>=0.2.3; extra == "bloomberg-beap-hapi"
Requires-Dist: retrying>=1.3.3; extra == "bloomberg-beap-hapi"
Requires-Dist: beap-lib==0.0.1; extra == "bloomberg-beap-hapi"
Requires-Dist: requests<=2.31.0,>=2.25.1; extra == "bloomberg-beap-hapi"
Provides-Extra: blpapi
Requires-Dist: blpapi<=3.24.4,>=3.21.0; extra == "blpapi"
Provides-Extra: quandl
Requires-Dist: quandl<=3.7.0,>=3.6.1; extra == "quandl"
Provides-Extra: yfinance
Requires-Dist: yfinance>=0.2.50; extra == "yfinance"
Provides-Extra: detailed-analysis
Requires-Dist: statsmodels<0.14.0,>=0.13.0; extra == "detailed-analysis"
Requires-Dist: scipy<1.12.0,>=1.6.3; extra == "detailed-analysis"
Requires-Dist: cvxopt<=1.3.2,>=1.2.7; extra == "detailed-analysis"
Requires-Dist: arch<=7.0,>=5.4; extra == "detailed-analysis"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# QF-Lib

[![PyPI](https://img.shields.io/pypi/v/qf-lib?color=green&label=PyPI%20Latest%20Release)](https://pypi.org/project/qf-lib/)
[![Downloads](https://static.pepy.tech/personalized-badge/qf-lib?period=month&units=international_system&left_color=grey&right_color=blue&left_text=PyPI%20Downloads%20/%20month)](https://pepy.tech/project/qf-lib)
[![GitHub](https://img.shields.io/github/license/quarkfin/qf-lib?color=orange&label=License)](https://github.com/quarkfin/qf-lib/blob/master/LICENSE)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/qf-lib?color=yellow&label=python)
[![Codecov](https://img.shields.io/codecov/c/gh/quarkfin/qf-lib?color=pink)](https://app.codecov.io/gh/quarkfin/qf-lib)
[![Documentation Status](https://readthedocs.org/projects/qf-lib/badge/)](https://qf-lib.readthedocs.io/)
[![CI](https://github.com/quarkfin/qf-lib/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/quarkfin/qf-lib/actions/workflows/tests.yml)
![PyPI - Format](https://img.shields.io/pypi/format/qf-lib?color=lightgrey)
![PyPI - Status](https://img.shields.io/pypi/status/qf-lib?color=darkred)

## What is QF-lib?
**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**.

Main features include:
* Flexible data sourcing - the project supports the possibility of an easy selection of the data source. Currently provides financial data from **Bloomberg**, **Quandl**, **Haver Analytics** or **Portara**. To check if there are any additional dependencies necessary for any of these data providers please visit [the installation guide](https://qf-lib.readthedocs.io/en/latest/installation.html#installing-optional-data-providers).
* Tools to prevent look-ahead bias in the backtesting environment.
* Adapted [data containers](https://qf-lib.readthedocs.io/en/latest/reference/structure.html#containers), which extend the functionality of pandas `Series'` and `Dataframes`.
* Summary generation - all performed studies can be summarized with a practical and informative document explaining the results. [Several document templates](https://qf-lib.readthedocs.io/en/latest/reference/structure.html#analysis) are available in the project.
* Simple adjustment of existing settings and creation of new functionalities.


## Installation
You can install `qf-lib` using the pip command:

```sh
pip install qf-lib
```
 
Alternatively, to install the library from sources, you can download the project and in the qf_lib directory 
(same one where you found this file after cloning the repository) execute the following command:

```sh
python setup.py install
```

## Prerequisites
The library uses [WeasyPrint](https://weasyprint.readthedocs.io) to export documents to PDF. WeasyPrint requires additional dependencies, check the 
[platform-specific instructions for Linux, macOS and Windows installation](https://weasyprint.readthedocs.io/en/stable/install.html).

In order to facilitate the GTK3+ installation process for Windows you can use 
[following installers](https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases). Download and run the latest 
`gtk3-runtime-x.x.x-x-x-x-ts-win64.exe` file to install the GTK3+.

## Documentation
* Installation guide: https://qf-lib.readthedocs.io/en/latest/installation.html
* Configuration guide: https://qf-lib.readthedocs.io/en/latest/configuration.html
* API documentation: https://qf-lib.readthedocs.io/
