Python Code/Prompts

Open-source Python implementations and Claude prompts for quantitative finance.

Read the theory, explore the code, and copy what you need.

Black-Scholes Option Pricing Model

Complete implementation of the Black-Scholes framework covering European option pricing, arbitrage bounds, implied volatility via Brent's method, and put-call parity.

Options Pricing Implied Volatility
ΔΓ

Option Greeks in Python

Step-by-step Delta, Gamma, Theta and Vega in Python. Includes formulas, plots, and an interactive chart that shows how gamma sharpens as time to expiry approaches zero.

Greeks Delta Gamma

Monte Carlo Option Pricing with GBM

Monte Carlo simulation under Geometric Brownian Motion with Itô correction. Terminal distributions, path simulation, and comparison against Black-Scholes analytical prices.

Monte Carlo Simulation GBM

CRR Binomial Tree for American Options

Cox-Ross-Rubinstein binomial tree for American and European option pricing, early exercise detection, and convergence to Black-Scholes.

Binomial Tree American Options Early Exercise

MVO Portfolio Optimization

Mean-variance optimization using the Markowitz framework, covering efficient frontier, Sharpe ratio maximization, constrained allocation, and portfolio backtesting.

Portfolio Markowitz Backtesting

Dashboard Automation Prompt

Step-by-step Claude prompt that turns any Python financial model into a fully interactive, self-contained HTML dashboard.

Claude Prompt Dashboard

PowerPoint Automation Prompt

Claude Design system + Claude Code skill that builds institutional equity research decks straight from an Excel model and exports a finished PDF.

Claude Design Skills Decks