QuantConnect / QuantConnect/Lean
Review Rolling Window Statistics
Open
Nobody has claimed this yet.
consistency
depth
impact-low
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
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
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the basic template algorithm from 20240101 to the present and inspect the attached Adaptable Black Camel.json output, focusing on the M1_20240131 and M1_20240229 records. Trace how rolling-window startEquity and endEquity values are produced; done means each period's startEquity matches the preceding period's endEquity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100