Skip to content

A compact coursework repository combining empirical S&P 500 return modelling with binomial-tree and Black-Scholes option pricing, including numerical methods and dynamic hedging.

Notifications You must be signed in to change notification settings

Milanpeter-77/Coursework-Binomial-Tree-Black-Scholes-Model

Repository files navigation

Coursework – Binomial Trees & Black–Scholes Model

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.


Repository structure

  • 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.

Part I – Return modelling & index dynamics

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.

Part II – Option pricing & dynamic hedging

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).

How to run

  1. Create a Python 3 environment with:
    • numpy, pandas, scipy, matplotlib, jupyter
  2. Open the notebooks:
    • spf-assignment-1-script.ipynb
    • spf-assignment-2-script.ipynb
  3. 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.

About

A compact coursework repository combining empirical S&P 500 return modelling with binomial-tree and Black-Scholes option pricing, including numerical methods and dynamic hedging.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published