A115 Logo Dark A115 Logo Light

A115 is a London-based consultancy helping fast-growing businesses and scale-ups build sophisticated on-prem or cloud-based technology platforms when code quality matters.

We specialise in rapidly building, securing and scaling cloud-native greenfield platforms to add new capabilities or expand into new markets. With over 20 years' experience productionising experimental code and complex systems, A115 provides end-to-end services - from initial architecture and infrastructure design through development, deployment and maintenance. Leveraging expertise across industries and technologies like Python, SQL, AWS and Azure, A115 enables clients to launch innovative products faster while ensuring robustness, resilience and regulatory compliance.

A115

Training and Consulting

Bookmark this page and check again soon for our personalised individual or team training packages and offers!

London, United Kingdom (HQ)

contact@a115.co.uk
Python Training

From Code to Quant

A Software Engineer's Guide to Stochastic Calculus through Shreve's Lens

As a software engineer diving into quantitative finance, you might feel like you're entering a parallel universe. The familiar terrain of deterministic algorithms and discrete state machines gives way to a world where randomness isn't just a bug – it's a feature. This is where Steven Shreve's two-volume masterpiece, "Stochastic Calculus for Finance," becomes your trusted guide through this fascinating landscape.

Think of stochastic calculus as the mathematics of uncertainty. While traditional calculus helps us understand how things change when we can predict them perfectly, stochastic calculus deals with changes that have an element of randomness. If you've ever written code to simulate random walks or implemented Monte Carlo methods, you've already dipped your toes into these waters.

Shreve's approach is particularly interesting because he splits the journey into two distinct paths. Volume I is like learning to walk before you run, focusing on what's called the binomial model. Imagine you're writing a simple trading bot. In the binomial model, at each time step, the price of an asset can only go up or down by certain amounts. It's like having an if-else statement at each moment in time. This discrete approach should feel natural to any programmer who's comfortable with binary trees and recursive algorithms.

The beauty of Volume I lies in how it builds intuition. Just as you might prototype a complex system with a simplified MVP, Shreve uses this basic model to introduce fundamental concepts like arbitrage (think: exploiting inconsistencies, like finding a bug that lets you generate free money), risk-neutral pricing (imagine simulating many possible futures and averaging them with carefully chosen weights), and hedging (like writing defensive code to protect against unexpected inputs).

Volume II is where things get more sophisticated. It's like moving from discrete time steps to continuous time, from integers to real numbers, from simple arrays to infinite-dimensional spaces. This is where you'll encounter Brownian motion – imagine a drunk person's random walk, but with infinitely small steps taken infinitely often. If you've ever implemented a physics engine or worked with continuous signal processing, you'll appreciate the challenges of moving from discrete to continuous models.

The transition from Volume I to II is similar to moving from procedural programming to functional programming – it requires a different way of thinking. Just as functional programming introduces concepts like immutability and higher-order functions that might seem abstract at first but offer powerful tools for reasoning about programs, stochastic calculus introduces concepts like martingales and Itô's lemma that provide powerful tools for reasoning about random processes.

One particularly interesting aspect that Shreve covers is measure theory. For a software engineer, you can think of this as type theory for randomness. Just as type systems help us reason about what operations are valid on different kinds of data, measure theory helps us reason about what operations are valid on different kinds of random processes. It's abstract, yes, but so is the concept of a monad when you first encounter it in functional programming.

The books' exercises are particularly valuable. They're not just theoretical – many of them could be implemented as coding projects. You could create simulations of option pricing models, implement numerical methods for solving stochastic differential equations, or build monte carlo simulations to validate theoretical results. This hands-on approach makes the material more concrete and helps bridge the gap between theory and practice.

However, it's worth noting that these books, especially Volume II, require significant mathematical maturity. If your linear algebra is rusty or you haven't thought about calculus since college, you might want to refresh these skills first. Think of it as learning the necessary design patterns before diving into a complex framework.

What makes Shreve's work particularly valuable is its balance between rigor and intuition. While other texts might dive straight into the deep end of measure theory, Shreve builds up to it gradually, always maintaining a connection to financial applications. It's like learning a new programming paradigm through practical examples rather than abstract theory.

For software engineers looking to transition into quantitative finance, these books offer a solid foundation. The progression from discrete to continuous models mirrors many patterns in computer science, from discrete time simulation to real-time systems, from finite state machines to continuous control systems. The mathematical tools you'll learn here have applications beyond finance – they're useful in any domain where you need to reason about systems with uncertainty, from robotics to artificial intelligence.

Remember, just as you didn't learn to code by reading books alone, you won't master stochastic calculus without practice. Implement the concepts, experiment with simulations, and most importantly, maintain your curiosity about how randomness can be tamed with mathematics. The journey from deterministic algorithms to stochastic processes is challenging but rewarding, and Shreve's books are excellent companions for this journey.