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

Price shift before continous future roll #7868

Open
4 tasks done
ashutoshrana171 opened this issue Mar 21, 2024 · 0 comments
Open
4 tasks done

Price shift before continous future roll #7868

ashutoshrana171 opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels

Comments

@ashutoshrana171
Copy link
Contributor

ashutoshrana171 commented Mar 21, 2024

Expected Behavior

Continuous future should have prices for the new contract only after the contract is rolled to the new contract.

Actual Behavior

Continuous future have prices for the new contract before the contract is rolled to the new contract. Continuous future price should match the prices of "self.Securities[self.esContinuous.Mapped].Close". This starts to break outside regular trading hours from 19:00 - 23:59.

Example:

2022-12-13 22:00:00 :	Time: 2022-12-13 22:00:00 .... Mapped: ES16Z22 .... Close: 4063.375 .... Mapped Close: 4030.375
//Close price is the close of the new contract "Y6URRFPZ86BL" before the roll event is triggered at 00:00:00"
2022-12-13 23:00:00 :	Time: 2022-12-13 23:00:00 .... Mapped: ES16Z22 .... Close: 4069.375 .... Mapped Close: 4036.25
//Close price is the close of the new contract "Y6URRFPZ86BL" before the roll event is triggered at 00:00:00"

2022-12-14 00:00:00 :	Time: 2022-12-14 00:00:00 .... Contract rollover from ES Y4D62XFM9IPT to ES Y6URRFPZ86BL

2022-12-14 00:00:00 :	Time: 2022-12-14 00:00:00 .... Mapped: ES17H23 .... Close: 4067.625 .... Mapped Close: 4067.625
2022-12-14 01:00:00 :	Time: 2022-12-14 01:00:00 .... Mapped: ES17H23 .... Close: 4067.875 .... Mapped Close: 4067.875

Reproducing the Problem

Reference backtest
Check out prices before and after the roll event is triggered. "Continuous future" price should match "Continuous Future Mapped" prices but from 19:00 - 23:59 it starts to show prices for the next contract before the roll at 00:00

Screenshot 2024-03-26 at 10 07 49 AM

System Information

QC Cloud

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants