Alpaca Bars API - Close Price Data Variation

Hello,

I’ve been seeing weird variations in the daily close prices from the Alpaca Bars API (https://data.alpaca.markets/v1/bars/day) when comparing to other data sources (Nasdaq, NYSE, Yahoo). More so than other sources vary amongst themselves. After digging and compiling data from all sources, I put together a chart that shows daily close price variance for 1. Alpaca vs Nasdaq, and 2. Nasdaq vs Yahoo. Blue is Yahoo Finance which basically looks like a flat line compared to the variance in Alpaca vs Nasdaq data. This seems to be the trend when comparing Alpaca to any other data source I can get my hands on.

One thing I’ve observed, is that Alpaca’s close prices seem to match the last price of non-after-hours on an intra-day chart, however other data sources seem to get their close price from the first price in after hours. For example, on a 5min chart for TOT on 3/26/20, the closing price for the 3:55 bar is $35.99, which is what Alpaca has as the daily close for TOT on 3/26. However the next bar of data at 4:00 shows the close at $35.37 which is what Google, Yahoo, and NYSE data show as the daily close for TOT on 3/26.

I know these variations can seem insignificant, but when compared to other sources, there’s pretty much none. So I’m just looking for a reason behind the price differences. Considering that Close prices are very important for calculating technicals, this seems worth a conversation. If anyone at Alpaca, or beyond, have any thoughts or insight on what I’ve found, I would love to hear it!

Thanks, and sorry for the deep dive. Hope it makes sense.

1 Like

I’m not sure if you’ve incorporated this fact into your test, but the Alpaca bars API gets its data from IEX which seems to be used less (perhaps meaning less liquid) when compared to the Nasdaq (at least that’s what I see when looking at L1 data of various exchanges on other trading platforms) so that’ll influence the way it trades (perhaps higher spreads), but you’re seeing as high as 1% variances which is HUGE for intra-day in my opinion, so I’m not sure if that’s the problem.
Another thing you might want to consider is from this page in the Alpaca docs:

For the intraday real-time bars, the IEX data provides price information coming only from the IEX exchange trades, while the full volume data reflects trades from all exchanges.

Hope that helps.

Thanks for the feedback @Petersoj. These variances are with the Daily close price as opposed to intraday which is why I think it’s concerning. As far as where Alpaca is getting these daily closes, I’ve found that if you look at an intra-day chart from a different data source (Yahoo, Thinkorswim, etc) the last bar of the trading day, for example on a 5 min chart has the closing price that matches Alpaca’s daily close price however other data sources land on a different number on their daily bars for close.

If I’m missing something or interpreting the data incorrectly, I would really like to know, otherwise I’m lead to believe Alpaca’s market data is returning numbers that don’t match any other exchanges/data sources.

+1 on this issue. I am looking at close prices after hours, and across positions there are significant variations with other market sources (which usually all agree with each other). Market Open/High/Low seem to mostly concur, but Market Close does not. Any explanation as to why? Thank you.

Just following up here. I have since abandoned using Alpaca data all together because of these concerning market data discrepancies. Is there anything from the Alpaca team on this? Was this an issue that has since been corrected?

Just wanted to check in and see if there are any updates. Thanks