I'm comparing daily and hourly values extracted from YFinance in Python. I'm expecting the open value of the first hour of the market to be equal to the daily open value of the corresponding day, and the close value of the last hour of the market to be equal to the daily close value. Also, the min and the max daily values should be contained in at least one of the hourly values.
I enabled back adjustments in both the cases and enabled the pre & post market hours for the hourly data trying to find a corresponding daily value.
None of my assumptions holds: hourly and daily values are different (open, high, low and close).
E.g: the highest daily value is 32.746275 and the highest hourly value is 33.919899 (at 11:30).
What am I doing wrong?
import yfinance as yf ticker = 'AY' net = yf.Ticker(ticker) start_date, end_date = '2020-11-06', '2020-11-07' daily_signals_df = net.history(start=start_date, end=end_date, interval='1d', back_adjust=True, auto_adjust=True, prepost=False) hourly_signals_df = net.history(start=start_date, end=end_date, interval='1h', back_adjust=True, auto_adjust=True, prepost=True)