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

Added support for getting growth estimates #1778

Conversation

coskos-ops
Copy link
Contributor

@coskos-ops coskos-ops commented Dec 11, 2023

Added support for getting growth estimates. Some people wanted this feature as seen in #1280 and #575. Added basic scraping logic for the analysis section.

Only growth estimates are added for now but it can easily be extended to support some of the other data in that section.

Added a test case to check if the growth estimates are properly being retrieved.

Edit: Updated the PR to save all the other information available on the analysis page. The code already scrapes all of the data on the analysis page so it is wasteful to discard all but one entry

@bot-unit
Copy link

bot-unit commented Dec 11, 2023

@ValueRaider all data from page analysis are available at quote_summory module earningsTrend
Plus we can take industry, index, sector trends and recommendations in one request

@coskos-ops
Copy link
Contributor Author

@bot-unit I saved all the other data on the analysis page. No point discarding data for which we have already paid the tax of retrieving

@bot-unit
Copy link

bot-unit commented Dec 12, 2023

@bot-unit I saved all the other data on the analysis page. No point discarding data for which we have already paid the tax of retrieving

The question is to parse with pandas html page or just json answer from api
Your work is great and we should keep it as backup for API calls

@ValueRaider
Copy link
Collaborator

ValueRaider commented Dec 12, 2023

Benchmark comparison with time.perf_counter?

@bot-unit
Copy link

Benchmark comparison with time.perf_counter?

Ok. But any way, we should keep scraping code too. Yahoo can change or block API in future. I will add API calls to this code and do some benchmarks.

@ValueRaider
Copy link
Collaborator

@coskos-ops Just looking at code there's probably opportunity to format types etc. Correct me if wrong. See Ticker.get_earnings_dates for inspiration.

Saved additional data available on analysis page

The previous commit only saved the growth estimates.
This is a bit of a waste since we are getting all the data on the page anyway.
Might as well save all of it.

Modified test cases to be consistent with other ones
@ValueRaider ValueRaider mentioned this pull request Jan 14, 2024
@ValueRaider ValueRaider changed the base branch from dev to feature/growth-estimates January 14, 2024 21:36
@ValueRaider
Copy link
Collaborator

Changed target to branch feature/growth-estimates so someone else can finish. @dementedhedgehog

@ValueRaider ValueRaider merged commit 662da57 into ranaroussi:feature/growth-estimates Jan 14, 2024
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

Successfully merging this pull request may close these issues.

3 participants