# Adjusted historic bar data is inaccurate

**URL:** https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101
**Category:** Alpaca Market Data
**Created:** [October 5, 2024, 8:03am UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101 "2024-10-05T08:03:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Mark\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/mark_f/32/6565_2.png) [@Mark\_F](https://forum.alpaca.markets/u/Mark_F)
#### Post date: [October 5, 2024, 8:03am UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101/1 "2024-10-05T08:03:43Z")

</div>

There seems to be some wild inaccuracies when querying the api for adjusted historic bar data. From 2021-10-01 to 2021-10-04 the price drops from around $660 to around $110. The was a split on 2021-10-04, but it should not change the adjusted price like this… Is this due to incorrectly adjusting the data ? Is there some way to fix this ?

```auto
timeFrame = TimeFrame(amount=delim, unit=TimeFrameUnit.Hour)

now = datetime.now(ZoneInfo("America/New_York")) - timedelta(weeks=156) - timedelta(days=4)

req = StockBarsRequest(
    symbol_or_symbols = ['FI'], # stock to check
    timeframe = timeFrame, # specify timeframe
    start = now - timedelta(days=4), # specify start datetime, default=the beginning of the current day.
    end = now, # end time
    feed='iex', # feed from iex
    adjustment='all' # adjust to account for splits and dividends
)                                            

res = stock_historical_data_client.get_stock_bars(req)

display(res.df)

```

```
	open high low close volume trade_count vwap

```

symbol timestamp   
FI 2021-10-01 13:00:00+00:00 651.00 654.480 648.18 651.06 44756.0 3476.0 651.596406  
2021-10-01 14:00:00+00:00 651.30 653.700 648.06 649.92 43089.0 5525.0 650.045749  
2021-10-01 15:00:00+00:00 650.05 654.600 649.50 654.06 33687.0 4685.0 652.664068  
2021-10-01 16:00:00+00:00 654.36 657.210 652.62 655.44 28666.0 4404.0 655.059997  
2021-10-01 17:00:00+00:00 655.32 659.220 654.48 658.50 29832.0 4337.0 657.173053  
2021-10-01 18:00:00+00:00 658.56 661.080 658.32 660.84 33814.0 4522.0 659.842419  
2021-10-01 19:00:00+00:00 660.96 662.580 657.66 658.68 77308.0 9895.0 659.777455  
2021-10-01 20:00:00+00:00 658.68 658.680 658.68 658.68 126897.0 53.0 658.680000  
2021-10-04 11:00:00+00:00 109.00 109.000 109.00 109.00 100.0 1.0 109.000000  
2021-10-04 13:00:00+00:00 110.22 111.990 108.52 108.61 298946.0 3219.0 109.268458  
2021-10-04 14:00:00+00:00 108.56 108.640 106.77 107.17 358917.0 6907.0 107.497030  
2021-10-04 15:00:00+00:00 107.17 107.780 107.07 107.69 474425.0 7118.0 107.383882  
2021-10-04 16:00:00+00:00 107.68 107.755 107.24 107.44 253650.0 4909.0 107.477539  
2021-10-04 17:00:00+00:00 107.44 107.840 107.33 107.45 305897.0 5593.0 107.566627  
2021-10-04 18:00:00+00:00 107.45 107.850 107.40 107.71 302563.0 6176.0 107.584937  
2021-10-04 19:00:00+00:00 107.72 108.360 107.61 108.29 713238.0 12615.0 107.970032  
2021-10-04 20:00:00+00:00 108.26 109.010 108.21 108.21 1008208.0 53.0 108.260735  
2021-10-04 21:00:00+00:00 108.26 108.260 108.26 108.26 500.0 1.0 108.260000

---

<div class="post-metadata">

### Author: ![Mark\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/mark_f/32/6565_2.png) [@Mark\_F](https://forum.alpaca.markets/u/Mark_F)
#### Post date: [October 8, 2024, 9:10pm UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101/2 "2024-10-08T21:10:40Z")

</div>

Anyone know if I’m querying this wrong of if there’s a way to fix this ?

---

<div class="post-metadata">

### Author: ![Gergely\_Alpaca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/gergely_alpaca/32/3210_2.png) [@Gergely\_Alpaca](https://forum.alpaca.markets/u/Gergely_Alpaca)
#### Post date: [October 10, 2024, 8:47am UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101/3 "2024-10-10T08:47:05Z")

</div>

Thank you @Mark_F for reporting this issue. As you suspected, we had an incorrect split in our database. I removed it, so the adjusted bars now look as expected.

 ![fi](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/9/9217bfc24c09fc74676151c4715731fadcc910b2.png)

---

<div class="post-metadata">

### Author: ![Mark\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/mark_f/32/6565_2.png) [@Mark\_F](https://forum.alpaca.markets/u/Mark_F)
#### Post date: [October 10, 2024, 9:27am UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101/4 "2024-10-10T09:27:50Z")

</div>

There may also be an additional split error in DELL stock sometime in that time frame.

---

<div class="post-metadata">

### Author: ![Gergely\_Alpaca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/gergely_alpaca/32/3210_2.png) [@Gergely\_Alpaca](https://forum.alpaca.markets/u/Gergely_Alpaca)
#### Post date: [October 10, 2024, 9:48am UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101/5 "2024-10-10T09:48:51Z")

</div>

Yes, you’re right, we were missing the 2021-11-02 1973:1000 split. Added it.

---

<div class="post-metadata">

### Author: ![Mark\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/mark_f/32/6565_2.png) [@Mark\_F](https://forum.alpaca.markets/u/Mark_F)
#### Post date: [October 10, 2024, 11:10am UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101/6 "2024-10-10T11:10:45Z")

</div>

Cool. I’ll keep an eye out for more, although those were definitely the most egregious. You guys should pay me a bug bounty!

---

<div class="post-metadata">

### Author: ![Gergely\_Alpaca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/gergely_alpaca/32/3210_2.png) [@Gergely\_Alpaca](https://forum.alpaca.markets/u/Gergely_Alpaca)
#### Post date: [October 10, 2024, 11:14am UTC](https://forum.alpaca.markets/t/adjusted-historic-bar-data-is-inaccurate/15101/7 "2024-10-10T11:14:01Z")

</div>

😃 Unfortunately, I’m not in a position to pay you a 🐛 bounty, but I sure thank you for reporting these 🙂
