Stocks extended gains by the final hour of trading Thursday after the Organization of Petroleum Exporting Countries fueled hope that members could reach a deal to limit the supply of crude oil and stabilize prices. 

The S&P 500 was up 0.73%, the Dow Jones Industrial Average added 0.9%, and the Nasdaq gained 0.41%. Benchmark indexes had struggled for direction earlier in the session. 

Crude oil recovered a level around $33 late Thursday on reports Venezuela, Russia, Saudi Arabia and Qatar had agreed to meet in March to further negotiate a production freeze. West Texas Intermediate crude was up 2.6% to $32.97 a barrel on Thursday.

Prices had been under pressure earlier after Citi economists predicted a looming global recession. Citi anticipates 1.6% global growth in advanced economies in 2016, down from 2.4% growth predicted a year earlier.

"In our view, global growth is at a highly precarious point, after two to three years of relative calm," Citi economists wrote in a note. "The long-standing fragilities in the world economy relate to the structural and cyclical slowdowns in China and its unsustainable exchange rate regime, the excessive level of debt across many countries and sectors and ongoing regional and geopolitical uncertainty."

Commodity traders have been on high alert over excessive supply and weakening demand, especially as members of OPEC, the world's largest oil supplier, struggle to find consensus on production levels. 

Durable goods orders jumped 4.9% in January, driven by a nearly 55% surge in civilian aircraft purchases. Economists expected new orders for U.S. manufactured goods to climb 2% in January, recovering from a 5% decline in December. Excluding transportation, durable goods rose 1.8%, far steeper than an estimated 0.4% increase.

The results suggested that fears over a manufacturing slowdown in the U.S. may have been overblown, though pressure remains.

"While today's report breathes some life into the outlook for the troubled manufacturing sector as well as prospects for business spending, we are not out of the woods yet," Wells Fargo economists wrote in a note. "Core capital goods orders and shipments are both falling on a three-month annualized basis."

Weekly jobless claims rose 10,000 to 272,000 in the past week, though they remained near multi-year lows. The less-volatile four-week average fell 1,250 to 272,000, its lowest level since early December.

Chinese markets slumped on Thursday as traders fretted over market liquidity and battered investors exited the market after months of extreme volatility. China's Shanghai Composite tumbled 6.4%, adding to its 22% decline since the beginning of the year. It's an inopportune time for such a selloff, with central bank leaders and finance ministers set to gather at the G-20 meeting in Shanghai on Friday.

It was a busy day for earnings in the final leg of the reporting season. AB InBev (BUD) - Get Report fell more than 2% after missing profit estimates due to weaker market share in the U.S. The world's biggest brewer reported a 10% decline in overall sales.

Kohl's (KSS) - Get Report climbed on Thursday after beating estimates in its recent quarter and announcing a $600 million share buyback program. The retailer also said it plans to close 18 underperforming stores, which account for less than 1% of its total sales.

Best Buy (BBY) - Get Report  gained, despite issuing a disappointing outlook. The electronics retailer expects first-quarter earnings between 31 cents and 35 cents a share, below estimates of 39 cents. Same-store sales are forecast to fall 1% to 2%, far sharper than an estimated 0.1% decline. The company also announced a 22% increase in its quarterly dividend and a new $1 billion stock buyback plan.

Restoration Hardware (RH) - Get Report slumped after fourth-quarter results came in well below estimates. Adjusted earnings of 99 cents a share missed estimates of $1.39, while revenue of $647.2 million fell short of forecasts of $711 million.

Salesforce.com (CRM) - Get Report climbed on a stronger outlook. The cloud-software company expects first-quarter earnings between 23 cents and 24 cents a share, above expectations of 21 cents.

HP (HPQ) - Get Report slid after its first earnings report since spinning off its cloud business into Hewlett Packard Enterprise (HPE) - Get Report . The printer and PC company expects full-year earnings between $1.59 and $1.69 a share, potentially exceeding consensus of $1.60.