How giacomo-grassi/exotic-options-pricer works
exotic-options-pricer is a Python Monte Carlo library for pricing path-dependent equity options. The principal workflow configures market and simulation parameters, selects a Black–Scholes or Heston model and a payoff, then uses the engine to generate paths, discount payoff samples, and return a price with sampling error. Separate capabilities include finite-difference Greeks and closed-form benchmark formulas. The README documents all five payoff families; some payoff implementations and the CLI are not sampled, so their internal wiring is not inferred.
Main entry points: mc.py Monte Carlo · greeks.py Finite-difference Greeks · config.py Market settings · vanilla.py Vanilla payoff
Components 15
Pricing engine
- Public API
src/exotic_pricer/__init__.py - Market settings
src/exotic_pricer/config.py - Monte Carlo
src/exotic_pricer/engine/mc.py - Normal generator
src/exotic_pricer/engine/rng.py - Price result
src/exotic_pricer/engine/mc.py
Market models
- Black–Scholes
src/exotic_pricer/models/black_scholes.py - Heston
src/exotic_pricer/models/heston.py
Payoff contracts
- Vanilla payoff
src/exotic_pricer/payoffs/vanilla.py - Asian payoff
src/exotic_pricer/payoffs/asian.py - Barrier payoff
src/exotic_pricer/payoffs/barrier.py - Lookback payoff
src/exotic_pricer/payoffs/lookback.py - Cliquet payoff
src/exotic_pricer/payoffs/cliquet.py
Analytics
- Finite-difference Greeks
src/exotic_pricer/analytics/greeks.py - Closed-form benchmarks
src/exotic_pricer/analytics/analytic.py
Other components
- Pricing caller
Connections 21
- Pricing caller → Public API: imports API
- Pricing caller → Market settings: sets parameters
- Pricing caller → Monte Carlo: prices contract
- Pricing caller → Vanilla payoff: selects payoff
- Pricing caller → Asian payoff: selects payoff
- Pricing caller → Barrier payoff: selects payoff
- Pricing caller → Lookback payoff: selects payoff
- Pricing caller → Cliquet payoff: selects payoff
- Monte Carlo → Market settings: uses settings
- Monte Carlo → Normal generator: draws normals
- Monte Carlo → Black–Scholes: simulates paths
- Monte Carlo → Heston: simulates paths
- Monte Carlo → Vanilla payoff: invokes payoff
- Monte Carlo → Asian payoff: invokes payoff
- Monte Carlo → Barrier payoff: invokes payoff
- Monte Carlo → Lookback payoff: invokes payoff
- Monte Carlo → Cliquet payoff: invokes payoff
- Monte Carlo → Price result: returns estimate
- Finite-difference Greeks → Monte Carlo: reprices
- Pricing caller → Finite-difference Greeks: requests sensitivities
- Pricing caller → Closed-form benchmarks: requests benchmark