5  Companion Code

Python notebooks reproducing every numerical result

License: PolyForm Noncommercial 1.0.0 Python 3.10+ Tests Binder

5.1 What it contains

Eight Jupyter notebooks that reproduce every numerical result from the lectures:

Notebook Topic Sessions
01_ou_calibration Ornstein-Uhlenbeck process: simulate, calibrate S04, S19, S22
02_pi_term_structure Fit pi(L,T) to secondary market discount data S05, S17
03_exit_boundary Solve the HJB free-boundary problem for L*(t) S11, S12, S20, S25
04_pme_la_irr_la_pme Compute IRR / PME / LA-IRR / LA-PME S07
05_mfg_solver Mean-field game fixed-point iteration S21, S26
06_jensen_bias Quantify Jensen bias by asset class S23, S29
07_stress_scenarios Portfolio stress testing under L-shock paths S18
08_pigouvian_tax Compute tau*(L) and welfare gap closure S24, S29

Each notebook is self-contained, runs in under 30 seconds, and uses synthetic data. Drop in real data when you have it.

5.2 How to run

Binder

Click the badge above. Binder launches a free JupyterLab in your browser with everything pre-installed. First build takes 2-3 minutes; subsequent visits are 30 seconds.

5.3 For students

Track 1 (practitioner): Focus on notebooks 01, 02, 03, 04, 07.

Track 2 (researcher): Focus on notebooks 03, 05, 06, 08.

Capstone project: Fork the repo, replace the synthetic data with your project’s data, and submit your notebook with the final paper. Code submissions get +5% bonus on the project grade.

5.4 License

This code is released under the PolyForm Noncommercial License 1.0.0.

Permitted: classroom teaching, student coursework, academic research, and personal study.

Not permitted without prior written consent: commercial use, SaaS deployment, resale, incorporation into competing valuation products, or use by for-profit organizations outside their internal research and education functions.

The production GE-LAV® engine at liquidityillusion.com is separately licensed and not covered by this repository.

For commercial licensing: drsamirasaf@gmail.com

5.5 Need help?

Open an issue on the GitHub repo, or email drsamirasaf@gmail.com.