Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_historical_price_data() end_date #177

Open
typhoon71 opened this issue Jan 3, 2024 · 4 comments
Open

get_historical_price_data() end_date #177

typhoon71 opened this issue Jan 3, 2024 · 4 comments

Comments

@typhoon71
Copy link

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?

@typhoon71
Copy link
Author

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.

@datatalking
Copy link

@typhoon71 when you mentioned yfinance you might want to ask the question with that repo which uses related data but its a different repo.

@typhoon71
Copy link
Author

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.

@datatalking
Copy link

@typhoon71 look into the '_get_historical_data' method maybe that will give you what you are looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants