Lean
Lean copied to clipboard
Review Rolling Window Statistics
trafficstars
Expected Behavior
The start of a period matches the end of the previous period.
Actual Behavior
LEAN uses one data point after the end of the previous period.
M1_20240131
"startEquity": "100000",
"endEquity": "102316.2412",
...
M1_20240229
"startEquity": "102179.3097", // <--- it should be 102316.2412 ?
"endEquity": "107670.2602",
Potential Solution
N/A
Reproducing the Problem
Run basic template algorithm from 20240101 to date.
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
- [x] I have provided detailed steps to reproduce the issue
- May 31st close prices are not equal to June 1st close prices so we don't expect month open to equal month close.
- For perfection we should ensure we're sampling daily prices at market open and not end of day June 1st (June 2nd) which would be lagged 1 day.