By Saqib Iqbal Ahmed and Noel Randewich

A stock rebound marked by Wall Street's strongest quarter in more than two decades has slowed in recent weeks, as a resurgence in coronavirus cases threatens to derail the economy's recovery from a deep downturn.

With the S&P 500 up 20% in the quarter ended on Tuesday and just 8% below its February record high, investors are parsing an array of factors that could weigh on stocks in the months ahead, including potential delays in reopening parts of the U.S. economy and sky-high stock valuations.

Even after two days of strong gains this week, the S&P 500 is down 4% from early June, underscoring investors' recent concerns as U.S. coronavirus cases trend higher.

(Graphic: Soaring stocks, )

The S&P 500's strongest quarterly performance since the fourth quarter of 1998 -- during the dot-com boom -- was driven by gains in April and May, followed by an overall flat June after Wall Street gave back gains in the second half of the month. Globally, MSCI's world equity index <.MIWD00000PUS> has rallied to within 10% of its February record highs.

(Graphic: U.S. stocks and COVID-19 cases, )

After new cases of the coronavirus trended lower in May, they climbed again in June, denting investors' enthusiasm that the U.S. economy would recover relatively quickly from the crisis. Investor enthusiasm had been driven in part by recent economic data that were better than expected.

(Graphic: COVID-19's growing potential economic impact, )

A spike in virus infections in Southern and Western states last week spooked investors. Florida, Texas, California and Arizona, which were the top four states with the most new cases, account for nearly a third of U.S. economic output. California's government on Sunday ordered bars in several counties to close due to the coronavirus rebound, while San Francisco put plans to reopen businesses on hold.

Much of Wall Street's gains in recent months has been driven by the trillions of dollars in stimulus from Congress and the Federal Reserve and by investors' confidence that the Fed is prepared to take additional measures to support the economy and financial markets.

Still, the rally has exacerbated some investor concerns, including the high stock valuations. The S&P 500's forward price/earnings ratio, a closely followed valuation metric, now stands at 22, its highest level since the dot-com boom.

(Graphic: S&P 500 forward PE hits dot-com high, )

Driving much of Wall Street's strong second quarter were shares of companies benefiting from the millions of people staying home. Amazon and other retailers with a strong online presence outperformed. Major technology companies with strong balance sheets and the resources to weather a deep economic downturn have also been favored by investors.

(Graphic: Amazon and tech drove Wall St's gains in Q2, )

With yields on Treasuries tumbling in recent months due to uncertainty about the pandemic, dividends stood out as an additional reason to buy stocks. At nearly 2%, the dividend yield on the S&P 500 remains attractive compared to the 10-year Treasury, at 0.63%.

(Graphic: S&P 500 dividends vs Treasuries, )

However, the outlook for dividends has worsened. After S&P 500 dividends hit a record high $127 billion in the first quarter, according to S&P Dow Jones Indices, several companies have suspended or cut their dividends. Last week, the Fed capped bank dividends and barred banks' share repurchases until at least the fourth quarter due to uncertainty caused by the coronavirus.

"We have turned neutral on equities on a strategic horizon given the challenging backdrop for earnings and dividend payouts," BlackRock Investment Institute said in its 2020 Midyear Investment Outlook.

(Reporting by Noel Randewich and Saqib Ahmed; Editing by Leslie Adler)