Stocks around the world whipped higher Wednesday, riding a wave of optimism on encouraging data about a possible treatment for COVID-19.

The upswell of hope was so strong that investors completely sidestepped a report showing the outbreak drove the U.S. economy to its worst quarterly performance since the Great Recession. The S&P 500 vaulted 2.7% higher and extended a rally that’s brought the U.S. stock market to the brink of its best month in 45 years.

The spark for Wednesday’s rally was a report that an experimental drug proved effective against the new coronavirus in a study run by the National Institutes of Health. The nation’s top infectious diseases expert said the drug reduced the time it takes patients to recover, and it raised hopes that life around the world may eventually tiptoe back toward “normal.”

Health experts also cautioned that the drug is not yet considered a game changer in the fight against the virus.

The S&P 500 rose 76.12 points to 2,939.51. It has surged 13.7% in April, and it’s a day away from closing out its best month since late 1974.

The Dow Jones Industrial Average rose 532.31, or 2.2%, to 24,633.86, and the Nasdaq climbed 306.98, or 3.6%, to 8,914.71.

» TUESDAY’S CLOSE: After roaring start, US stocks fall back to earth as investors retreat

“What you’re finding now is you have this debate between optimism and realism,” said Adam Taback, chief investment officer for Wells Fargo Private Wealth Management.

The Federal Reserve said Wednesday that it expects the health crisis to weigh on the economy “over the medium term,” as it promised to keep in place massive amounts of aid and interest rates at nearly zero. Oil prices, bonds and other markets besides stocks have also been dominated in recent weeks by worries about the economic impact of the virus outbreak.

“Everything except equities is telling you things are not great,” Taback said. “This market is overly optimistic.”

Gilead’s release about its remdesivir drug hit markets at the same moment as a government report showing the U.S. economy shrank at a 4.8% annual rate in the first three months of the year.

Job losses have exploded since early April, as layoffs sweep the nation following widespread stay-at-home orders, and economists expect to see even worse numbers for the second quarter of the year.

The first quarter figure was “merely the tip of the iceberg,” said Michael Reynolds, investment strategy officer at Glenmede.

But stocks have been rallying over the last month as investors look beyond the current economic devastation and focus instead on the prospect of economies gradually reopening. Some U.S. states and nations around the world have laid out plans to relax restrictions keeping people at home and businesses bereft of customers. Any new treatment for COVID-19 could also lower the dread so prevalent among households and businesses around the world.

But what got the 31.4% rally for the S&P 500 started in late March was massive aid from the Federal Reserve and Congress. The Fed on Wednesday said it wouldn’t be pulling back on the aid anytime soon.

The market’s easing pessimism about the economy’s path is perhaps most clear in how the smallest stocks have been performing.

When recession worries were at their height, investors punished small-cap stocks and sent them to sharper declines than the rest of the market, in part on worries about their more limited financial resources. But the Russell 2000 index of small-cap stocks jumped 4.8% Wednesday. It’s up 10.4% this week alone, more than double the gain for indexes of bigger stocks.

The market’s gains were widespread and accelerated through the day. Big tech and communications stocks helped lead the way after Google’s parent company said its revenue was stronger in the first three months of the year than Wall Street was expecting.

Alphabet jumped nearly 9%, which helped communications stocks in the S&P 500 rise 5% for one of the biggest gains among the 11 sectors that make up the index.

Households are holding on to their money and reducing the use of what would typically be everyday services, like elective surgeries, among other cost-cutting steps as business and commerce remain locked down.

New data Wednesday from the National Association of Realtors also showed pending home sales dropped 20.8% in March.

Investors remained skeptical of how fast stocks have rebounded despite the gradual pace of resuming business activity.

They want to know when the deepest global downturn since the 1930s might end have been encouraged by plans to reopen factories, retailing and travel. But economists warn they are too optimistic and say evidence is mounting that the damage is even worse than forecast.

Markets have been mostly lukewarm the past week, with more than 4 million new jobless claims and oil markets crashing around the world.

Happening now

Some of the nation’s governors are rolling back curbs and allowing restaurants, hair salons and other businesses to reopen despite warnings by health experts that moving too fast might lead to new outbreaks.

President Donald Trump, running for re-election amid a slump that has wiped out more than 25 million jobs, is pressing other governors to lift lockdowns. Gov. Andrew Cuomo of New York, one of the hardest-hit and most populous states, says controls will be eased only after numbers of new cases decline.

Global stocks mostly edged up on Wednesday, buoyed as more governments plan to ease anti-virus controls and allow businesses to reopen.

What it means

Many investors remain skeptical of the U.S. stock market’s sporadic rallies, which have driven the S&P 500 up 28% from its March low.

The market looks bullish at times, but any gains made during the outbreak have been mostly fleeting, as Tuesday demonstrated, with investors wary about what the future holds, but still clinging to hope that government stimulus efforts will hold up the economy until business returns full speed.

What’s next

The Fed is not expected to take any major actions after the end of its two-day meeting Wednesday, having already deployed massive amounts of stimulus to help credit flows and businesses. However there will be interest in its views, with Fed Chairman Jerome Powell holding a news conference.

Europe

Markets in Europe were up slightly, while Shanghai and Hong Kong advanced. Japanese markets were closed for a holiday. Wall Street appeared set for small gains on the open.

The French and Spanish governments announced plans Tuesday to allow restaurants and other businesses to reopen gradually. They followed Italy, which announced similar plans on Sunday.

“Reopening hopes continue to characterize the market,” Jingyi Pan of IG said in a report.

In midday trading, London's FTSE advanced 0.9% to 6,008 and the DAX in Frankfurt added 0.3% to 10,830. The CAC 40 in France shed 0.2% to 4,561.

Wire coverage

We pay for the right to publish content from The Associated Press because we think it’s important to help you stay up to date on national and world news. Our staff typically compiles these reports, adding supplementary information from other news sources to emphasize angles that are important to our readers.

Earnings reports in Europe are mixed, with Volkswagen saying its business is resilient despite a drop in sales but planemaker Airbus warning that the air travel industry's troubles are just beginning.

The yield on the 10-year U.S. Treasury fell to 0.58% on Tuesday from 0.65% late Monday. Yields tend to fall when investors are downgrading expectations for the economy and inflation.

In energy markets, benchmark U.S. crude for June delivery gained $2.03 to $14.37 per barrel in electronic trading on the New York Mercantile Exchange. The contract lost 44 cents the previous day to settle at $12.34. Brent crude, used to price international oils, added 89 cents to $23.63 per barrel in London. It rose 47 cents on Tuesday to $20.46.

Asia

In Asia, the Shanghai Composite Index closed 0.4% higher at 2,822.44 and Hong Kong’s Hang Seng added 0.3% to 24,643.59. The Kospi in Seoul advanced 0.7% to 1,947.56.

The ASX-S&P 200 in Sydney gained 1.5% to 5,393.40 while India’s Sensex added 1.7% to 32,657.03. Singapore and Jakarta gained 0.4% while New Zealand shed 0.9%.

On Wednesday, New Zealand allowed construction sites, restaurants and some other businesses to reopen following a decline in new virus cases.

South Korea's government reported March industrial production increased by 4.6% compared with the previous month.

“We won’t get too many positive reports on activity in Asia over the coming months, so we should probably make the most of this one,” said Rob Carnell of ING in a report.

Elsewhere, Singapore on Tuesday extended its lockdown by four weeks after reporting its highest one-day toll of new cases a day earlier. India also reported a one-day record for new infections on Monday.

— Compiled by ArLuther Lee for The Atlanta Journal-Constitution. Joe McDonald contributed to this report for The Associated Press.