Skip to content
Linear Algebra, Optimisation and Numerical Methods / Numerical methods and calibration

Implementation Lab

A research calculation needs reproducible outputs and explicit failure conditions. This lab implements three deterministic NumPy checkpoints: an OLS / linear solve, a Cholesky (or eigenvalue) PSD check, and a Newton bond-yield root. Outputs appear as comments. One assertion checks a known analytic value from Least Squares and Regression Geometry.
Learning objectives. By the end of this note you should be able to:
  • solve a small least-squares problem in NumPy and verify the normal equations;
  • factor a PD covariance with Cholesky and confirm LL⊤=ΣLL^\top=\Sigma;
  • recover a par yield by Newton and match the known root;
  • treat these blocks as templates for larger research code.

In this lesson

  1. Lab 1 — Least squares
  2. Lab 2 — Cholesky and eigenvalues
  3. Lab 3 — Newton bond yield
  4. How the three blocks connect

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Linear Algebra, Optimisation and Numerical Methods syllabus.