explaingit

cantaro86/financial-models-numerical-methods

6,779Jupyter NotebookAudience · researcherComplexity · 3/5Setup · moderate

TLDR

A collection of Jupyter notebooks teaching quantitative finance, option pricing, Monte Carlo simulation, Fourier methods, Kalman filtering, and portfolio optimization, combining theory with runnable Python code.

Mindmap

mindmap
  root((Quant Finance))
    Option Pricing
      Black-Scholes
      Monte Carlo
      Fourier methods
    Advanced Models
      Levy processes
      Kalman filter
      Jump diffusion
    Portfolio
      Mean-variance
      Calibration to data
    Setup
      Conda environment
      Docker container
      Python venv
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run Monte Carlo simulations to price European options using Black-Scholes in an interactive notebook you can modify and re-run.

USE CASE 2

Calibrate a jump-diffusion model to real market option data using the provided Python implementations.

USE CASE 3

Build a mean-variance portfolio optimizer by adapting the portfolio optimization notebook.

USE CASE 4

Use the Kalman filter notebook to track changing market statistics like rolling mean and variance over time.

Tech stack

PythonJupyter NotebookCondaDockerNumPySciPy

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Conda or Docker to set up the reproducible Python environment before running notebooks.

License terms are not described in the explanation.

In plain English

This repository is a collection of Jupyter notebooks covering topics in quantitative finance, the area of finance that uses mathematical models and computing to price financial instruments and manage risk. Each notebook is self-contained and combines explanations with runnable Python code, so you can read the theory and immediately experiment with it in the same document. The notebooks span several areas. Some cover standard option pricing using Monte Carlo simulation and the Black-Scholes model. Others focus on less commonly taught approaches: solving partial differential equations numerically, pricing options via Fourier methods, working with models that include random jumps in asset prices (known as Levy processes), and using the Kalman filter to track changing market statistics over time. Additional notebooks cover calibrating model parameters to real market data, pricing exotic options such as barrier and Asian options, and mean-variance portfolio optimization. The collection is aimed at students in science, finance, or economics who have completed at least one course in financial mathematics and statistics. It does not explain foundational concepts like options or stochastic processes from scratch, but every new term comes with a link to a reference for readers who need a refresher. Self-taught readers with an introductory financial mathematics background should also find the material accessible. To run the notebooks, the repository includes setup instructions for several approaches: a reproducible Conda virtual environment, a standard Python virtual environment, and a Docker container. Once the environment is set up, launching Jupyter opens all the notebooks in an interactive format where you can modify and re-run the code.

Copy-paste prompts

Prompt 1
Using the Black-Scholes notebook from cantaro86/financial-models-numerical-methods as a reference, write Python code to price a European call option with Monte Carlo simulation and plot the price distribution.
Prompt 2
Adapt the Kalman filter notebook from financial-models-numerical-methods to track a rolling mean and variance of a stock's daily returns over a one-year window.
Prompt 3
Using the Fourier option pricing methods in this repo, write Python code to price an Asian option and compare the result to a Monte Carlo estimate.
Prompt 4
Based on the mean-variance portfolio optimization notebook, write code that takes a list of stock tickers, downloads historical returns, and outputs the efficient frontier plot.
Prompt 5
How do I set up the Conda environment from cantaro86/financial-models-numerical-methods and run the Levy process notebook locally?
Open on GitHub → Explain another repo

← cantaro86 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.