Stocks held slight gains by mid-afternoon Wednesday in choppy, low-volume trading ahead of the Thanksgiving Day holiday on Thursday.

The S&P 500 was up 0.14%, the Dow Jones Industrial Average gained 0.18%, and the Nasdaq added 0.4%.

Crude oil prices backed off of steep losses seen earlier in the session after a smaller-than-expected increase in weekly inventories and a drop in active oil rigs in the U.S. Inventories added 961,000 barrels last week, below an expected increase of 1.1 million barrels. Active oil rigs fell by 9 to 555 in the past week, according to Baker Hughes data. West Texas Intermediate crude recovered a level above $42 a barrel, trading 0.4% lower at $42.70.

Conflicting economic data out on Wednesday suggested a two-speed U.S. economy and undermined investors' bets on a Federal Reserve rate hike in December.

Durable-goods orders in the U.S. rose 3% in October, climbing for the first time in three months, the Commerce Department said on Wednesday. Analysts had expected durable goods to rise 2.1% last month. The better-than-expected reading was driven by demand for commercial airplanes.

Meanwhile, consumer spending remained weak in October, the second consecutive month of tepid growth. Spending rose just 0.1% in October, one-third the result analysts had expected. Personal incomes climbed 0.4%, in line with estimates.

"Overall, [consumer spending was] a disappointing release that won't help the Fed justify a liftoff -- although we don't expect it will prevent them from moving forward with the hike in December," said CRT Capital analyst Ian Lyngen in a note.

New home sales in the U.S. rebounded in October, jumping 10.7% from September to an annual rate of 495,000. Sales have been under pressure as higher prices kept first home buyers at bay.

The number of new claims for unemployment benefits unexpectedly fell by 12,000 to 260,000 in the past week, according to the Labor Department. The measure remains near 15-year lows. Analysts had expected jobless claims to tick up 1,000 to 272,000.

The economic calendar was busy Wednesday as releases were pushed forward to accommodate for the Thanksgiving holiday in the U.S. on Thursday.

Yahoo! (YHOO) shares gained 1% despite Standard & Poor's lowering its rating outlook on the Internet company to negative from stable. The ratings firm said weak revenue growth and decreasing competitiveness in Yahoo!'s advertising businesses had affected its decision.

Costco (COST) - Get Report joined Chipotle (CMG) - Get Report in an E.coli outbreak after the Centers for Disease Control and Prevention said that the retailer's rotisserie chicken salad had been linked to illnesses in seven states. Five people have been taken to the hospital, but no deaths have been reported. Chipotle has been ensconced in its own E.coli outbreak that has affected locations in six states.

Deere (DE) - Get Report jumped nearly 4% after cost cuts helped the company beat quarterly earnings estimates. The farm equipment manufacturer earned $1.08 a share, well above an expected 75 cents a share. However, the results were much weaker than a year earlier as the company faces weaker global demand for construction and farm equipment. Sales tumbled 25% to $6.72 billion.

HP Inc (HPQ) - Get Report , the newly standalone printing and personal computing business, fell more than 5% after reporting weak fourth-quarter sales. Revenue tumbled 15%, while earnings of 93 cents a share were on the weak side of a forecast range of 92 cents to 98 cents a share. Shares fell 13%.

Newly spun-off Hewlett-Packard Enterprise (HPE) - Get Report climbed 3% after forecasting better-than-expected fiscal 2016 results. The company expects full-year profit between 75 cents and 85 cents a share, above estimates of 74 cents. Shares climbed 2.2%.

Guess? (GES) - Get Report climbed more than 6% after reporting a surprisingly strong third quarter driven by strength in its European business. The retailer earned 15 cents a share, above expectations of 11 cents a share.