Version Control for Strategy Code and Parameters
Posted: Wed Oct 28, 2026 2:03 am
Strategy results depend on two things: the logic and the numbers fed into it. Many traders track the first by saving copies named final, final2 and final_really, and track the second not at all. Months later, nobody can say which settings produced a particular result.
A version control system records every change with a message and a timestamp, allows comparison between any two states, and makes it possible to return to an earlier one. Parameters benefit from living in a separate configuration file under the same history, so a change to a stop multiple appears as a clear, reviewable edit instead of a hidden tweak inside the code.
Tags mark the exact state that went live, and a short note records why each change was made. When live behaviour drifts from backtests, the history shows whether code, settings or neither changed. Branches allow experiments without disturbing the version that is trading.
Some discipline helps. Committing before a backtest and recording the commit identifier with the result makes that result reproducible. Credentials should stay out of the repository entirely. Even for a single person working alone, the log works as a memory aid and as protection against the temptation to retrofit a story onto a result.
A version control system records every change with a message and a timestamp, allows comparison between any two states, and makes it possible to return to an earlier one. Parameters benefit from living in a separate configuration file under the same history, so a change to a stop multiple appears as a clear, reviewable edit instead of a hidden tweak inside the code.
Tags mark the exact state that went live, and a short note records why each change was made. When live behaviour drifts from backtests, the history shows whether code, settings or neither changed. Branches allow experiments without disturbing the version that is trading.
Some discipline helps. Committing before a backtest and recording the commit identifier with the result makes that result reproducible. Credentials should stay out of the repository entirely. Even for a single person working alone, the log works as a memory aid and as protection against the temptation to retrofit a story onto a result.