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

Validate NYSE & NASDAQ historical market hours #5

Open
Troubladore opened this issue Oct 31, 2023 · 0 comments
Open

Validate NYSE & NASDAQ historical market hours #5

Troubladore opened this issue Oct 31, 2023 · 0 comments

Comments

@Troubladore
Copy link

It would be helpful to have an example Nautilus "strategy" designed to test fincal's ability to represent market hours. This would double as a demonstration piece for others interested in using the component.

The strategy will subscribe to historical data at a resolution of 1 minute (e.g. 1 min bars). The strategy will raise an event every minute, checking to see whether our historical data provider (currently Polygon) agrees with our master market hours repository, outputting any discrepancies. While we could do this more quickly/easily with a direct data comparison between fincal and our provider, we'll want all this tooling for strategy development anyhow, so it's useful to just use the Nautilus engine as a data validation mechanism for now.

Since the Nautilus .venv requirements are much heavier than fincal alone, this solution should be maintained in a perpetual branch called "nautilus_examples", which can be optionally pulled down for those interested in using fincal with Nautilus.

Not in scope for this issue:

Acceptance criteria:

  1. Pull 1 minute bars from Polygon from 2014-01-01 to 2023-10-15 for the following symbols, and store into a Nautilus catalog:
  • NYSE symbols: KO (Coca Cola)
  • NASDAQ symbols: QQQ (Invesco QQQ)
  1. Add the standard market sessions to each dataset using fincal
  2. Construct a picture of the trading day by creating a Nautilus strategy that triggers every minute. When the historical bars event is raised, see whether there is any volume for that minute. If there is volume on that minute, include it in the "regular session". If there isn't volume, treat it as a pause, or as a session close. At the end of the day, compare against fincal to see whether the data aligned to the fincal session struct, and output a message if there is a discrepancy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant