A late burst of buying erased earlier losses on Wall Street and left the Dow Jones industrial average with its 11th straight gain and another record close.
The market was down nearly all day before turning higher in the last half hour of trading.
The Dow rose 11.4 points to 20,821.7, while the the S&P 500 gained 3.5 points to 2,367.3 and the tech-focused Nasdaq Composite added 9.8 points to 5,845.3.
Goldman Sachs was the biggest faller on the Dow, down 1.5%.
JP Morgan Chase also struggled, closing 0.9% lower.
A dip in oil prices hit energy shares, with Chevron and ExxonMobil both shedding 0.8% and Southwestern Energy plunging 12%.
Walmart was the biggest Dow riser, up 1.5%.
Shares in Hewlett Packard Enterprise fell 6.9% after cutting its profit forecast.