U.S. stocks closed little changed in light preholiday trading Wednesday, with equities hovering near three-week highs as investors weighed mixed economic data and weakness in commodities.

The Standard & Poor's 500 Index roamed in a narrow range for a third day, following the index's strongest week this year.

The S&P 500 fell less than 0.1 percent to 2,088.87, with the gauge holding in its tightest intraday range in six months. The Dow Jones industrial average closed at 17,813.39, up 1.20, while the Nasdaq finished at 5,116.14, up 13.34.

This was the week's final full trading session, as U.S. markets will be closed Thursday in observance of the Thanksgiving holiday, and equity markets close at 1 p.m. Friday.

"The economic numbers today basically confirm what we've seen - a moderate expansion," said David Donabedian, chief investment officer of Atlantic Trust Private Wealth Management, which oversees $27 billion. "It's a typical mixed bag of economic news. Markets continue to be focused not just on the Fed, but global central bank policy, with the [European Central Bank] meeting coming up next week."

A report Wednesday showed orders for U.S. business equipment climbed more than forecast in October, indicating steady domestic demand is encouraging corporate investment even as global sales waver. Separate data showed household spending rose less than forecast in October, while income gains accelerated.

Data on Wednesday also showed consumer confidence rose less than expected in November, while purchases of new homes rebounded in October from a 14-month low.

Order backlogs reached an eight-year high, indicating a pickup in residential construction.

Other recent reports have bolstered the case for the Federal Reserve to begin raising interest rates as soon as next month. Traders are now pricing in a 72 percent probability that the central bank will increase borrowing costs at its December meeting.

"It looks as though we're going to go into the new year with a fairly solid backdrop," said Nick Ford, a fund manager who helps oversee the equivalent of $3.7 billion at Miton Group in London. "The U.S. is economy doing OK. The GDP number that came out this week was reassuring. I wouldn't be surprised to see a decent year-end rally for equity markets generally."

Stocks were little changed so far this week, with the S&P 500 remaining less than 2 percent away from its May all-time high. A rally in energy shares yesterday helped equities erase an early slide triggered by the downing of a Russian warplane by Turkish forces.