I've been trying to run an optimization <DOW 30>. However, based on my output logging it seems that the optimizer is trying to load SPY as the primary instrument for a bulk of the optimization runs.
This is what it should look like:
Startup [SPYWeekly-BAC] Classes Setup -> Setup complete.
Startup [SPYWeekly-BAC] Logging Setup -> No summary logging requested.
Startup [SPYWeekly-BAC] Instrument List Setup -> Adding BAC.
Startup [SPYWeekly-BAC] Instrument List Setup -> Adding SPY.
Startup [SPYWeekly-BAC] Instrument List Setup -> Setup complete.
Startup [SPYWeekly-SPY] ##### Starting up strategy. Startup [SPYWeekly-SPY] Classes Setup -> Setup complete. Startup [SPYWeekly-SPY] Logging Setup -> No summary logging requested. Startup [SPYWeekly-SPY] Instrument List Setup -> Adding SPY. Startup [SPYWeekly-SPY] Instrument List Setup -> Setup complete.
When running the optimization on single instruments (non-basket) the results are still unstable and change every time it is re-run. However, it doesn't seem to be loading SPY as the primary instrument.
When the secondary series is retained, but the hedging logic removed (i.e. SPY is added to the strategy but is not accessed/traded), the problem still remains.
When the secondary series is removed, the basket optimization works fine, and provides stable/replicable results. Backtesting is also fine and stable, even with the secondary series added.
If it matters, I have IsInstantiatedOnEachOptimizationIteration = true;
Comment