Open typhoon71 opened 6 months ago
I asked this because yfinance returns the current day when fetching history data. I guess not reporting the current day is correct, but only if the market is still open.
@typhoon71 when you mentioned yfinance you might want to ask the question with that repo which uses related data but its a different repo.
No, I mentioned yfinance because I use that too, and its behaviour is different from yahoofinacials. They both use yahoo finance as a data source, but behave slightly differently, so I was asking thinking about the difference.
An historical price set should return the current day if asked so - if market is still open it could be OK to not do that. yfinance reports it (and it keeps changing it in successive requests if the market is open) while yahoofinacials does not.
@typhoon71 look into the '_get_historical_data' method maybe that will give you what you are looking for.
I'm trying to use get_historical_price_data() to get price data and noticed end_date is skipped if it's current day data. Data stops one day before - I don't think it's intended. I'm fetching CSSPX.MI, and the exchange was open today - get_stock_price_data() gets current data. Any idea?