RSSAmplifier

Blog

From First Principles

Mathematics Without Hand Waving

benjaminwhiteside.comRSS feed ↗10 posts

Latest posts

Girsanov in SageMath

Introduction In the previous blogs we taught SageMath how to represent stochastic differential equations (as a data class), apply Ito s lemma (as part of our Ito package), derive infinitesimal generators, and connect those generators to the Kolmogorov equations. We also introduced exponential martingales in the previous blog, and now, in this blog, that implementation will [ ]

Exponential Martingales in SageMath

Introduction In the previous blog we introduced the Kolmogorov Forward and Backward equations and showed how they arise from the infinitesimal generator of a SDE. That exercise demonstrated that once the stochastic dynamics are expressed symbolically, SageMath can manipulate them in much the same way as classical calculus. In this post we extend that idea [ ]

Kolmogorov Equations in SageMath

In the previous blog posts we have built an Ito Layer over SageMath in Python, implemented the Lamperti transform, and an infinitesimal generator. This mean that we can create stochastic differential equation (SDE) objects using python commands such as to represent which tells us how the state moves locally. But in practice, nobody cares about [ ]

Infinitesimal Generators in SageMath

This article builds on previous discussions by focusing on the implementation of the infinitesimal generator in SageMath, a critical component in connecting stochastic differential equations (SDEs) to partial differential equations (PDEs). The infinitesimal generator facilitates a transition from stochastic models to deterministic equations like the Black-Scholes PDE. The article details the…

Using The Lamperti Transform in SageMath

Introduction In the previous blog post we showed how an Ito calculus layer sitting on top of SageMath can produce the Black-Scholes PDE symbolically. That experiment demonstrated that symbolic manipulation of stochastic calculus is both possible and surprisingly clean once the algebra of differentials is implemented properly. In this post we want to extend our [ ]

Deriving Black-Scholes with SageMath

In this post, I build a minimal symbolic Itô calculus layer on top of SageMath and use it to derive the Black–Scholes partial differential equation directly from the stochastic differential equation of the underlying asset. Rather than treating stochastic calculus as a sequence of handwritten manipulations, we encode quadratic variation into an algebraic structure and let the system carry out…

Introduction to SageMath

If you try to pip install sagemath, you will not get SageMath, you will only get confusion. In this blog, I will take you through my journey of getting SageMath installed and running my first commands. Only after I finished this did I realise that SageMath is effectively a full mathematics operating system that just [ ]

My First SABR Model

This post documents the construction and calibration of a normal SABR volatility surface for Bitcoin options, with a focus on scale, numerical stability, and practical implementation. Working in absolute price units, we show why normal volatility with beta = 0 provides a robust representation of BTC smiles, how careful weighting and parameter constraints are essential for calibration, and how the…

SABR in QuantLib (for CMS Pricing)

Pricing Constant Maturity Swaps correctly requires more than a flat volatility surface. In this post, we build a SABR swaption volatility cube in QuantLib from first principles, explaining how market smile quotes, ATM surfaces, and swap conventions fit together — and why getting this setup right is essential before pricing CMS products.

Getting Started with Derebit

Introduction to the Derebit exchange and its Bitcoin and Ethereum option data.