Programming for Quantitative Analysts
Quant programming is writing the code that turns models into working tools: Python with NumPy, pandas and SciPy for research, and C++ where speed matters. It stresses vectorised computation, clean data handling, testing numerical code and understanding floating-point behaviour, since small numerical errors can distort prices and risk figures.
Stage: Mathematical Foundations · Part of the Quantitative Analyst roadmap · Last reviewed 19 November 2026
What to learn in Programming
- Vectorise a simulation in NumPy instead of looping over paths
- Clean and align price data in pandas with correct handling of gaps
- Profile slow code and decide when C++ or Numba is justified
- Write unit tests that check a function against a known analytic value
- Explain floating-point rounding and why equality tests on floats fail
- Structure research code so results can be reproduced
Programming interview questions
Why do quant teams use both Python and C++?
Python offers fast research, rich libraries and easy data work. C++ gives low latency and control over memory, so it suits production pricing engines and execution systems. A common pattern is prototyping in Python and rewriting hot paths in C++.
How do you speed up a Monte Carlo simulation in Python?
Generate all random numbers as arrays and use vectorised operations instead of loops, reduce variance with antithetic variates, or compile hot loops with Numba. Profile first to find the real bottleneck, then parallelise independent paths.
Where Programming fits in the Quantitative Analyst roadmap
Programming belongs to the Mathematical Foundations stage (intermediate level), which takes about 48 hours. The toolkit.
Other units in this stage
Back to the full Quantitative Analyst roadmap