3
$\begingroup$

I'm trying to find all of the historical earnings dates (just the dates is good enough) for certain stocks ranging back to their IPOs. I'm plan to use it for my machine learning project.

Yahoo and Nasdaq seem to only list the earnings dates for the last four quarters.

Any suggestions?

Thank you.

$\endgroup$
1
  • 2
    $\begingroup$ The Compustat database includes this information en.wikipedia.org/wiki/Compustat . It is a commercial product, not free. $\endgroup$
    – Alex C
    Mar 14 '17 at 0:00
3
$\begingroup$

You can use Bloomberg terminal BDH formula on Excel. If you go through the wizard, you'll have to click:

Import data -> Historical End of Day -> Select securities from spreadsheet -> select "LATEST_ANNOUNCEMENT_DT" -> select dates -> finish.

If you don't have access to Bloomberg terminal, try asking some friends if they do. Many university libraries have one, as do most bigger financial companies.

Word of caution: I don't know about other sources, but Bloomberg data is not exactly correct - it doesn't differentiate whether a company reports before, during or after the market hours. To get around this I would measure the price move over 2-3 days around earnings instead of a single day.

$\endgroup$
1
  • $\begingroup$ Thanks, I will see if I can get access to Bloomberg Terminal. $\endgroup$
    – moondra
    Mar 14 '17 at 14:54
2
$\begingroup$

If you truly don't need the time of the earnings report, you can use Tradier. https://developer.tradier.com/documentation/markets/fundamentals/get-calendars

$\endgroup$
2
$\begingroup$

Yahoo does provide a great alternative https://finance.yahoo.com/calendar/earnings?symbol=TD.TO

$\endgroup$
3
  • 1
    $\begingroup$ Yahoo was explicitly mentioned as not a great alternative. Did something change? $\endgroup$
    – Bob Jansen
    Oct 1 '20 at 5:08
  • $\begingroup$ It looks like now, at least for the TD example given, Yahoo gives many years and now just the last 4 quarters. It also includes timestamp. $\endgroup$ Oct 1 '20 at 22:16
  • $\begingroup$ Is there a way to get this in CSV or json format? $\endgroup$
    – mike01010
    Apr 27 at 22:11
1
$\begingroup$

AlphaVantage provides quarterly earnings release dates including EPS (actual/predicted/surprise), see https://www.alphavantage.co/documentation/#earnings

The advantage is that unlike Yahoo Finance's earning calendar it's machine readable (JSON) and it's free (need to sign up for a free API key).

$\endgroup$
1
$\begingroup$

Adding to the solution of @Martin by providing some R code (if one does not have access to a Bloomberg terminal), then you can get quarterly earnings from the alphavantage API. One way of doing this (Apple is used as an example):

library(alphavantager)
library(httr)

av_api_key(YOUR API KEY HERE)

temp <- GET("https://www.alphavantage.co/query? 
function=EARNINGS&symbol=AAPL&apikey=YOUR API KEY HERE")

AAPL_earnings <- content(temp)

AAPL_earnings <- t(as.data.frame(AAPL_earnings$quarterlyEarnings))

Which will produce a dataframe on the form:

Apple earnings output

The "httr" package is used to scrape the webpage in the GET function, where "content" scrapes the body of the webpage which is a JSON file of data. More intuitively, you could also go to the website in the GET function $\rightarrow$ right-click $\rightarrow$ "save as", and then save it as a JSON file, which can be loaded into your preferable programming language.

Even though this is an old thread, I'll post it here for people who might have the same problems.

$\endgroup$
2
  • $\begingroup$ Thanks, I was looking at getting the data in R also. Your code works fine but I think the output could be better structured. Here's the function I came up with: gist.github.com/mgei/f5cd22848d656d47180db7e68b04048e $\endgroup$
    – Martin
    Dec 27 '20 at 17:16
  • $\begingroup$ Yes, the data formatting should be different if you want to work with it. The purpose of the answer was just to provide some "starting" code to get an understanding on how to access the API. Kudos for your function, it works nicely. $\endgroup$
    – Pleb
    Dec 27 '20 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.