Stocks were lower on Friday, July 28, after disappointing earnings from Amazon.com Inc. (AMZN)  and Starbucks Corp. (SBUX) overshadowed a pickup in U.S. economic activity during the second quarter. 

The S&P 500 fell 0.34%, the Dow Jones Industrial Average was down 0.03%, and the Nasdaq slid 0.4%.

The Nasdaq was in the red for another day. A surprise tech selloff, led by Twitter Inc. (TWTR) , shook markets on Thursday, July 27. The sudden turn lower dragged the Nasdaq from record highs and soured an overall upbeat mood in the morning session. The Dow Jones Industrial Average did manage to score a new record close on Thursday, however. 

Amazon.com Inc. tumbled 3.3% after a quarterly performance that fell well short of analysts' estimates. Earnings of 40 cents a share were a far cry from $1.41 consensus. Profit declined 77% from a year earlier. A sharp miss on the bottom-line was tied to the company's efforts to invest heavily in areas such as fulfillment, original content and international expansion.

Spending jumped in the second quarter. Amazon's fulfillment spending rose 33% to $5.16 billion, while technology and content spending grew 43% to $5.55 billion. Marketing expenses increased 44% to $2.23 billion.

Revenue jumped 25% year over year to $37.9 billion, however, surpassing analysts' projected $37.2 billion. Amazon Web Services, the company's cloud platform, continued to grow rapidly with sales of $4.1 billion, 42% higher than the $2.9 billion it generated in the year-earlier quarter. Wall Street expected cloud revenue of $4.08 billion.

Tech stocks were among the worst performers on Friday. Broadcom Ltd. (AVGO) , Apple Inc. (AAPL) , Texas Instruments Inc. (TXN)  and Accenture PLC (ACN) were lower, while the Technology Select Sector SPDR ETF (XLK) dipped 0.3%. 

Broadcom and Apple are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells AVGO or AAPL? Learn more now.

Starbucks Corp. fell 8% after in-line earnings results and below-consensus revenue. The coffee shop chain also announced it would close all its Teavana stores, its tea-focused concept chain. Starbucks said it would close all 379 Teavana locations over the coming year, citing underperformance. In April, Starbucks said it was reviewing options for Teavana.

"We felt it was an appropriate time to take the decision and begin shutting down those stores," said Starbucks CEO Kevin Johnson.

Starbucks also said same-store sales in the quarter rose rose 4% globally, while U.S. same-store sales gained 5%. The company also said it now expects revenue growth to fall to the lower end of its previous guidance of 8% to 10% for the year.

Starbucks is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells SBUX? Learn more now.

"We have grown tired of the company's inability to turn this battleship around in any sustained way, and we think that the company's weak performance could continue trending through next year," said Jim Cramer and the AAP team.

If you liked this article you might like

Best Buy CEO -- We, Together With Amazon, Will 'Kill' the Competition

Toys 'R' Us Bankruptcy Filing a Reminder That Amazon Is Crushing Everyone

How Long Can This Rally Run?: Cramer's 'Mad Money' Recap (Monday 9/19/17)

Centene: Cramer's Top Takeaways

Healthcare Trust of America, Marathon Petroleum: 'Mad Money' Lightning Round