(CNBC) -- U.S. stocks climbed in the volatile session on Wednesday as investors cheered a batch of solid corporate earnings as well as data showing subdued inflation.
The S&P 500 gained 0.1%, hitting an all-time high. The Dow Jones Industrial Average last traded up 120 points. At its session low, the blue-chip average fell 150 points. The Nasdaq Composite was flat as Amazon and Apple traded in the red.
The U.S. consumer price index rose 0.3% in January, matching expectations from economists polled by Dow Jones. The core consumer price index, which excludes volatile food and energy costs, was unchanged last month.
Advertisement - story continues below