Expected Behavior
When we warm up an indicator and it's window, the window is full and the values in the window are valid.
Actual Behavior
(1) If we warm up an indicator in initialize, the value at window[0] is always 0 when the warm-up period ends. If we warm up the indicator in on_securities_changed instead, the value for window[0] is correct when the warm-up period ends.
https://www.quantconnect.cloud/backtest/638c957f4ccc909034828b4cea841a0b/?theme=darkly
Quit(): self._spy_roc1.window is incorrect. Expected: [0.008, -0.0079, -0.0051, 0.0056, 0.0161]; Actual: [-0.0079, -0.0051, 0.0056, 0.0161, 0.0]
(2) I also tested it with the midprice indicator and the windows aren't the same. There is no 0 value, but the window that I create in initialize has a duplicate value
https://www.quantconnect.cloud/backtest/f521f839765060296928a2b7c97299b1/?theme=darkly
Quit(): self._spy_midprice2.window is incorrect. Expected: [363.6499, 366.1296, 365.2423, 364.3597, 361.6605, 367.3812]; Actual: [366.1296, 365.2423, 364.3597, 361.6605, 367.3812]
Quit(): self._spy_midprice1.window is incorrect. Expected: [363.6499, 366.1296, 365.2423, 364.3597, 361.6605, 367.3812]; Actual: [365.2423, 364.3597, 361.6605, 367.3812, 367.3812]
Potential Solution
N/A
Reproducing the Problem
Run the algorithms above
System Information
QC Cloud
Checklist
Expected Behavior
When we warm up an indicator and it's
window, thewindowis full and the values in thewindoware valid.Actual Behavior
(1) If we warm up an indicator in
initialize, the value atwindow[0]is always 0 when the warm-up period ends. If we warm up the indicator inon_securities_changedinstead, the value forwindow[0]is correct when the warm-up period ends.https://www.quantconnect.cloud/backtest/638c957f4ccc909034828b4cea841a0b/?theme=darkly
(2) I also tested it with the
midpriceindicator and the windows aren't the same. There is no 0 value, but the window that I create in initialize has a duplicate valuehttps://www.quantconnect.cloud/backtest/f521f839765060296928a2b7c97299b1/?theme=darkly
Potential Solution
N/A
Reproducing the Problem
Run the algorithms above
System Information
QC Cloud
Checklist
masterbranch