Skip to main content

A quantitative options pricing and risk library.

Project description

QUANTEO: Quantitative Options Pricing & Risk

Quanteo is an Object-Oriented Python library for derivative pricing and risk sensitivity analysis. This project is developed as part of my learning journey during the MSc in Mathematical Engineering at Politecnico di Torino. The library implements stochastic models and variance reduction techniques to estimate option prices and Greeks, particularly for path-dependent derivatives.


Author: Matteo Ientile
MSc Mathematical Engineering – Politecnico di Torino

LinkedIn X

Functionalities available at the moment

1. Simulation & Pricing Engines

  • Monte Carlo: Path generation for Geometric Brownian Motion (GBM).
  • Quasi-Monte Carlo: Sobol low-discrepancy sequences for improved convergence.
  • Variance Reduction: Control Variates (anchored to analytical solutions) and Antithetic Sampling.
  • Analytical Models: Closed-form Black-Scholes-Merton (BSM) for European and Geometric Asian options.

2. Risk Management (Greeks)

  • Computation of $\Delta, \Gamma, \nu, \rho, \Theta$.
  • Finite Differences: Central difference approximations for numerical sensitivities.
  • CRN (Common Random Numbers): Epsilon caching to ensure stability in numerical derivatives.

3. Contract Types

  • European Options: Standard Call/Put payoffs.
  • Asian Options: Discrete Arithmetic and Geometric averages.

Examples

The examples/ directory contains notebooks demonstrating the implementation:

  • european_options_and_greeks.ipynb: Benchmarking BSM, MC, and QMC engines.
  • asian_options_and_variance_reduction.ipynb: Statistical impact of Control Variates on Asian contracts.

Usage

from quanteo.models import GBM
from quanteo.options import ArithmeticAsianOption, GeometricAsianOption
from quanteo.pricers import MonteCarloPricer, ControlVariateMC, GeometricAsianPricer

# 1. Market Data
model = GBM(S0=85.0, r=0.04, sigma=0.42)

# 2. Options (126 observations)
target = ArithmeticAsianOption(T=0.5, K=88.0, N=126)
control = GeometricAsianOption(T=0.5, K=88.0, N=126)

# 3. Analytical Anchor
exact_cv = GeometricAsianPricer().price(control, model).price

# 4. Monte Carlo with Control Variate
mc = MonteCarloPricer(n_paths=5000, n_steps=126)
cv_engine = ControlVariateMC(mc)

result = cv_engine.price(target, control, exact_cv, model)

print(f"Price: {result.price:.4f}")
print(f"95% CI: [{result.metrics['cv_lower_bound']:.4f}, {result.metrics['cv_upper_bound']:.4f}]")

Roadmap

  • Heston Model: Stochastic volatility integration.
  • Jump Diffusion: Merton model for discontinuous price paths.
  • American Options: Longstaff-Schwartz (LSM) implementation.
  • Dashboard: Streamlit interface for visualization.

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

quanteo-0.1.1.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

quanteo-0.1.1-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file quanteo-0.1.1.tar.gz.

File metadata

  • Download URL: quanteo-0.1.1.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for quanteo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fc2a54e274f9044a8720c0e52c4dfca08252170a930d972961731d9616ced69c
MD5 ae3b0b45cc8a14841e5c6be2b58391b9
BLAKE2b-256 c77ef007c7f52ef78fcd51ade2c184db4ccdef6c3bd19199ec9466ffbf63ace5

See more details on using hashes here.

File details

Details for the file quanteo-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: quanteo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for quanteo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 056b5587fa32cd8ed8f101fbd79f91ab16459168f34b0b64e54b48824c44548d
MD5 511ee78840b1300dbcde5c6e168c9606
BLAKE2b-256 b245fe544a1926740acf56bd09c646184ba7c721ccb388201d4689e78484e335

See more details on using hashes here.

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