U.S. stocks tumbled sharply Wednesday, and the bullish gains made a day before were erased early but climbed back slightly toward the end of trading.

Nervous investors retreated as more bad signs emerged showing the  devastating toll of the prolonged coronavirus shutdown on the American economy.

All the major indexes were in the red all day from the opening bell.

The Dow Jones Industrial Average closed down 445.41 or 1.86% to 23,504.35.

The NASDAQ composite index was down 122.56 or 1.44% to 8,393.18.

The S&P 500 was down 62.70 or 2.2% to 2,783.36.

All indexes fell more than 2% in the first few minutes of trading, and bond prices rose as investors sought safety.  The Dow was down as much as 600 points in early trading.

What’s happening

Markets appear to be cycling between fear and budding optimism as investors try to guess how long and deep the looming recession will be, with the switch often flipping overnight or even within the same day.

Economists have been slashing forecasts in advance of what’s expected to be the worst downturn since the Great Depression, and several reports Wednesday were even more dismal than expected, including a record drop for U.S. retail sales. Adding to the gloom: More banks made moves in anticipation that households and companies across the economy will get crunched by the recession and default on billions of dollars in credit-card debt and other loans.

Retail sales plunged an unprecedented 8.7% last month as the outbreak forced a near total stop to commerce across the nation.

Electronics retailer Best Buy was planning to lay off about 51,000 employees amid the prolonged shutdown.

Manufacturing was also seeing historic declines due to the prolonged shutdown. A report out Wednesday also showed U.S. industrial production plunged 5.4%, the worst drop since January 1946, according to CNBC. Analysts had only expected a drop of 3.5%.

A day before, the S&P climbed 3.1% as investors began to see gradual signs of the coronavirus leveling off and states beginning to devise plans to lift shutdowns and reopen parts of the U.S. economy.

The index surged 12% last week but is about 16% below its February all-time high.

A measure of manufacturing in New York State plunged to its lowest level on record, and a global energy agency predicted that worldwide demand for oil will fall this year by the most in history.

Global stocks and oil prices also fell Wednesday after the International Monetary Fund said the world’s economy will suffer its worst year since the Great Depression of the 1930s due to the pandemic.

Investors are focusing on how and when authorities may begin to ease business shutdowns and limits on people’s movements imposed to slow the spread of the coronavirus.

U.S. President Donald Trump has been discussing how to roll back federal social distancing recommendations, and initially claimed total authority over governors on when states could reopen.

The president has since rolled back his stance on the issue, and said Tuesday that  some states could “reopen” before May, although federal health officials expressed that public health restrictions may need to stay in place longer.

U.S. governors are collaborating on plans to reopen their economies in what is likely to be a gradual process to prevent the coronavirus from rebounding.

The discussions follow signs the outbreak may be leveling off in some of the hardest-hit areas, including New York City.

On Wall Street, the future for both the benchmark S&P 500 and the Dow industrials sank 1.6%.

Wall Street expects profits will fall for most companies in the S&P 500. The focus is on what management teams have to say about what profits look like for the rest of the year.

Analysts are forecasting a drop of roughly 10% in earnings per share for S&P 500 companies for the first quarter and 21% for the second quarter.

The price of oil hit a new 18-year low the International Energy Agency said demand will drop by 9.3 million barrels per day in 2020 overall. Demand in April will hit its lowest since 1995, it said.

The drop came despite an agreement over the weekend among OPEC and other oil producers to cut output to reflect collapsing demand.

Benchmark U.S. crude lost 40 cents to $19.71 per barrel. Brent crude, the international standard, declined $1.02 to $28.58 per barrel in London.

The IMF said this year's global economic output will shrink by 3%, a bigger loss than 2009's 0.1% decline during the financial crisis. That was a sharp reverse from the Fund's January forecast of 3.3% growth before the virus prompted governments to shut down factories, travel and other industries.

“The IMF forecast a deep economic winter," said Hayaki Narita of Mizuho Bank in a report. Narita said.

The IMF’s chief economist, Gita Gopinath, said the loss to global gross domestic product, the broadest gauge of economic output, could amount to $9 trillion, or more than the economies of Germany and Japan combined.

Indexes in London and Frankfurt were down about 2% and benchmarks in Shanghai, Tokyo, Hong Kong and Sydney closed lower. Wall Street futures were down by over 1.5%.

In Europe, London's FTSE 100 lost 2.3% to 5,661 and the DAX in Frankfurt declined 2.1% to 10,473. The CAC 40 in France retreated 1.9% to 4,437.

In Asia, the Shanghai Composite Index lost 0.6% to 2,811.17 and the Nikkei 225 in Tokyo declined 0.5% to 19,550.09. Hong Kong's Hang Seng was off 1.2% at 24,145.34.

The S&P-ASX 200 in Sydney lost 0.4% to 5,466.70 while India's Sensex added 0.9% to 30,982.37. New Zealand advanced 2.5% while Jakarta lost 1.7% and Singapore retreated 1.3%.

In Italy, Spain and other places around Europe where infections and deaths have begun stabilizing, the process of reopening economies is already underway. Some businesses and industries are being allowed to reopen in a calibrated effort to balance public health and their countries’ economic well-being.

The IMF expects economic contractions this year of 5.9% in the United States, 7.5% in the 19 European countries that share the euro currency, 5.2% in Japan and 6.5% in the United Kingdom. The Fund said China, where the pandemic originated, should eke out 1.2% growth this year, better than some private sector forecasters who expect little to no growth in the world’s second-biggest economy.

China has reopened factories, shops and other businesses after declaring victory over the outbreak but forecasters say it will take months for industries to return to normal output, while exporters will face depressed global demand.

In currency markets, the dollar advanced to 107.39 yen from Tuesday's 107.17 yen. The euro retreated to $1.0912 from $1.0981.

— Stan Choe, Alex Veiga and Damian J. Troise also contributed for The Associated Press.