U.S. stocks closed higher Wednesday but well off session highs as declines in consumer staples and utilities weighed.
The Dow Jones industrial average closed up about 43 points at its highest since July 20, 2015. Earlier, the index added more than 100 points to hit its highest since June 23, 2015.
"You're running into a lot of resistance here. We didn't sell off on the decline in oil prices. Now we rally on the rise in oil prices. A lot of confusion, I have to say," said Peter Boockvar, chief market analyst at The Lindsey Group. He also noted the afternoon strength in the U.S. dollar may also have pressured stocks.
The U.S. dollar index was more than half a percent higher, with the euro near $1.129 and the yen at 109.79 yen against the greenback.
U.S. crude oil futures for May delivery settled up $1.55, or 3.77 percent, at $42.63 a barrel, for its highest close of the year so far. After the settle, the contract rolled to June, which settled up 4.03 percent at $44.18 a barrel.
Stocks are rising with "people putting money to work during earnings season, continued short covering and more of a risk-on sentiment around the world right now," said Peter Coleman, head trader at Convergex. He noted some support for stocks from the rise in oil prices, but pointed out the correlation has declined recently.