Skip to content

Diljit22/quantFin

Repository files navigation

optpricing

CI/CD PyPI Version License: MIT Python 3.10+

A Python library for pricing and calibrating financial options.

Introduction

Welcome to optpricing, a comprehensive Python toolkit for pricing and calibrating financial derivatives. This library was originally designed for me to learn about the more nuanced methods of quantitative finance and has since grown into a robust framework for analysis.

optpricing is structured around four core pillars:

  • Atoms: Fundamental data types (Option, Stock, Rate) that ensure consistency and clarity of inputs across the library.
  • Models: A broad library ranging from classical Black-Scholes-Merton to advanced stochastic volatility (Heston, SABR) and jump/Lévy processes.
  • Techniques: Multiple pricing engines—closed-form formulas, FFT, numerical integration, PDE solvers, lattice methods, and Monte Carlo (numba-accelerated with variance reduction methods baked in).
  • Workflows: High-level orchestrators that automate end-to-end tasks like daily calibration and out-of-sample backtesting, all accessible via a CLI or an interactive dashboard.

Quick Start

Get started in minutes using the command-line interface.

# 1. Install the library with all features, including the dashboard
pip install "optpricing"

# 2. Download historical data for a ticker (used by some models)
optpricing data download --ticker SPY

# 3. Launch the interactive dashboard to visualize the results
optpricing dashboard

Documentation & Links

For a detailed tutorial, full API reference, and more examples, please see the official documentation.

Contributing & License

See CONTRIBUTING and LICENSE.