丁先生

Market data not align with Yahoo Finance

Programming


Hello community, I have a question regarding the dataset on the platform. 

I use the getHistoricalBar function to query data. 
However, when I cross check the results with Yahoo Finance, the values do not match. 
Is it a data issue or anything I did wrong?
 
admin

There are several reasons why the data looks different from other data sources:

  • Data download from our REST API or getHistoricalBar function are backward adjusted for dividends, stock splits, etc
  • Transactions during pre-market and after-close sessions are included on our platform, but Yahoo Finance only cover the regular trading hours.
  • The date column on Yahoo Finance refers to the timestamp at bar opening; while it refers to the timestamp at bar closing on our platform.

Regarding the point 3 where the timestamp on AlgoGene refers to the closing time of a candle. For below example,

  • "2024-06-21 08:01:00" will be the timestamp where we observe the closing price 68.1
  • However, under Yahoo's definition, this bar will be under "2024-06-21 08:00:00"
  • Suppose we send a market buy order at "2024-06-21 08:01:00", the system will assume immediate execution at the latest ask price 68.15 (no slippage).
  • The same concept applies to daily bar where market order is assumed to be executed at the last moment of that trading day.