Skip to content
Computations in Finance
Computational FinanceLecture 08Chapter 04Starts 1:06:05

Implementation of the COS Method in Python

A focused guide to this chapter from Fourier Transformation for Option Pricing. Watch the teaching segment below or explore the concept before opening the video on YouTube.

Understanding Implementation of the COS Method in Python

Implementing the COS method in Python means building expansion coefficients from a characteristic function and evaluating the resulting truncated cosine series. The lecture tests the method on distributions whose densities are known, so accuracy and computational time can be measured directly.

Why it matters in practice

An effective implementation checks what happens as the number of expansion terms increases and examines errors across the relevant state range. Working first with a normal test case makes it easier to detect a sign convention or interval mistake before moving to a more complicated option-pricing model.

From the Computational Finance course

This topic is chapter 4 of Lecture 8: Fourier Transformation for Option Pricing. Explore the lecture slides and code ↗. Subscribe on YouTube ↗.

← Back to the topic library · Lecture 8