A television on the floor of the New York Stock Exchange broadcasts remarks by Jerome Powell, chairman of the Federal Reserve, on Wednesday.

U.S. equities retreated at the tail end of a big earnings week as investors worried about slowing growth at the megacap technology companies that have helped drive the market to record highs during the pandemic. Inc. dropped 7.6% in its biggest decline since May 2020, contributing the most to declines in the Nasdaq 100 and S&P 500 indexes, after the company’s sales outlook missed expectations. Tech stocks including Microsoft Corp. also weighed down the Dow Jones industrial average. European equities dropped from a record and Asian stocks slid amid China’s regulatory clampdown.

Markets were whipsawed this week by China’s tightening regulatory grip, a slew of earnings and the outlook for stimulus. Amazon’s sales forecast adds to cautious forecasts from Facebook Inc. and Apple Inc., stoking a debate about whether tech stocks’ pandemic-related outperformance will give way to a cyclical revival.

So far, the second-quarter earnings season has been stronger than expected. About three-fifths of S&P 500 companies have reported, and more than 80% have exceeded both sales and profit estimates, according to data compiled by Bloomberg. With stocks trading near record highs and valuations stretched, some investors are increasingly concerned that the corporate earnings recovery is peaking as the market faces risks ranging from inflation to the fast-spreading COVID-19 delta variant and China’s crackdown on private technology firms.

“When you get to the valuation levels we’re at, professional investors are looking for a reason to sell,” said David Spika, president of GuideStone Capital Management, which has about $18 billion of assets under management. “It could be the delta variant, it could be China. It doesn’t matter. They’re looking for a reason to sell because they know valuations are extended and they don’t want to be the last one holding the bag.”

Investors piled into cash and equities in the past week, according to a Bank of America Corp. note citing EPFR Global data. Bank of America strategists recommended owning defensive and quality names in the second half of the year, as “policy flip-flops will end in market correction.”

Elsewhere, Pinterest Inc. plunged 18% to a two-month low after analysts said the company’s monthly user trends were disappointing.

Oil prices rose, with West Texas Intermediate crude settling at $73.95 a barrel as concerns about the delta variant’s impact on fuel demand eased amid tight global supplies. The Bloomberg Commodity Index was down more than 1%, paring a third consecutive weekly gain.