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.0.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.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quanteo-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 71e49c1e4928d546b5b49454ec9285d2c39018d6430d356beeb3f6b6fc32a857
MD5 9c3947b0f91ccae98552ea973e64fb27
BLAKE2b-256 907c8e6584c9f0c3b71b31dcfd378d2c700be5fca33047edf978db6bad0c1fb2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quanteo-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0d114cfc575c8d7a5f68854115f69ba21066cfa257b02b7217d8ca943486030
MD5 90ef443df76544bfc8e61631ae53c848
BLAKE2b-256 4c9f0d57fcae8cebc04c86514ebd4166dc5c376bdf18ee895948138bb8ae6579

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