# Original paper

**Abstract**

We test whether the well-documented post-earnings-announcement drift is a manifestation of an investor underreaction or overreaction to extremely good or bad earnings news. Using the market reaction to extreme earnings surprises (i.e., SUE) in quarter Qt as a reference point, we show that firms reporting a SUE in subsequent quarter Qt 1 that confirms their initial quarter Qt SUE ranking in the same highest or lowest SUE quintiles generate an incremental price run that moves in the same direction as that of the initial SUE. However, the price impact of the confirming SUE signal is weaker than that of its initial SUE. Our findings are robust to the Fama-French three-factor daily regression extended by the momentum factor and a number of other robustness tests. Our finding is not consistent with the prevalent view that investors underreact to earnings news. To the contrary, the results suggest an initial investor overreaction to extreme SUE signals.

**Keywords:**Â Earnings surprise; Initial SUE; Confirming SUE signals; Disconfirming SUE evidence; Overreaction; Price reversals

# Trading rules

- Eligible Stocks: Focus on stocks from NYSE, AMEX, and NASDAQ, with the exception of those from the financial and utility sectors, and those priced under $5.
- Metric 1: Measure EAR (Earnings Announcement Return) as the extraordinary return over a span of three days surrounding the release date, beyond a risk-comparable portfolio.
- Metric 2: Define SUE (Standardized Unexpected Earnings) as the quotient of the earnings variation and the standard deviation of such variations.
- Classification: Organize stocks into five equal groups using EAR and SUE values, relying on data from the prior quarter to sidestep future data bias.
- Allocation in Portfolio: Assign an even distribution for stocks within each of the five groups.
- Position Directions: Initiate long positions for the top-performing intersection of EAR and SUE and short positions for the least-performing intersection.
- Duration of Position: Hold for one quarter (equivalent to 60 business days), starting two days post the earnings release.
- Portfolio Adjustment: On a quarterly basis.

# Python code

## Backtrader

```
import backtrader as bt
class PEADStrategy(bt.Strategy):
def __init__(self):
self.ear = {} # Earnings Announcement Return
self.sue = {} # Standardized Unexpected Earnings
def next(self):
# Check if it's the second day after the earnings announcement
if not self.is_second_day_after_announcement():
return
# Calculate factors EAR and SUE for each stock
self.calculate_factors()
# Sort stocks into quintiles based on EAR and SUE
long_stocks, short_stocks = self.sort_quintiles()
# Calculate equal weight for each stock within quintiles
long_weight = 1.0 / len(long_stocks)
short_weight = -1.0 / len(short_stocks)
# Enter long and short positions
for stock in long_stocks:
self.order_target_percent(stock, target=long_weight)
for stock in short_stocks:
self.order_target_percent(stock, target=short_weight)
# Hold positions for 1 quarter (60 working days)
self.hold_positions_for_n_days(60)
def is_second_day_after_announcement(self):
# Implement logic to determine if it's the second day after the earnings announcement
pass
def calculate_factors(self):
# Implement logic to calculate EAR and SUE for each stock in the investment universe
pass
def sort_quintiles(self):
# Implement logic to sort stocks into quintiles based on EAR and SUE
pass
def hold_positions_for_n_days(self, n):
# Implement logic to hold positions for n days
pass
if __name__ == '__main__':
cerebro = bt.Cerebro()
# Add data feeds for NYSE, AMEX, and NASDAQ stocks (excluding financial and utility firms and stocks below $5)
cerebro.addstrategy(PEADStrategy)
cerebro.run()
```

Please note that this is just a skeleton code for the PEAD strategy. You need to implement the logic for each function based on your data source and the desired calculations.