Roadmap Start learning
QD02IntermediateQuant DeveloperEasy
Python Software Engineering
Clean, modular, typed and tested Python, profiling, and the scientific libraries research teams depend on.
1.3 h of lessons~1.4 h of practice across 5 problems
Prerequisites not done
Lessons0 / 5 lessons
Mastery · target 80%0 / 5 solved
Completing the lessons finishes the module. Mastery also needs 80% of its problems solved.
What you will be able to do
- Structure a Python package with clear module boundaries
- Use type hints and a type checker to catch errors early
- Write unit tests with fixtures and parametrisation
- Profile Python code and remove the actual bottleneck
- Wrap numerical libraries without losing their performance
Before you start
Prerequisites: this module uses their material directly.
Lessons
1.Clean Code and Modular DesignFunctions with one job, a pure core with I/O at the edges, dataclasses for records and configuration, package layout and dependency direction, shown by refactoring a small option-pricing script.16m2.Type Hints and mypyAnnotations, Optional narrowing, generics with TypeVar, structural typing with Protocol, TypedDict, variance, and how to run mypy and read what it reports.15m3.Testing with pytestTest layout, fixtures, parametrize and pytest.raises, tolerances with pytest.approx, property tests over random inputs, and testing Monte Carlo code with seeds and standard errors.17m4.Profiling PythonMeasure before optimising: cProfile and pstats, tottime versus cumtime, timeit done properly, line-level profiling, Amdahl's law, and what vectorising typically buys.15m5.Scientific Computing LibrariesWhat NumPy, pandas and SciPy are each for in an engineered codebase, memory layout and strides, avoiding hidden copies at library boundaries, and when to drop to Numba, Cython or C++.16m
Practice problems (5)
Where this module fits
- Quant Developer: Recommended; optional for Low-Latency C++; required for Python Research Engineering; required for Quant Platform Engineering