Earnings announcement events are important events for investors and traders. Earnings results of a company tend to determine the future price direction of a stock and hence these are closely followed and analyzed by them. The period around the date of the earnings announcement sees increased volatility in price and the traded volume of the stocks. Traders can take advantage of this by using different earnings announcement trading strategies.
You can check the “Screener” page on the Quantpedia site where they have listed different earnings announcement trading strategies. The “Screener” page on Quantpedia categorizes hundreds of trading strategies based on different parameters like Period, Instruments, Markets, Keywords etc. Quantpedia has made some of these trading strategies available for free to their users.
Some of the earnings announcement strategies listed on the Quantpedia site include:
- Earnings Announcement Premium
- Post-Earnings Announcement Effect
- Reversal during Earnings Announcements
- Earnings Announcements combined with Stock Repurchases
To formulate and backtest any earnings announcement strategy, we need the historical dates of earnings release for any given company. Once the dates are extracted, an earnings announcement strategy can be formulated using these dates and other important data like price-volume history, historical performance numbers like sales, profit margin, net margin etc.
Earnings release dates can be obtained from different sources; a financial markets portal being one of such sources. The goal of this article is to extract the historical earnings dates from a popular financial markets portal using Python.
Corporate Events Table
Python Code for Extracting Historical Earnings Release Dates
Step 1: We first import the required libraries; requests, pandas, and BeautifulSoup. We then copy the URL from the financial market portal for the particular company.