Series
Finding P values and false hope: A Guide to Risk and Quant Finance
From simple bets to complex bond portfolios. Explore the mathematical structures of uncertainty, debt mechanics, and the Python tools used to model them.
By Nathan Updated 2 min Intermediate
On this page
Quantitative finance is often shielded behind a wall of intimidating jargon and Greek letters. This series tears that wall down. We treat financial markets not as mystical entities, but as complex, non-stationary data systems that can be modeled, simulated, and stress-tested.
By moving from the historical “philosophy of risk” to hands-on Python implementations of Mean-Variance Optimization and Monte Carlo VaR, we audit the mechanisms that move global capital. How do you price a bond when interest rates are a moving target? How do you engineer “safety” out of a pool of risky loans? This series is a rigorous audit of the math that powers Wall Street.
The Curriculum
- 01
The Art of Losing Slowly: Risk, Variance, and Decision-Making
Learn why a positive expected value can still ruin you. Risk, variance and the risk of ruin, explained in Python with an interactive model.
- 02
Loans and Bonds: The Mechanics of Borrowing and Default Risk
A quantitative guide to loan amortization and bond pricing. Learn to derive payment formulas, simulate default risk, and understand coupon rates using Python.
- 03
Life in the Tranches: Understanding CDOs and Risk Waterfalls
Learn how CDO tranching splits credit risk into Senior, Mezzanine, and Equity layers, with a step-by-step Python waterfall simulation.
- 04
The Geometry of Interest: Constructing Yield Curves and Forward Rates
Bootstrap a yield curve from real bond prices in Python, read the forward rates hidden inside it, and discount future cash flows honestly.
- 05
Stock Analysis with Python: Modeling Prices, Returns & Distributions
Pull real stock prices with yfinance, turn them into daily returns, and see why the normal distribution underestimates crashes in the tails.
- 06
Portfolio Allocation: The Math Behind the Efficient Frontier
Derive Markowitz mean-variance optimization and build the efficient frontier from scratch in Python, then see why the optimal portfolio is fragile.
- 07
Stock Options 101: A Guide to Calls, Puts, and Pricing
Learn calls and puts from the payoff diagram up, build multi-leg strategies, and see why selling premium is positive-EV with a catastrophic tail.
- 08
Value at Risk (VaR) vs. CVaR: A Practical Guide for Investors
Build Value at Risk and Conditional VaR from return data in Python, and see why VaR hides the tail loss that actually bankrupts a portfolio.
- 09
The Random Walk: From Coin Flips to Stochastic Calculus
Watch a coin-flip random walk become the Wiener process, meet the heat equation behind diffusion, and simulate Brownian motion in Python.
- 10
Itô's Lemma Explained: Stochastic Calculus for Finance
Why the ordinary chain rule breaks for random processes, and how Ito's Lemma fixes it. Derive geometric Brownian motion with a live simulator.
- 11
The Black-Scholes Equation: Building an Option Pricer From Scratch Coming soon
Derive the Black-Scholes PDE from a replicating portfolio, solve it into the closed form, and compute the five option Greeks in Python.
- 12
Why Build an Exchange? Where Prices Actually Come From Coming soon
How a matching engine turns orders into prices: limit order book anatomy, price-time priority, and why a backtest cannot tell you if you filled.
Technical Stack & Methodology
This series bridges the gap between financial theory and production-grade data science:
- Data Acquisition: Real-time and historical data fetching using
yfinance. - Numerical Computing: Matrix algebra and optimization using
NumPyandSciPy. - Modeling:
- Stochastic Simulation: Monte Carlo methods for path-dependent outcomes.
- Optimization: Lagrange Multipliers for constraint-based asset allocation.
- Inference: Bootstrapping and interpolation for curve fitting.
- Visualization: Detailed risk-return plotting using
MatplotlibandPandas.
What You’ll Learn
- The Math of Money: How to calculate the “fair” price of risk and time.
- Structural Integrity: How complex products like CDOs are built (and why they break).
- Modern Allocation: How to build a portfolio based on covariance, not just “gut feeling.”
- Tail Risk Awareness: Why standard bell curves fail in a crash and how to model the “unlikely” 1% event.
Disclaimer: This series is for educational and analytical purposes only. Quantitative models are approximations of reality, not guarantees of profit. All trading involves substantial risk of loss.
Ready to build?
Get the next part
New parts of Finding P values and false hope land in your inbox the day they publish. No spam, unsubscribe in one click.
We send your address to Kit, our email provider, and ask you to confirm by email before anything is sent. See our Privacy Statement.