Earnings announcements happen every quarter every year and tend to correlate to volatility for individual stocks. If the economic hypothesis behind your algorithm doesn’t specifically rely on price movements related to earnings announcements, one possible way to lower volatility is to avoid securities that are close to an earnings announcement.
Thankfully, there are a two ways for you to do this:
- Import your own earnings calendar dataset through Fetcher()
- See the sample algorithm attached which uses EventVestor's Earnings Calendar dataset
This algorithm, originally published by James Christopher and Delaney, uses two new Pipeline API factors (
BusinessDaysSincePreviousEarnings) to avoid stocks which have an earnings announcement 7 days ahead and 7 days previous. You can clone the algorithm to see it in action.
BusinessDaysUntilNextEarnings == 0 it means that the current day has an earnings announcement. Either before market open or after market close.
- In order to run this algorithm, you can find the free sample version of EventVestor's earnings calendar dataset at Quantopian Data
- Post Earnings Announcement Drift Strategy with Estimize Algorithm
- Here's a tech sector strategy with a SPY Hedge that also uses earnings calendars.
- For an in-depth explanation of using earnings calendars in your algorithms, watch a recording of our webinar with Dr. Jess Stauth, Quantopian's VP of Quant Strategy, as well as Anju Marempudi, CEO of EventVestor.