Courses

Systems Programming for Trading

AdvancedPremium6 sections · 27 lessons · 68 questionsLog in to track progress

Most top trading firms run their trading systems in C++, and they do not interview on it the way a general technology company does. The algorithm round is table stakes. What separates the offers is a set of questions a generic platform never asks: what does virtual cost, what exactly does std::move do to the object you moved from, why is this counter wrong without a mutex and still wrong with a relaxed atomic, and here is a working program, find the leak.

That material is under-served for a simple reason. It is hard to auto-grade, so LeetCode and HackerRank do not carry it, so nobody drills it, so the firms that do ask it get a very clean signal. One major assessment bans Python outright. Another is C++ or nothing. A third opens with ten multiple-choice questions on language semantics before you write a line. Candidates have been asked to decide whether an address is on the stack or the heap, and then to explain the memory layout that makes the answer possible.

This course is that material, in six parts. C++ internals covers where objects live, who owns them, and what the language does behind each construct you type. Concurrency from scratch builds the primitives rather than calling them: condition variables, atomics, a lock-free queue for one writer, a thread pool. Compile-time programming covers the template work that the C++-first firms all probe. The fourth part is the round almost nobody practises, where you are handed broken code and given an hour. The fifth covers the systems round: the cache hierarchy, the network path to a feed handler, and measuring latency honestly. The sixth is the design round, both on one machine and across many.

It assumes you can already write correct C++ and read a header without flinching. If you want the algorithmic and Python side of the same pipeline, that is Programming for Quantitative Developers.

The practice links at the end of these lessons drill the same material in our coding catalogue. Every one of them is a C++ problem, compiled and run on the server-side judge, and each card shows the difficulty and the time to budget before you open it.

What the Machine Does With Your ObjectObject layout, padding and alignment, where a value actually lives, and why a trading firm asks you to tell the stack from the heap.Free previewOwnership, RAII and the Rule of FiveWho frees this, and when? The one question C++ makes you answer explicitly, and the five functions that answer it.Move Semantics Without the Folklorestd::move moves nothing. What the moved-from object is afterwards, the four situations where your move quietly becomes a copy, and the return statement that pessimises.Virtual Dispatch and What It CostsThe vtable, the indirect call, and the cost that is not the indirect call. Three ways to get polymorphism without it, and when the cost is worth paying.Allocators and Where Memory Comes FromWhat new actually calls, why the general allocator is too slow for a hot path, and the three special-purpose allocators worth being able to write.Type Erasure and the Cost of a CallableWhat std::function stores, why it sometimes allocates, and the same machinery inside shared_ptr. A reported C++ interview question, answered properly.Virtual Memory and the Kernel BoundaryWhat actually happens when you touch an address: page tables and the TLB, the faults that make first runs slow, and why hot paths avoid the kernel.Container Costs and Iterator InvalidationWhat each standard container costs once memory is involved, which operations leave your iterators and pointers dangling, and the erase loop that crashes.Floating Point and Undefined BehaviourWhat a double can and cannot hold, the comparisons NaN breaks, and why the compiler is allowed to delete your overflow check.What Changed From C++11 to C++20The features from each standard that trading code actually uses, the ones that cost nothing at runtime, and four new ways to refer to the wrong object.

Keep reading Systems Programming for Trading

27 lessons in this course, and every other premium course, on one subscription.

  • Every lesson in every course, with the worked examples and interactive simulators
  • Graded questions on every lesson, with explanations for the wrong answers as well as the right one
  • The trainers, timed assessments and brainteaser library that go with them