C++ for Quant Trading: A Step-by-Step Roadmap
Why trading firms bet on C++, the exact concepts to master, the best resources, and a week-by-week plan that takes you from basics to low-latency interview ready.
Ask any quant developer at a prop shop why they write C++ and the answer is always some version of the same thing: it is the only mainstream language that gives you predictable, direct control over memory and latency. Python is where the researchers prototype. C++ is where the money gets moved.
This is a practical roadmap for learning C++ specifically for trading firms, in the right order, with the right resources, and a week by week plan. If you already know another language, you can move faster. If C++ is your first serious language, give yourself the full timeline.
Why trading firms use C++
Trading is a latency game. When a market data packet arrives, the time between that packet hitting the network card and your order leaving the building is measured in nanoseconds. Garbage collection pauses are unacceptable. Dynamic dispatch at the wrong moment is unacceptable. You need to know exactly what your code is doing with memory and CPU.
C++ gives you that. Raw pointers, stack allocation, manual cache control, inline assembly if you need it. The cost is that you, the programmer, are responsible for correctness. The language will happily let you dereference a dangling pointer and corrupt your process.
Firms also have enormous existing codebases. Decades of accumulated C++ at Citadel, Optiver, IMC, HRT, Jump, and DRW mean the hiring bar assumes fluency, not just familiarity. Interviewers will test whether you understand the machine, not just the syntax.
The obvious exception is Jane Street, which runs OCaml almost everywhere, and there are Rust holdouts appearing at the edges of a few firms. But if you are optimising for the number of doors a single language opens in trading, C++ is still the answer by a wide margin.
What to master, in order
Skip around and you will build a shaky foundation that shows up in interviews. Go roughly in this order.
The core language. Pointers and references, stack versus heap, the rule of three and rule of five, copy versus move semantics, const correctness, and how references actually compile to pointers. Most candidates think they know this. Most candidates are wrong about at least one of these under pressure.
The standard library. Vectors, maps, unordered maps, strings, and algorithms. Know the complexity of every container operation cold. Interviewers love asking "what is the amortized cost of vector::push_back" and then asking why it is amortized.
Object oriented and generic programming. Classes, inheritance, virtual functions, vtables, and when the vtable lookup actually costs you. Then templates, which is where the language gets powerful and strange. Understand how templates are instantiated and why template code lives in headers.
Move semantics and smart pointers. Rvalue references, std::move, std::unique_ptr, std::shared_ptr, and why shared pointers are usually a smell in latency critical paths. This is where modern C++ diverges hard from the C with classes that many people write.
Concurrency. Threads, mutexes, atomics, condition variables, and the memory model. Then the fun part: lock free data structures. A single producer single consumer queue is the canonical interview question at trading firms, and it is the foundation of most real trading systems.
Performance. Cache lines, false sharing, branch prediction, data oriented design, and profiling with tools like perf. The best interview candidates can explain why iterating over a vector of structs can be faster or slower than a struct of vectors depending on access patterns.
Resources worth your time
The good news is the best resources are free.
learncpp.com is the single best starting point and it is completely free. Work through it if you are new to the language.
cppreference.com is the reference you will keep open forever. It is dry but authoritative.
"C++ Primer" by Lippman is the standard textbook and still holds up. "A Tour of C++" by Stroustrup is shorter and aimed at people who already program. "Effective Modern C++" by Scott Meyers is the book for the move semantics and template era, and it reads well.
CppCon talks on YouTube are a goldmine. Herb Sutter and Chandler Carruth in particular. Watch one a week and you will absorb the mental model of how the machine actually works.
Godbolt Compiler Explorer is not a course but a habit. Paste a snippet and read the assembly. Nothing teaches you what the compiler does faster than seeing the output.
For trading specific practice, we built a set of C++ exercises that mirror what firms ask: lock free queues, order book design, memory pool implementations, and cache friendly data structures. Each one has a solution you can run in the browser.
A 12 week roadmap
This assumes roughly 60 to 90 minutes a day. Adjust if you have more or less time.
Weeks 1 to 3: the language core. Work through learncpp.com chapters on variables, functions, pointers, references, and the stack versus heap. Write small programs. Get comfortable compiling and reading errors. If you already program, skim these weeks.
Weeks 4 to 5: classes and memory management. Constructors, destructors, copy and move. Implement a simple String class that manages its own buffer. This one exercise forces you to understand the rule of five better than any tutorial.
Weeks 6 to 7: the standard library. Containers, iterators, and algorithms. Drill the complexity questions. Start a habit of writing the loop, then replacing it with the equivalent std::algorithm.
Weeks 8 to 9: templates and smart pointers. Generic functions and classes, type deduction, and ownership. Read Effective Modern C++ during this window.
Weeks 10 to 11: concurrency. Threads and mutexes first, then atomics and the memory model. Implement a single producer single consumer ring buffer. Then try the lock free version. This is the highest value exercise on the list for trading interviews.
Week 12: performance and review. Cache lines, false sharing, profiling. Revisit everything you built and ask whether it is cache friendly. Do mock problems under time pressure.
Throughout, keep two things going in parallel. Solve the C++ tagged problems on PuzzledQuant, which filter the problem set to C++ interview questions from real firms. And write code every single day. Reading about C++ without writing C++ is how you become the candidate who can describe a vtable but cannot compile a template.
What interviewers actually test
To close, here is what the interview loop looks like for a C++ focused quant developer role.
The screen is usually a coding problem in C++ with a live interviewer, often with a focus on a standard library container or a small class design. Onsites add a systems round, where you design something like an order book or a memory pool and defend the latency implications of every choice. Some firms add a lock free programming round, which is where the ring buffer practice pays off.
You do not need to be a language lawyer. You need to write correct, idiomatic modern C++, explain what it does at the machine level, and reason about latency. That is learnable in three months with the plan above.
The firms are not looking for genius. They are looking for someone who understands the machine well enough not to be surprised by it. Start with the C++ exercises and build from there.