On April 30, Apple largely traded on a negative note before its earnings announcement. The stock settled at $200.67 with a fall of ~1.9% compared to the S&P 500 Index’s 0.1% rise and the NASDAQ Composite Index’s (QQQ) 0.8% fall in the session.

However, after the company’s earnings release, its stock surged ~5.1% to $210.82 in after-hours trading.

Due to the recent weakness in the iPhone sales trend, analysts weren’t expecting the company to report major year-over-year gains in its second quarter. Analysts’ low expectations for AAPL’s earnings had already been factored into its stock price. As a result, Apple’s slightly better-than-expected earnings and revenue helped it gain investors’ confidence despite a sharper-than-sequential drop in the revenue of the iPhone.