Stocks climbed Friday to close out a volatile week of trading, as investors continued to assess the financial risks stemming from Russia’s invasion of Ukraine.

The Dow Jones Industrial Average added 834.92 points, or 2.5%, closing at 34,058.75. The blue-chip average notched its best day since November 2020. The S&P 500 gained 2.2% at 4,384.65. The Nasdaq Composite rose 1.6% to 13,694.62.

Stocks are coming off a whipsaw trading session Thursday in which the major indexes staged a massive comeback from steep declines earlier in the day. The Dow on Thursday erased a more than 800-point decline to close higher.

“Investors who have anticipated elevated volatility in 2022 swiftly came into the marketplace and you’re seeing follow-through today,” Jeff Kilburg, chief investment officer of Sanctuary Wealth, said. “We were in an oversold condition. There was an overreaction in the equity markets to the Ukraine crisis.”

Loading chart…

The Dow posted its third-straight losing week despite the two-day surge, however. The S&P 500 and the Nasdaq Composite finished the week 0.8% and 1.1% higher, respectively.

Shares of Johnson & Johnson and 3M were the top gainers of the Dow on Friday, adding more than 4% each. Etsy shares led the S&P 500 on Friday, rising 16.2% after the online marketplace’s quarterly results beat analyst estimates.

Shares of Beyond Meat tumbled 9.2% after a disappointing earnings report. Foot Locker shares plunged 29.8% after the retailer said 2022 sales will fall as it expects to sell fewer Nike products.

Market sentiment got a boost Friday after the Kremlin reportedly said that Russian President Vladimir Putin is ready to send a delegation to Belarusian capital Minsk for negotiations with Ukraine.

Russia is closing in on the capital city of Kyiv, according to Ukrainian officials. The capital had been hit by “horrific Russian rocket strikes,” Ukrainian Foreign Minister Dmytro Kuleba said.

The U.S. will impose a slate of sanctions on Putin and Foreign Minister Sergey Lavrov, the White House said Friday. The move follows similar sanctions announced by the United Kingdom and the European Union.

President Joe Biden this week rolled out new sanctions against Russia’s largest banks and its sovereign debt in a broad effort to isolate Moscow from the global economy.

“There’s chaos on the ground, but there’s clarity on sanctions, and I think that’s where the market is taking some comfort,” said Jeff Kleintop, chief global investment strategist at Charles Schwab.

On the data front, the core personal consumption expenditures price index, the Federal Reserve’s primary inflation gauge, rose 5.2% from a year ago, the Commerce Department reported Friday. Economists surveyed by Dow Jones expected a 5.1% print.

Stock picks and investing trends from CNBC Pro:

The Nasdaq Composite is still in correction, or down more than 10% from its record high. The Dow and S&P 500 are just outside of correction territory.

“It’s a headline-driven market, and as we get some resolution and see what happens with Russia and Ukraine, the focus will be back on the Fed again,” Bespoke Investment’s Paul Hickey told CNBC’s “TechCheck” on Friday.

This material is provided by