Build a returns dashboard, a two-asset portfolio optimiser, a binomial option pricer, a Monte Carlo option pricer, and a discrete delta-hedging experiment. Each project adds one piece of mathematics to tools you already know. Give each project a hand calculation or analytic benchmark so you can distinguish a coding error from a modelling choice.
A sequence with a check at every stage
| Order | Python project | New mathematics | Check before moving on |
|---|---|---|---|
| 1 | Returns and drawdown dashboard | Compounding, sample variance, running peaks | Reproduce three consecutive returns and a drawdown by hand |
| 2 | Two-asset efficient frontier | Covariance, matrix products, constrained optimisation | Compare a grid of weights with the analytic minimum-variance weight |
| 3 | Binomial European option pricer | Replication, discounted expectation, backward induction | Match a hand-priced one-step call exactly |
| 4 | Monte Carlo option pricer | Normal sampling, geometric Brownian motion, sampling error | Compare a European price and its confidence interval with Black–Scholes |
| 5 | Discrete delta-hedging experiment | Option sensitivities, self-financing accounting, hedging error | Track stock and cash separately and reproduce one rebalance by hand |
The projects are ordered so the tests become more demanding as the models become richer. First use synthetic data to verify arithmetic. Then add a data source or more realistic conditions where relevant. Put the input assumptions and benchmark result near the top of each notebook.
A five-dollar test for the option pricer
In project three, take a stock at with possible next values of and , a call strike of , and a zero interest rate over the step. The two call payoffs are and . The replicating portfolio holds half a share and borrows , since and . Its initial cost is .
Before generalising your tree to hundreds of steps, assert that the one-step model returns for these inputs. Later, when you compare the tree with Black–Scholes, keep the maturity, volatility, rates, and dividend assumptions consistent across methods. Keeping those inputs aligned makes any remaining discrepancy easier to debug.
Reuse your test cases as the projects get bigger. The one-step pricer gives you an exact terminal-payoff test for the tree and a familiar payoff to revisit in Monte Carlo. The continuous-model European call later gives you a benchmark for simulation and a delta for the hedging experiment. Keep the benchmark, the input convention, and the tolerance next to each other. A numerical check tells you much more when you can say whether changing the grid, increasing paths, or changing the model is supposed to affect it.
When you get to the continuous-model benchmark, use the options pricer to check how changing spot or volatility changes the call price.