Metadata-Version: 2.4
Name: quantflow
Version: 1.0.0
Summary: quantitative analysis
Project-URL: Homepage, https://github.com/quantmind/quantflow
Project-URL: Repository, https://github.com/quantmind/quantflow
Project-URL: Documentation, https://quantflow.quantmind.com
Project-URL: Issues, https://github.com/quantmind/quantflow/issues
Author-email: Luca Sbardella <luca@quantmind.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: finance,options,pricing,quantitative,stochastic,volatility
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Requires-Python: <3.15,>=3.11
Requires-Dist: ccy>=2.0.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: pydantic>=2.0.2
Requires-Dist: scipy>=1.14.1
Requires-Dist: statsmodels<0.15.0,>=0.14.6
Provides-Extra: data
Requires-Dist: aio-fluid[http]>=2.4.0; extra == 'data'
Provides-Extra: ml
Requires-Dist: torch>=2.12.0; extra == 'ml'
Description-Content-Type: text/markdown

# <a href="https://quantmind.github.io/quantflow"><img src="https://raw.githubusercontent.com/quantmind/quantflow/main/docs/assets/logos/quantflow-lockup.svg" width=300 /></a>

[![PyPI version](https://badge.fury.io/py/quantflow.svg)](https://badge.fury.io/py/quantflow)
[![Python versions](https://img.shields.io/pypi/pyversions/quantflow.svg)](https://pypi.org/project/quantflow)
[![Python downloads](https://static.pepy.tech/badge/quantflow/month)](https://pepy.tech/project/quantflow)
[![build](https://github.com/quantmind/quantflow/actions/workflows/build.yml/badge.svg)](https://github.com/quantmind/quantflow/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/quantmind/quantflow/branch/main/graph/badge.svg?token=wkH9lYKOWP)](https://codecov.io/gh/quantmind/quantflow)

Quantitative analysis and pricing tools.

![btcvol](https://github.com/quantmind/quantflow/assets/144320/88ed85d1-c3c5-489c-ac07-21b036593214)

## Installation

```bash
pip install quantflow
```
### Optional dependencies

* `data` — data retrieval: `pip install quantflow[data]`
* `ml` — training the Deep Implied Volatility model: `pip install quantflow[ml]`

## Features

* **Stochastic Processes**: a library of continuous-time models including Wiener processes, Poisson jumps, CIR mean-reverting dynamics, Heston stochastic volatility, jump-diffusion models, and the Barndorff-Nielsen & Shephard (BNS) model. Each process exposes its [characteristic function](https://quantflow.quantmind.com/theory/characteristic/) for analytical pricing.

* **Option Pricing and Calibration**: Black-Scholes pricing, implied volatility surfaces, SVI parameterisation, put/call parity, and model calibration (Heston, Double Heston). Includes support for both inverse (crypto) and standard (equity) quoting conventions.

* **Interest Rates**: yield curve construction via Nelson-Siegel and Vasicek models, discount factor calculation, and rate interpolation.

* **Market Data**: connectors for [Deribit](https://www.deribit.com), [Yahoo Finance](https://finance.yahoo.com), [Financial Modeling Prep](https://financialmodelingprep.com) (FMP), [FRED](https://fred.stlouisfed.org), the [Federal Reserve](https://www.federalreserve.gov), and [US Fiscal Data](https://fiscaldata.treasury.gov) APIs.

* **Time Series Analysis**: exponentially weighted moving averages (EWMA), Kalman filtering, super-smoothers, and OHLC bar utilities.

* **JSON Serializable**: all models and pricers are built on [Pydantic](https://docs.pydantic.dev), making them fully serializable to and from JSON.

## Contributing

Contributions are welcome! See the [contributing guide](https://quantflow.quantmind.com/contributing/) for how to get started, including documentation contributions, which are a great entry point.

## Citation

If you use Quantflow in your research, please cite it using the metadata in [CITATION.cff](https://github.com/quantmind/quantflow/blob/main/CITATION.cff).

## License

Released under the [BSD 3-Clause License](https://github.com/quantmind/quantflow/blob/main/LICENSE).
