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

Issue #155 earnings calendar #242

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Amiram1
Copy link

@Amiram1 Amiram1 commented Nov 24, 2020

Enhancement following #155

New earnings_calendar api based on the economic calendar api and follows the same logic as investing.com:

https://www.investing.com/earnings-calendar/

This allows to fetch company earnings updates: EPS, forecast EPS, revenue, forecast revenue, market cap etc.

basic usage:

        df = investpy.earnings_calendar(time_zone=param['time_zone'],
                              time_filter=param['time_filter'],
                              countries=param['countries'],
                              importances=param['importances'],
                              sectors=param['sectors'],
                              from_date=param['from_date'],
                              to_date=param['to_date'])

3 open tasks to resolve:

  • would it be better to extract the shared logic with economic_calendar instead of the duplicated code?

  • sectors don't work yet, need to check investing.com API for the exact sectors definitions

  • missing the earnings_time parser (BMO, AMC), seems to be inconsistent in investing.com

…ows the same logic as investing.com:

https://www.investing.com/earnings-calendar/

This allows to fetch company earnings updates: EPS, forecast EPS, revenue, forecast revenue etc.

+ open todo tasks
@codecov
Copy link

codecov bot commented Nov 24, 2020

Codecov Report

Merging #242 (aee0178) into master (ca9b3d5) will decrease coverage by 0.03%.
The diff coverage is 89.71%.

@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
- Coverage   90.96%   90.93%   -0.04%     
==========================================
  Files          26       26              
  Lines        4902     5007     +105     
==========================================
+ Hits         4459     4553      +94     
- Misses        443      454      +11     

@alvarobartt
Copy link
Owner

Cool @Amiram1! Thanks for the great work here 💪🏻 Should I wait until you complete the TODOs you have on your initial comment or do you want me to merge this now and iterate over a new PR to solve those?

Thanks a lot! 🤗

@alvarobartt alvarobartt self-requested a review December 3, 2020 08:40
@alvarobartt alvarobartt self-assigned this Dec 3, 2020
Copy link
Owner

@alvarobartt alvarobartt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, you did a great work here, taking care of the docstrings and the tests too! 💪🏻 Keep it up!

@Amiram1
Copy link
Author

Amiram1 commented Dec 3, 2020

Thanks @alvarobartt happy to help, up to you if you want to merge it as is :-) I'm not sure when I'll have time to continue the open tasks

@alvarobartt
Copy link
Owner

alvarobartt commented Dec 4, 2020

Ok @Amiram1 then before merging this PR, could you please explain this 2 points you previously mentioned in just a few lines so that I can report those in order to tackle them later?

1 - Sectors don't work yet, need to check Investing.com API for the exact sectors definitions.
2 - Missing the earnings_time parser (BMO, AMC), seems to be inconsistent in Investing.com.

Thanks a lot! 👍🏻

@Amiram1
Copy link
Author

Amiram1 commented Dec 6, 2020

Of course -
1 - Sectors - under https://www.investing.com/earnings-calendar/ there are options to filter companies by sectors, for the financial calendar the categories values are listed under consts for example: 'employment': '_employment'. For sectors we need to find out the correct sector values and update the SECTOR_FILTERS const dict

2 - earnings_time appear in https://www.investing.com/earnings-calendar/ as moon (After Markets Close) or sun icons (Before Markets Open). We need to parse correctly each row and add to earnings_time

@atowersc
Copy link

great function. this is already available in the master or not yet?

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.

None yet

3 participants