Quantitative Trading · Level III · Elective
Python for Trading III
Production Python for trading: running strategies as services, storing tick data, monitoring, testing and continuous integration, profiling, and deployment. It supports Level III's systems modules and the final project.
What you will be able to do
- Run strategies as reliable services with scheduling and state.
- Store and query tick data efficiently.
- Monitor, test, profile and deploy trading code.
Section 1 of 2
Services and scheduling
Long-running components (feed handlers, order managers) run as services that start on boot, restart after crashes and stop cleanly. On Linux this is usually systemd; containers add isolation and reproducible environments.
Scheduled jobs (data downloads, daily rebalances, reports) run from a scheduler that knows the market calendar. Jobs should be idempotent and record their runs.
Graceful shutdown matters: a service stopping should finish or cancel in-flight work, persist its state and close connections, so a restart begins from a consistent point.
Keep this in mind: Run services under a supervisor with restart limits and clean shutdowns.
Make the idea stick
Quick checks before you move on.
Quick check 1 of 2 · Services and scheduling
Why limit automatic restarts?
Quick check 2 of 2 · Services and scheduling