Initialization and State Persistence in Daily Simulated Trading
Summary
This short platform discussion addresses whether a strategy initialization routine runs once in backtests but each day in simulated live trading. The response explains that live trading parameters are reloaded each trading day, so simulation follows that daily reload behavior. Strategy authors should therefore avoid assuming that in-memory variables automatically survive from one day to the next.
For values that need to persist across daily restarts, the suggested approach is to save them to a file and load them again on the following day. This is operational guidance about managing strategy state, rather than a trading signal or performance analysis. The post provides no platform-specific code, examples, or evidence comparing backtest and simulation behavior beyond the brief answer, so implementation details should be checked against the target platform's actual lifecycle rules.
Key ideas
- Simulated live trading reloads strategy parameters at the start of each trading day.
- Do not assume that in-memory variables persist through the daily reload.
- Values needed on the next day can be saved to a file and loaded again.
- The discussion gives no code or comparative test of lifecycle behavior.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.