/work/monte-carlo-options-pricer
AmanShah
Brief
amanashishshah@gmail.com

© 2026 Aman Shah

Recruiter mode

Self-directed

Work/

Monte Carlo Options Pricer

Monte Carlo Options Pricer, at a glance

derivatives pricing

HPC

Project overview

Three cross-validating C++ option-pricing engines

Prices European and American options three independent ways — Black–Scholes, a binomial tree, and a Sobol-accelerated Monte Carlo simulator — so every number is cross-checked against the other two.

Role

  • Quant developer
  • C++ / Python engineer

Date

2026

Field

Quant

Stack

C++17, pybind11, Eigen, Python

~105M paths/s

~1e-5 vs analytic

Sobol 6–55× variance cut

Context

A high-performance options pricing engine in C++17 with a pybind11 Python wrapper, where three paradigms that must agree are the core quality mechanism.

Monte Carlo Options Pricer, image 1
Monte Carlo Options Pricer, image 2
Monte Carlo Options Pricer, image 3
Monte Carlo Options Pricer, image 4
Monte Carlo Options Pricer, image 5

Monte Carlo Options Pricer

Monte Carlo Options Pricer, image 1

The hard part

An option price is only trustworthy if independent routes agree: the analytic formula validates the tree, the tree validates the simulator, and the simulator extends to payoffs the formula cannot touch.

Monte Carlo Options Pricer, image 3

What it took

  • Implemented closed-form Black–Scholes (price, Greeks, and a Newton + bisection implied vol), a CRR lattice with early exercise, and Monte Carlo over risk-neutral GBM, cross-validating to the cent across in/out-of-the-money, dividend-paying, European and American contracts.
  • Priced American options with the Longstaff–Schwartz least-squares method, regressing discounted future cash flows onto a Laguerre-polynomial basis at moneyness via Eigen's column-pivoted Householder QR for numerical stability.
  • Reduced variance with Sobol low-discrepancy sequences plus antithetic variates, and scaled throughput across a lock-free thread pool giving each worker thread-local RNG state (independent seeds or Sobol Gray-code skip-ahead) so quasi-random prices are bit-identical regardless of thread count.

Outcome

On a 10-core machine it generates ~105M paths/sec, values a 1M-path option in ~35 ms, and prices to ~1e-5 against the analytic benchmark, with Sobol cutting error 6–55× per path and a zero-copy NumPy batch path for Python.