Metadata-Version: 2.4
Name: optpricing
Version: 2.3.1
Summary: A financial options pricing and analysis library.
Author-email: Diljit Singh <first_last22@google.com>
License: # MIT LICENSE
        
        Copyright 2025 Diljit Singh
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://diljit22.github.io/quantfin/
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy~=2.2.5
Requires-Dist: scipy~=1.15.2
Requires-Dist: pandas~=2.2.3
Requires-Dist: numba~=0.61.2
Requires-Dist: pyyaml~=6.0.2
Requires-Dist: click~=8.1
Requires-Dist: typer~=0.15.2
Requires-Dist: streamlit~=1.45.1
Requires-Dist: matplotlib~=3.10.1
Requires-Dist: plotly~=6.1.2
Requires-Dist: yfinance~=0.2.63
Requires-Dist: tabulate~=0.9.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff==0.11.6; extra == "dev"
Requires-Dist: mkdocs; extra == "dev"
Requires-Dist: mkdocs-material; extra == "dev"
Requires-Dist: mkdocstrings[python]; extra == "dev"
Requires-Dist: mkdocs-section-index; extra == "dev"
Requires-Dist: line_profiler; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: codecov; extra == "dev"
Dynamic: license-file

# optpricing

[![Tests](https://img.shields.io/github/actions/workflow/status/diljit22/quantfin/ci.yml?branch=main&label=tests)](https://github.com/diljit22/quantfin/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/diljit22/quantfin/branch/main/graph/badge.svg)](https://codecov.io/gh/diljit22/quantfin)
[![Ruff](https://img.shields.io/github/actions/workflow/status/diljit22/quantfin/ci.yml?branch=main&label=ruff)](https://github.com/diljit22/quantfin/actions/workflows/ci.yml)
[![Docs](https://img.shields.io/github/actions/workflow/status/diljit22/quantfin/ci.yml?branch=main&label=docs)](https://github.com/diljit22/quantfin/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/optpricing.svg)](https://pypi.org/project/optpricing/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/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.

```bash
# 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.

- **Getting Started**:
  [Installation Guide](https://diljit22.github.io/quantfin/guide/installation/) ·
  [Walkthrough](https://diljit22.github.io/quantfin/guide/getting_started/)

- **Documentation**:
  [API Reference](https://diljit22.github.io/quantfin)

- **Interactive Dashboard**:
  [Launch the UI](https://diljit22.github.io/quantfin/guide/dashboard/)

- **About Me**:
  [LinkedIn](https://www.linkedin.com/in/singhdiljit/)

## Contributing & License

See [CONTRIBUTING](/CONTRIBUTING.md) and [LICENSE](LICENSE).
