Stocks rallied in a wild session after the Federal Reserve raised rates and said it would hike another six times this year.

The Dow Jones Industrial Average rose 518.76 points, or 1.5%, to 34,063.10 after turning red initially following the release of the Fed’s statement. It swung within a 576-point range on the session. The S&P 500 added 2.2% to 4,357.86, and the Nasdaq Composite gained 3.7% to 13,436.55.

The Fed announced at the conclusion of its two-day meeting Wednesday that it will increase short-term interest rates by a quarter of a percentage point, a well-telegraphed move by the central bank as it seeks to control surging inflation. But it was the central bank’s outlook that surprised traders somewhat and knocked the market down initially.

The Fed forecast a consensus funds rate of 1.9% by year’s end, which would mean a hike at each of the remaining central bank meetings this year.

“This is a very aggressive move,” David Kelly, chief global strategist at JPMorgan Asset Management, said on CNBC’s “Power Lunch.” “I just want the Fed to maintain some flexibility. In the long run, we have to get rates back to positive real levels. But there’s a lot of uncertainty out here, and remember we’ve got a lot of financial assets which are built on the edifice of super low rates, and you can’t just raise those rates up to normal levels overnight and expect nothing bad to happen.”

After the initial decline, stocks recovered in the final hour of trading as some investors cheered the Fed’s aggressive posture on the belief it would help the economy over the long term by lowering inflation.

Loading chart…

“The market seems to be taking today’s news in stride, which means it likely priced in today’s announcement accordingly,” said Mike Loewengart, E-Trade’s managing director of investment strategy. “And let’s not forget that monetary tightening means the Fed believes the economy is on solid footing, which is a good thing at the end of the day.”

The announcement by the Fed showed investors it is no longer waiting to make significant steps to tighten current monetary policy, according to Charlie Ripley, senior market strategist for Allianz Investment.

“The reality is that inflation expectations have evolved to a point where the Fed finally recognized there was some significant catching up to do,” he said. “With inflation remaining stubbornly high, the Fed will need to assert aggressive policy action not just through a series of rate hikes, but through additional changes to the Fed’s balance sheet. Now it is up to the market to become more comfortable with the hawkish stance.”

The 10-year Treasury yield touched its highest level since 2019 after the Fed’s statement.

Bank shares gained on optimism their bottom lines would get a boost from higher rates. JPMorgan shares added 4.4%, while Bank of America added 3.1%.

Stocks started the day in the green following a Financial Times report that Ukraine and Russia have made “significant progress” on a peace plan and Russian withdrawal.

Before the FT report, stocks were gaining on hopes that some sort of ceasefire was close. Ukrainian President Volodymyr Zelenskyy said a peace agreement was beginning to “sound more realistic” in an address to the nation Tuesday. Russian Foreign Minister Sergey Lavrov told the BBC there was “some hope of reaching a compromise.” Russian State media quoting the Kremlin echoed similar sentiments overnight.

Stock picks and investing trends from CNBC Pro:

“You’re starting to see some resolution of some of the overhang in terms of the broader economic issues,” said Stephanie Lang, chief investment officer at Homrich Berg. “The market is hoping for resolution in the Ukraine, but of course, it’s just talks at this point, and we actually need to see a ceasefire, we need to see that play out in more entirety before we close the loop on that so there’s still a lot of uncertainty.”

The war between Ukraine and Russia has sent ripples through global financial markets, pushing commodity prices sharply higher and stocks lower. However, some commodities have cooled off in recent days, while the U.S. equity market tries to find its footing.

Micron Technology was among the best-performing S&P 500 stocks, gaining more than 8.9%. Starbucks shares climbed 5.1% after an upgrade from JPMorgan, while Dow member Boeing advanced 5%.

This material is provided by