NEW YORK — Energy companies jumped with the price of oil Wednesday, but overall, stocks finished only slightly higher as a quiet week of trading continued.

The price of U.S. crude oil jumped 3 percent as fuel stockpiles kept shrinking, and that made investors more optimistic about energy company profits. Strong earnings from video game maker Electronic Arts and chipmaker Nvidia helped technology stocks move up. However weak results from Priceline and Disney hurt consumer-focused companies, and health care stocks also stumbled as drug companies fell.

Investors didn’t react much to President Trump’s surprise decision to fire FBI Director James Comey on Tuesday evening. U.S. stocks also had little reaction to the French presidential election last weekend, although European indexes climbed following the win by centrist candidate Emmanuel Macron.

“It’s almost as if the market has become numb,” said Julian Emanuel, an equity strategist for UBS. “Investors are interpreting this as more noise.” Until they have a clearer understanding of how well the economy is doing and whether Trump’s policies will be implemented, he said investors may just wait and see.