NEW YORK (Reuters) - U.S. stocks surged on Wednesday as hopes for an effective COVID-19 treatment prompted a broad rally and helped investors shrug off bleak GDP data and words of warning from U.S. Federal Reserve Chair Jerome Powell.

Big tech companies provided the biggest lift to the S&P 500 and the Nasdaq, and pushed all three major U.S. stock averages closer to their all-time highs reached in February.

All are well within 20% of their record levels, with the tech-heavy Nasdaq now within 10% of its high.

Smaller companies, which stand to benefit more from restrictions being lifted on a state-by-state basis, continue to outperform their larger counterparts, with the Russell 2000 .RUT registering its sixth straight advance.

Drugmaker Gilead Sciences Inc GILD.O announced that its drug remdesivir is showing promise as an effective COVID-19 treatment, giving a boost to the broader market and sending its shares up 5.7%.

The U.S. economy suffered its sharpest decline in 11 years, with first-quarter GDP contracting at a 4.8% quarterly annualized rate according to the Commerce Department, marking the end of the longest U.S. economic expansion on record.

Many believe the worst is yet to come.

At the conclusion of its two-day monetary policy meeting, the Fed left key interest rates near zero and Chair Jerome Powell warned the economy will drop at an “unprecedented rate” in the current quarter.

But Powell also said the economy will pick up as restrictions are lifted and vowed the central bank would continue to support the recovery.

FILE PHOTO: The floor of the New York Stock Exchange (NYSE) stands empty as the building prepares to close indefinitely due to the coronavirus disease (COVID-19) outbreak in New York, U.S., March 20, 2020. REUTERS/Lucas Jackson

“(The Fed has) really put themselves in the forefront of trying to lead this recovery back,” said Rick Meckler, partner at Cherry Lane Investments in New Vernon, New Jersey. “They have been aggressive and probably are a big reason for some of the strength the market has shown even in light of some really negative economic news.”

The Dow Jones Industrial Average .DJI rose 532.31 points, or 2.21%, to 24,633.86, the S&P 500 .SPX gained 76.12 points, or 2.66%, to 2,939.51 and the Nasdaq Composite .IXIC added 306.98 points, or 3.57%, to 8,914.71.

Of the 11 major sectors in the S&P 500, all but utilities .SPLRCU and consumer staples .SPLRCS ended the session in the black, with energy companies .SPNY enjoying the largest percentage gain.

Earnings season has hit full-stride, with 192 of the companies in the S&P 500 having reported. Of those, 64.6% have beaten consensus estimates, according to Refinitiv data.

In aggregate, first-quarter S&P 500 earnings are seen dropping 15.1 percent from a year ago, a stark reversal from the 6.3% annual growth forecast on Jan. 1, per Refinitiv.

Google parent Alphabet Inc GOOGL.O jumped 8.9% after the company reported steady advertising sales and a 13% year-on-year revenue increase.

Boeing Co BA.N shares surged 5.9% after the planemaker announced it would shrink its workforce and production to contend with plunging demand.

Ride share company Lyft Inc LYFT.O plans to cut 17% of its workforce, according to a Reuters exclusive. Its shares were up 4.0%.

Facebook Inc FB.O rose about 8%, whiles shares of both Microsoft Corp MSFT.O and Tesla Inc TSLA.O gained nearly 2% in after-market trading following their earnings reports.

Advancing issues outnumbered declining ones on the NYSE by a 6.73-to-1 ratio; on Nasdaq, a 4.29-to-1 ratio favored advancers.

The S&P 500 posted 6 new 52-week highs and no new lows; the Nasdaq Composite recorded 42 new highs and 1 new lows.

Volume on U.S. exchanges was 12.71 billion shares, compared with the 12.28 billion average over the last 20 trading days.