The Nasdaq and the S&P 500 rose toward session highs on Wednesday as shares of technology and those of natural resource companies advanced on the back of U.S. dollar weakness, but the Dow traded near breakeven after briefly turning positive.

Home Depot Inc , down 1.5 percent at $28.86, was the Dow's second-worst drag following a report that showed new home sales fell unexpectedly in November.

The U.S. dollar index <.DXY> was off 0.4 percent. A weaker dollar benefits exporters, which include technology companies and big manufacturers such as Caterpillar Inc . Shares of Caterpillar shot up nearly 1 percent.

The Dow Jones industrial average <.DJI> was off 5.67 points, or 0.05 percent, at 10,459.26. The Standard & Poor's 500 Index <.SPX> added 1.07 points, or 0.10 percent, to 1,119.09. The Nasdaq Composite Index <.IXIC> gained 10.87 points, or 0.48 percent, to 2,263.54.

(Reporting by Ellis Mnyandu; Editing by Jan Paschal)