How sawee4/pricer works
pricer is a C++17 option-pricing library. A caller supplies an Option contract and MarketData to a pricing engine and receives a price, with uncertainty fields for simulation. The documented capabilities include analytic and tree pricing, Monte Carlo, Greeks, implied volatility, and path-dependent Asian/barrier options. The graph follows those domain stages and includes the shared numerical utilities. Some relationships are supported by README descriptions or the SOURCE INDEX rather than inspected implementation excerpts; those limits are reflected in the evidence paths.
Main entry points: monte_carlo_pricer.cpp Monte Carlo · path_dependent_pricer.cpp Path Simulation · monte_carlo_greeks.cpp Monte Carlo Greeks · random.cpp Portable Randomness
Components 17
Contracts and Inputs
- Option Contract
src/option.cpp - Terminal Payoffs
src/payoff.cpp - Market Data
src/market_data.cpp - Asian and Barriers
src/path_payoff.cpp
Pricing Engines
- Pricer Interface
include/pricer/pricer.hpp - Analytic Pricer
src/analytic_pricer.cpp - CRR Binomial
src/binomial_pricer.cpp - Monte Carlo
src/monte_carlo_pricer.cpp - Path Simulation
src/path_dependent_pricer.cpp
Analytics
- Black-Scholes Formulas
src/black_scholes.cpp - Exotic Formulas
src/exotic_formulas.cpp - Implied Volatility
src/implied_vol.cpp - Monte Carlo Greeks
src/monte_carlo_greeks.cpp
Simulation Utilities
- Portable Randomness
src/random.cpp - Running Statistics
include/pricer/statistics.hpp - Normal Distribution
src/normal.cpp
Other components
- Library Caller
Connections 27
- Library Caller → Option Contract: defines contract
README.md - Library Caller → Market Data: provides inputs
README.md - Library Caller → Analytic Pricer: requests price
README.md - Library Caller → Monte Carlo: requests price
README.md - Library Caller → CRR Binomial: requests price
README.md - Option Contract → Terminal Payoffs: owns payoff
README.md - Analytic Pricer → Black-Scholes Formulas: uses formulas
src/analytic_pricer.cpp - Analytic Pricer → Terminal Payoffs: evaluates payoff
src/analytic_pricer.cpp - CRR Binomial → Pricer Interface: implements
- Monte Carlo → Pricer Interface: implements
- Monte Carlo → Portable Randomness: draws normals
src/monte_carlo_pricer.cpp - Monte Carlo → Running Statistics: accumulates estimates
src/monte_carlo_pricer.cpp - Portable Randomness → Normal Distribution: transforms uniforms
src/random.cpp - Path Simulation → Asian and Barriers: evaluates paths
- Path Simulation → Portable Randomness: draws normals
src/path_dependent_pricer.cpp - Path Simulation → Running Statistics: accumulates estimates
src/path_dependent_pricer.cpp - Asian and Barriers → Terminal Payoffs: adapts terminal payoff
- Asian and Barriers → Black-Scholes Formulas: uses pricing inputs
- Implied Volatility → Black-Scholes Formulas: solves against prices
src/implied_vol.cpp - Exotic Formulas → Normal Distribution: uses distribution
src/exotic_formulas.cpp - Monte Carlo Greeks → Monte Carlo: revalues bumped inputs
src/monte_carlo_greeks.cpp - Monte Carlo Greeks → Portable Randomness: simulates paths
src/monte_carlo_greeks.cpp - Monte Carlo Greeks → Running Statistics: estimates Greeks
src/monte_carlo_greeks.cpp - Library Caller → Path Simulation: requests exotic price
README.md - Library Caller → Implied Volatility: solves volatility
README.md - Library Caller → Monte Carlo Greeks: estimates Greeks
README.md - Library Caller → Exotic Formulas: uses closed forms
README.md