(AP) -- The stock market had its best day in more than three weeks Tuesday as more companies reported how much profit they made during the spring.
The S&P 500 climbed 2.8% after a powerful tide carried 99% of the stocks in the index higher. The Dow Jones Industrial Average rose 2.4% and the Nasdaq composite roared 3.1% higher.
Smaller company stocks rose even more, sending the Russell 2000 index 3.5% higher.
Stocks had dropped roughly 20% this year on worries about rising interest rates and high inflation, which puts an even brighter spotlight than usual on how much profit companies are making. If earnings hold up, it would provide a major support for markets. But if CEOs warn about troubles ahead, another tumble may be on the way.
"What we're all enjoying today is a bit of a relief rally," said Keith Buchanan, portfolio manager at Globalt Investments. "The tone with the latest earnings from the large banks has not been increasingly negative and investor sentiment is at record lows, so it doesn't take very much to have an exciting, upside day."
More types of companies are reporting how much they earned during the spring, broadening out from the banks that dominated the earliest part of the reporting season.
Toy company Hasbro rose 0.7% after it reported stronger profit than analysts expected. Oilfield services provider Halliburton added 2.1% after its profit and revenue topped forecasts. Netflix jumped 8% in after-hours trading after the company reported better-than expected results and a smaller subscriber loss than analysts had feared.
Twitter rose 2.8% after a court in Delaware agreed to quickly schedule a lawsuit that could force billionaire Elon Musk to make good on his agreement to buy the company.
IBM, though, fell 5.2% despite reporting stronger revenue and earnings than expected. The company's profit margins fell short of some analysts' expectations, and concerns are rising about the effect of the dollar's recent strength against other currencies. While a stronger dollar helps limit inflation at home, it can also undercut the value of sales made abroad by U.S. companies.
The dollar's value eased a bit against other currencies Tuesday, which allayed some fears for the market. So too, counterintuitively, may have a report that showed an extreme level of pessimism among investors.
Expectations for economic growth and profits have plunged, according to the latest results from Bank of America's monthly survey of global fund managers. That has them sitting on their highest cash levels since 2001 and their lowest allocations to stocks since 2008.
"Full capitulation" is how Michael Hartnett, chief investment strategist, called it in a a BofA Global Research report. Contrarian investors see such dire levels of pessimism as an encouraging signal, which could presage better times ahead if everyone who was going to sell has already.
Given all those fears, though, big swings have become routine on Wall Street recently. The S&P 500 has been flip-flopping between weekly gains and losses over the last month, after a rough run where it dropped in 10 of 11 weeks. The swings have even hit hour to hour, with early morning gains quickly evaporating by the afternoon. On Monday, an early 1% gain gave way to a 0.8% loss.
On Tuesday, the S&P 500 ended 105.84 points higher at 3,936.69. The Dow jumped 754.44 points to 31,827.05, and the Nasdaq rose 353.10 points to 11,713.15. The Russell 2000 picked up 60.91 points to 1,799.32.
On Thursday, the European Central Bank is expected to raise interest rates for the first time in 11 years in hopes of knocking down high inflation.
The Federal Reserve has already raised rates three times this year, and by increasing amounts each time. It will announce its next increase next week, and the only question among investors is whether it will go with another increase of 0.75 percentage points or a colossal hike of a full point.
The yield on the two-year Treasury, which tends to track expectations for Fed action, rose to 3.24% from 3.17% late Monday. The 10-year yield rose to 3.02% from 2.96%.