A Python-based options pricing engine implementing multiple pricing models, Greeks, and quantitative analysis tools for European options.
This project builds a modular options pricing library from scratch, implementing:
- Analytical pricing (Black-Scholes)
- Numerical methods (Binomial Tree)
- Simulation methods (Monte Carlo)
- Greeks (risk sensitivities)
- Implied volatility solver
- Convergence and sensitivity analysis
- Visualisation and notebook-based exploration
The goal is to demonstrate both quantitative finance knowledge and software engineering skills relevant to quantitative developer roles.
-
Black-Scholes pricing model
-
Binomial tree pricing model
-
Monte Carlo simulation pricing
-
Greeks calculation:
- Delta
- Gamma
- Vega
- Theta
- Rho
-
Implied volatility solver (numerical root finding)
-
Model comparison and convergence analysis
-
Sensitivity analysis and payoff visualisation
-
Jupyter notebook for interactive analysis
-
Full test suite using
pytest
Options_Pricing_Engine/
│
├── src/
│ ├── models/ # Pricing models
│ ├── greeks/ # Greeks calculations
│ ├── utils/ # Helpers, validation, implied volatility
│ ├── visualisation/ # Plotting functions
│ └── main.py # Example execution
│
├── tests/ # Unit tests
├── notebooks/ # Analysis notebook
├── outputs/figures/ # Generated figures
├── examples/ # Example scripts (e.g. export figures)
│
├── requirements.txt
└── README.md
Closed-form analytical solution for pricing European options under log-normal assumptions.
Discrete-time model that approximates the continuous price process and converges to Black-Scholes as the number of steps increases.
Simulation-based approach using random sampling of price paths, useful for more complex derivatives.
from models.black_scholes import black_scholes_price
price = black_scholes_price("call", 42, 40, 0.5, 0.05, 0.2)
print(price)pip install -r requirements.txt
python src/main.py
python examples/export_figures.py
Run all tests with:
pytest
See:
notebooks/options_pricing_analysis.ipynb
Includes:
- Model comparisons
- Convergence analysis
- Sensitivity plots
- Greeks interpretation
- Real market data integration (e.g. using yfinance)
- Volatility surface / volatility smile
- American options pricing
- Performance optimisation (NumPy / C++)
- Strategy development using model mispricing
Olly Newport







