The help documentation states "context is an augmented Python dictionary used for maintaining state during your backtest or live trading session. context should be used instead of global variables in the algorithm. "
My understanding of context is that it is in-memory python dictionary, so state stored in context won't persist when algorithm is restarted. Is that correct? Is there any way I can maintain state of some variables across algorithm restarts ?
To be specific I have a variable that I store in context (say context.X). Over the course of a couple of days the value of context.X changes. If algorithm ever quits and is restarted I want to know what value was stored last in context.X.