Skip to main content

A financial options pricing and analysis library.

Project description

optpricing

Tests Coverage Ruff Docs PyPI version Python 3.10+ License: MIT

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/Levy 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optpricing-2.3.1.tar.gz (20.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optpricing-2.3.1-py3-none-any.whl (126.7 kB view details)

Uploaded Python 3

File details

Details for the file optpricing-2.3.1.tar.gz.

File metadata

  • Download URL: optpricing-2.3.1.tar.gz
  • Upload date:
  • Size: 20.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for optpricing-2.3.1.tar.gz
Algorithm Hash digest
SHA256 56333892ffb6158932d96e9b353cc694083829d5a835656359efb468e62573f1
MD5 a31399d5ac1a568757a5ef1426b2d3b2
BLAKE2b-256 0cc2b4ca6707dbf768f6f2b687b5437338c7bce52bf61165fad586e7ab929410

See more details on using hashes here.

Provenance

The following attestation bundles were made for optpricing-2.3.1.tar.gz:

Publisher: publish.yml on Diljit22/quantFin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file optpricing-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: optpricing-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 126.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for optpricing-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdb4c50a00104c160649e596134fef2cad70b5fccf5932011f2a81ea30a09d76
MD5 e7dc0966dd26ca831546ac95eb89144f
BLAKE2b-256 7383ffea339509fcdd9e3ba229cc48bdcc4b52cce4ec983dfd38ec6d8175ee02

See more details on using hashes here.

Provenance

The following attestation bundles were made for optpricing-2.3.1-py3-none-any.whl:

Publisher: publish.yml on Diljit22/quantFin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page