U.S. stocks closed mostly higher Thursday, with the S&P 500 notching its best January in over three decades, after the Federal Reserve signaled that rate increases are on pause and that its next policy move will depend on economic data.

The Dow Jones Industrial Average DJIA, +0.51% slid 15.19 points to 24,999.67, while the S&P 500 SPX, +1.05% rose 23.05 points, or 0.9%, to 2,704.10. The Nasdaq Composite Index COMP, +1.71% , meanwhile, advanced 98.66 points, or 1.4%, to 7,281.74.

For the month, the S&P 500 climbed 7.9% for its best January since 1987, while the Dow rose 7.2%, its best January since 1989. The Nasdaq had its best January since 2001 on the back of a 9.7% monthly gain.

Read: Here is what the stock market’s monster January rally means for February

What drove the market?

The Fed said it would be “patient” with interest rates at the conclusion of its two-day gathering on Wednesday, implying that it may be at the end of its rate-hike campaign. The central bank further surprised investors by issuing a separate statement regarding its $4 trillion balance sheet, indicating an unwind of that asset portfolio could end sooner than expected. The Fed cited market turbulence as one key consideration for its softer tone.

Read:How a dovish Fed sparked a stock-market rally and tanked the U.S. dollar

The market interpreted Chairman Jerome Powell’s remarks after the decision as a sign of a more accommodative posture, at least for the moment, as long as no other unforeseen factors, including a sluggish global economy, spook policy makers.

Read:How the Fed left stock-market investors at the mercy of incoming data

Meanwhile, the release of corporate quarterly results continued, with some three dozen S&P 500 components announcing earnings reports in the busiest day of the busiest week of earnings season.

In trade, market observers were watching developments between the U.S. and China as officials there attempted to forge the framework toward a resolution of tariff disputes in the final day of this round of negotiations. President Donald Trump tweeted that no final deal would be made “until my friend President Xi, and I, meet in the near future to discuss and agree on some of the long standing and more difficult points.”

Which data were in focus?

The number of Americans submitting new applications for unemployment benefits rose by 53,000 to 253,000 during the final week of January, the Labor Department reported Thursday. That’s well above consensus expectations of 216,000, per a MarketWatch poll of economists, though the spike was likely due in part to seasonal factors that will fade.

Wage growth accelerated in the fourth quarter of 2018, with compensation costs rising 2.9% year-over-year, the fastest pace in 11 years, the Labor Department said Thursday.

The Chicago purchasing managers index for January came in at 56.7, down from 65.4 in December.

New home sales in November rose to a seasonally adjusted annual rate of 657,000, up from 562,000 in October, above economists expectations of 563,000 new homes, per a MarketWatch poll.

What were strategists saying?

“We had a big up day yesterday, and now we’re seeing markets digest that today,” Mark Travis, chief executive of Intrepid Capital, told MarketWatch.

“Early on I thought Powell had more conviction and was going to give us steady doses of a smaller balance sheet and fed funds increases, but that’s all gone out the window,” Travis said.

“Fed Chairman Jerome Powell gave investors a belated Christmas gift today with a dovish tone on the trajectory of interest rates and plans for flexibility with regards to the balance sheet runoff,” wrote Lindsey Bell, investment strategist at CFRA Investment Strategist, in a note.

“Powell admitted that financial conditions tightened in Q4 and acknowledged global economic growth concerns warrant consideration in monetary policy,” she said.

Which stocks were in focus?

Facebook Inc. FB, +2.66% shares jumped 11% after the company reported record profit and said it added 1 million daily users in U.S. and Canada.

Shares of General Electric Co. GE, -1.57% rallied 12% after the industrial conglomerate reported a fourth-quarter profit that missed expectations, but revenue and cash flow that beat. If the stock can hold its gain, it would represent its best single-day performance in nearly a decade, according to Dow Jones Market Data.

Shares of PayPal Holdings Inc. PYPL, +2.49% were down 4% after the payments company issued a downbeat outlook for the current quarter.

DowDuPont Inc. US:DWDP slid 9.2% after it said sales were flat in its latest quarter as lower customer demand for its appliances and automotive products as well as the drop in oil prices weighed on the manufacturer’s top line.

Shares of United Parcel Service UPS, +0.51% were up 4.2% after the logistics company posted above-consensus earnings before the market open.

Charter Communications, Inc. CHTR, +3.04% soared 14% after the broadband and cable operator posted stronger-than-expected revenue for the fourth quarter.

Shares of ConocoPhillips COP, -0.17% gained 3% after the energy firm reported better-than-expected fourth-quarter earnings.

Sprint Corp. US:S rose 3.3% after the communications company posted fiscal third-quarter revenue above expectations, but reported that it lost money in the quarter.

How did other markets trade?

Asian stocks closed mostly higher, with Japan’s Nikkei 225 index rising 1.6%, and the Shanghai Composite Index gaining 0.4%.

In Europe, stocks were mixed, with the Stoxx Europe 600 SXXP, +0.20% down and the FTSE 100 UKX, +0.43% up.

Crude oil US:CLH9 prices reversed direction to fall, while gold prices US:GCH9 settled higher and the U.S. dollar DXY, +0.18% rose relative to its peers.

—Mark DeCambre contributed to this report