Continuous Deployment and Release Gates
Automatically shipping code changes to production once they pass their checks, and the deliberate checkpoints — release gates — that decide what's allowed to count as "passed" before a trading system goes live with real money.
Prerequisites: Continuous Integration Pipelines
Continuous integration catches broken code before it merges. Continuous deployment (CD) goes one step further: once a change passes its checks, it's automatically pushed live — to a website, an internal tool, in some organizations even to a trading system — with no human clicking "deploy." For most software this is a strength: shipping faster, in smaller increments, with less manual toil. For a trading system, shipping automatically the moment tests pass is rarely the whole story, because passing a test suite and being safe to run with real capital are not the same claim. A test suite only checks what someone thought to write a test for.
This is where release gates come in: additional, deliberate checkpoints a change must clear before deployment, beyond "the automated tests are green." A gate might require a specified number of days running successfully in paper trading or shadow mode, a human sign-off from a risk officer, a check that a strategy's live parameters fall within pre-approved bounds, or confirmation that a kill switch is wired up and tested for the new code path. Release gates turn continuous deployment from "ship the instant it's technically correct" into "ship once it's technically correct and has cleared the specific additional checks this kind of change requires."
Worked example. A quant firm's CD pipeline is set up so that changes to an internal research dashboard deploy automatically the moment CI passes — low risk, easily rolled back, no gate needed beyond the tests themselves. Changes to the live order-execution engine go through the same CI pipeline, but deployment to production is gated behind three additional checks configured in the pipeline: the change must have run for at least 48 hours in shadow mode against live data without discrepancies from the current production version, a second engineer must explicitly approve the pull request, and a risk limit checker must confirm no order-sizing logic changed without a corresponding sign-off. A change that passes all unit and integration tests but hasn't yet accumulated 48 hours of shadow-mode running is blocked automatically — the pipeline won't deploy it no matter how green the tests are, until that gate clears too.
What this means in practice
The right amount of automation scales with the cost of being wrong: a broken dashboard is an inconvenience, a broken order-execution path can lose real money in minutes, so the two deserve very different gates even inside the same CD pipeline. Fully automatic deployment isn't inherently reckless and manual deployment isn't inherently safe — what matters is whether the gates in front of deployment actually check the things that would make a change unsafe, not just whether a human happened to look at it.
Continuous deployment automates shipping changes once checks pass; release gates define what "passed" actually requires beyond green tests — shadow-mode running, human approval, risk-limit checks — and should be stricter the more capital a change touches.
Treating "CI is green" as equivalent to "safe to trade live" is a common and costly mistake. Automated tests only check the specific behaviors someone thought to write a test for; they say nothing about how a strategy behaves on data patterns nobody anticipated. Release gates for anything touching live capital should require evidence beyond the test suite — shadow-mode performance, human review — not just a passing pipeline.
Related concepts
Practice in interviews
Further reading
- Humble, Jez and Farley, David. Continuous Delivery, ch. 1