Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review Rolling Window Statistics #8232

Open
4 tasks done
AlexCatarino opened this issue Jul 29, 2024 · 1 comment
Open
4 tasks done

Review Rolling Window Statistics #8232

AlexCatarino opened this issue Jul 29, 2024 · 1 comment

Comments

@AlexCatarino
Copy link
Member

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",

Adaptable Black Camel.json

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 master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
@jaredbroad
Copy link
Member

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants