This repository contains the code and reports for a two-part coursework in Stochastic Processes – The Fundamentals (Vrije Universiteit Amsterdam). The project connects empirical S&P 500 data, return modelling, and option pricing via binomial trees and the Black–Scholes framework.
spf-assignment-1-script.ipynb
Modelling S&P 500 returns and index dynamics, and pricing simple derivatives.spf-assignment-2-script.ipynb
Numerical option pricing and dynamic hedging under Black–Scholes.SP500.csv
Historical monthly S&P 500 index levels used throughout.spf-1-report.pdf,spf-2-report.pdf
Full write-ups of the theory, methodology, and results.
Using historical monthly S&P 500 data:
- Estimate mean and volatility of simple net returns and test whether the mean differs from zero using a t-test. :contentReference[oaicite:0]{index=0}
- Study estimation risk: how many years of data are needed for a tight confidence interval on the mean, and how parameter uncertainty affects optimal risky investment for a risk-averse investor.
- Compare two modelling choices:
- Linear model for simple net returns
- Geometric Brownian Motion (GBM) for index levels
- Use GBM to:
- Forecast the expected index level over multi-year horizons
- Simulate index paths and analyse the (lognormal) distribution of future levels
- Price digital options (puts/calls) and contrast real-world vs risk-neutral probabilities, including put–call parity.
Working with a 3-month European option on the S&P 500:
-
Numerical pricing methods
- Binomial trees calibrated to empirical variance and expected return; step-size rescaling and convergence to Black–Scholes.
- Monte Carlo pricing under GBM using Euler discretisation on prices and on log-prices; analysis of sampling error vs discretisation bias.
- Crank–Nicolson finite differences to solve the Black–Scholes PDE and benchmark accuracy against the closed-form formula.
- Extension to a gap call option, highlighting how payoff structure affects value.
-
Dynamic delta hedging
- Simulate GBM paths and replicate a short call with discrete rebalancing (monthly, weekly, daily, and intraday).
- Study how hedging frequency affects P&L bias, variance, and tail risk, and how mis-specifying the drift impacts hedging performance.
- Analyse gamma exposure: relation between average gamma along a path and hedging P&L, and discuss ways to mitigate gamma risk (higher frequency, delta–gamma hedging, scaling position).
- Create a Python 3 environment with:
numpy,pandas,scipy,matplotlib,jupyter
- Open the notebooks:
spf-assignment-1-script.ipynbspf-assignment-2-script.ipynb
- Run all cells to reproduce the simulations, figures, and numbers reported in the PDFs.
This project is meant as a compact bridge from historical return estimation to risk-neutral pricing and dynamic hedging, showing how the binomial model, Monte Carlo, PDE methods, and Black–Scholes all fit into one coherent framework.