(CNBC) — U.S. stocks rallied Wednesday on the back of a jump in oil prices after reports that OPEC had reached a deal to cut production.

“The market will move on the deal but I think the expectations is that it will sort of go away,” said Quincy Krosby, investment strategist at Prudential Financial and former U.S. energy attaché. “Remember, they all agree that oil prices need to go higher.”

The deal was first reported by Reuters in afternoon ET. U.S. crude settled 5.33 percent higher at $47.05 per barrel on the heels of the news. Earlier, U.S. oil had traded lower after a build in gasoline stockpiles offset a draw in crude inventories.

Note: Read our discussion guidelines before commenting.