← Back to Portfolio

Options Pricing Engine GitHub

Quantitative Finance • C++17 / Python
View on GitHub 🔗

A European options pricing engine based on the Black-Scholes model, written in modern C++17 to production-code standards: a clean architecture, a reproducible build, and a test suite that checks the maths rather than just the code paths.

Usage

C++

EuropeanOption call{100, 1.0, OptionType::Call};   // strike, maturity, type
MarketData     market{100, 0.2, 0.05};              // spot, volatility, rate

pricing::PricingResult res = pricing::price(call, market);
// res.price ≈ 10.4506, plus res.delta, res.gamma, res.vega, res.theta, res.rho

Python (pybind11)

import pricing

res = pricing.price(pricing.EuropeanOption(100, 1.0, pricing.OptionType.Call),
                    pricing.MarketData(100, 0.2, 0.05))
print(res.price, res.delta, res.gamma)

Features & Design

Testing (Catch2)

Model assumptions: constant volatility and interest rate, no dividends, European exercise only.

Technical Details

C++17 CMake Catch2 Black-Scholes pybind11 Python