Skip to content

Add option to exclude Dark Pool Data from Aggregate Bars #39

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

Open
ParsaPilehvari opened this issue Oct 26, 2024 · 5 comments
Open

Add option to exclude Dark Pool Data from Aggregate Bars #39

ParsaPilehvari opened this issue Oct 26, 2024 · 5 comments

Comments

@ParsaPilehvari
Copy link

The aggregate bar endpoints have the dark pool trades and volume rolled into it, leading to moments in my datasets where the high, low, and close of a bar can be wildly different from what the NASDAQ historical data reports in reality. It seems counter-intuitive to include this data in the aggregate bars as retail traders are unable to actually trade at those dark pool values, which only results in noise to an algorithm and with sufficient dark pool volumes, it can easily trigger false positives/negatives.

Having a boolean option to filter out the dark pool exchange's OHLCV from the aggregate bars will resolve this issue.

Note: A potential workaround could be consolidating the historical trades and filtering out the FINRA dark pool exchange directly, but during high volume periods, this will require multiple API calls to consolidate each trade into an aggregate bar, which severely degrades real-time performance.

@ParsaPilehvari
Copy link
Author

Seems to be a duplicate of Add option to exclude dark pool from aggregate data however it does not seem like the issue was actually resolved.

@swilson2020
Copy link

swilson2020 commented Feb 17, 2025

Yes, this is a common complaint. I've also been requesting this. I have to pull clean data from Schwab for trading and backtesting. I'm in the process of migrating to Financial Modeling Prep API for clean aggregates.

@ParsaPilehvari
Copy link
Author

I am still encountering this issue and the 8am untradeable spikes are skewing the results for my live and backtest algorithms. I like financial modeling prep a lot, but I find they update their bars too slowly for my liking. It only really impacts the speed of my live algos.

@swilson2020
Copy link

I'm finding volume errors on FMP and I'm working with them on it. Basically their 9:30AM candles are reporting volume that none of the other providers do. Sometimes to the tune of 12,000% more.

So yeah, I might have to build my own aggregates from Polygon's data. Which is dumb, means more bandwidth and more API usage simply because they won't offer clean aggregates.

@ParsaPilehvari
Copy link
Author

I remember facing the same issue, I assumed it was because of what exchanges it had access to. If you're in one of the supported countries, Alpaca might be a better data provider, considering they are cheaper although they also have the same dark pool issue.

They don't offer bars less than one minute but the APIs are pretty nice. I think both them and Polygon use similar data sources for their data.

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

2 participants