Stocks rallied into the close Friday to notch their second-straight weekly gain after investor sentiment was buoyed by news of a possible treatment for the COVID-19 disease and after the Trump administration announced guidelines for reopening the economy late Thursday.

The Dow Jones Industrial Average DJIA, -0.87% rose 704.81 points, or 3%, to end the session at 24,242.49, while the S&P 500 SPX, -1.11% advanced 75.01 points, or 2.7%, to 2,874.56. The Nasdaq Composite Index COMP, -1.07% gained 117.78 points, or 1.4%, to close at 8,650.14.

For the week, the Dow gained 2.2%, the S&P 500 advanced 3% and the Nasdaq rose 6.1%.

What drove the market?

Support for stocks was attributed to a report from health-care media site Stat News that indicated promising results for a drug used to treat COVID-19, the disease that has claimed more than 140,000 lives around the globe and forced the closure of much of the U.S. and global economy in an effort to contain it.

University of Chicago Medicine researchers saw “rapid recoveries” in 125 patients suffering from COVID-19 who were taking Gilead Sciences Inc.’s GILD, +0.01% experimental drug remdesivir as part of a clinical trial, according to a Thursday night report.

Friday afternoon, the National Institutes of Health published a media advisory announcing the results of a study showing the drug effective in treating monkeys infected with COVID-19.

Read:Why an analyst bullish on Gilead says antiviral drug ‘won’t solve’ COVID-19

The results have grabbed the attention of Wall Street because there is no vaccine for the potentially fatal illness, and any signs of progress toward a treatment have the potential to elicit euphoria from investors who have been rocked by the economic shock that has resulted from efforts to slow down the spread of the contagion.

“The market is fueled by hope and optimism today — hope for a vaccination and optimism around reopening the economy,” Mike Loewengart, managing director of investment strategy at E-Trade wrote in an email. “That said, these are relatively fragile indicators as testing remains under way and areas hard hit like New York and New Jersey continue to operate under strict stay-at-home orders.”

More than 22 million Americans have lost their jobs over the past month, according to weekly data from the U.S. Labor Department, likely lifting the unemployment rate to around 15% from 3.5% in February.

See:Coronavirus erases almost all the 23 million new jobs created since the 2007-09 recession

However, even though remdesivir is considered a front-runner to help treat COVID-19, the results represent a very small sample and aren’t based on full clinical-trial data.

“If we’re playing devil’s advocate to the bullish reaction—an important word here ‘is ‘early’. It was a small trial and there was no control group so there’s plenty of room for error,” said Jasper Lawler, head of research at London Capital Group, in a note.

Optimism around a treatment came as President Donald Trump late Thursday outlined a three-phase process to restarting the U.S. economy that puts the onus on states.

“America wants to be open, and Americans want to be open,” Trump told reporters at the White House on Thursday, adding later, “We must have a working economy, and we want to get it back very, very quickly.”

There is no direct timetable assigned to the guidelines, but under the first phase, movie theaters, restaurants, sports venues, places of worship, gyms and other venues could reopen with social distancing guidelines in place. Meanwhile, nonessential travel, bars, and schools could be restarted with limitations in the second phase; while further restrictions would be slowly phased out in the final stage.

Meanwhile China reported that its economy contracted by 6.8% in the first three months of the year compared with a year earlier, the country’s first such drop since Beijing began reporting quarterly gross domestic product in 1992. The data, reflecting the hit to the economy suffered as the China dealt with the coronavirus outbreak earlier this year, was seen underlining the economic pain being suffered in the U.S. and Europe as they attempt to contain the outbreak.

An Index of Leading Economic Indicators showed a record 6.7% drop in March, the latest round of grim data reflecting the toll of the coronavirus. On Thursday, data showed more than 5 million first-time claims for jobless benefits last week, while figures earlier in the week showed a more-than-8% drop in March retail sales.

Which companies were in focus?

Shares of Gilead rose 9.7%.

Apple Inc. AAPL, -3.17% shares fell 1.4% after Goldman Sachs analysts downgraded the stock to sell on Friday and cut its price target to $233 from $250, as it reduced its earnings estimates for a third time since Feb. 17.

AAPL, shares fell 1.4% after Goldman Sachs analysts downgraded the stock to sell on Friday and cut its price target to $233 from $250, as it reduced its earnings estimates for a third time since Feb. 17. Shares of Boeing Co . BA, -3.81% which tumbled 8% Thursday, jumped more than 14.7% after the aeronautics manufacturer and defense contractor said it would resume making planes. The company has been under crushing pressure due to the coronavirus outbreak and the grounding of its 737 Max fleet.

. BA, which tumbled 8% Thursday, jumped more than 14.7% after the aeronautics manufacturer and defense contractor said it would resume making planes. The company has been under crushing pressure due to the coronavirus outbreak and the grounding of its 737 Max fleet. Procter & Gamble Co. PG, -0.10% shares rose 2.6% in Friday trade after the consumer goods company reported fiscal third-quarter earnings that beat expectations.

What did other markets do?

Nearby U.S. oil futures CL.1, -0.34% plunged to an 18-year low, while deferred contracts US:CLM20 rose, underscoring concerns about rapidly shrinking storage availability thanks to a collapse in demand and the recently ended price war between Saudi Arabia and Russia. West Texas Intermediate crude for May delivery fell $1.60, or 8.1%, to settle at $18.27 on the New York Mercantile Exchange.

Gold futures US:GCM20 retreated and Treasury yields TMUBMUSD10Y, 0.701% rose as investors shunned traditional havens in favor of stocks and other risky assets. Bond yields rise as prices fall. Gold for June delivery fell $32.90, or 1.9%, to settle at $1,698.80 an ounce on Comex.

European stocks rallied, with the STOXX 600 Europe Index SXXP, -0.66% closing 2.6% higher.

— Mark DeCambre contributed to this report