The Dow Jones industrial average closed at a record on Thursday on the back of stronger-than-expected quarterly results from Caterpillar and 3M.
The 30-stock index gained 140.67 points to close at 26,392.79. The Dow rose as much as 206 points but came off its highs after President Donald Trump told CNBC the dollar will get "stronger and stronger" under his leadership. (Click here for the full story on Trump's comments.)
The dollar index reversed losses and traded higher by 0.1 percent.
The pared most of its gains and closed 0.1 percent higher at 2,839.25, a record. The Nasdaq composite gave up its gains and closed 0.1 percent lower at 7,411.16. Earlier, the S&P 500 and Nasdaq followed the Dow higher as a strong earnings season rolled on.
"The numbers companies are releasing, along with the upbeat views from executives, is helping analysts lift their estimates and that's helping stocks advance," said Mark Luschini, chief investment strategist at Janney. "You [also] have strong U.S. and overseas economic growth, and that is supportive for stocks."
Shares of Caterpillar rose as much as 2.8 percent before finishing 0.6 percent higher, while 3M gained 1.9 percent. Celgene and McCormick also reported better-than-forecast quarterly earnings and sales.
"This is going to be earnings-driven for the next couple of weeks," said Tim Dreiling, regional investment director at U.S. Bank Wealth Management. "Thus far, it's been terrific news."
Calendar fourth-quarter earnings and sales have mostly beat analyst expectations thus far. Of the companies that have reported quarterly results, 78 percent have beaten earnings expectations, while 82 percent have surpassed revenue estimates, according to Thomson Reuters I/B/E/S.
"Thus far corporate earnings have been strong enough to keep momentum building, with the few high profile disappointments coming from franchises that had already been suffering from self-inflicted wounds for a number of quarters," Michael Shaoul, chairman and CEO of Marketfield Asset Management.
"It is still too early to declare the earnings season a clear winner, but thus far the news flow has confirmed the clear picture coming from global economic data in recent months, namely that demand accelerated meaningfully over the course of 2017 and in most sectors has not yet been met by a sufficient increase in supply," Shaoul said.
Investors in the U.S. also looked to Europe after the European Central Bank kept interest rates unchanged. The euro shot against the dollar following the meeting, briefly breaking above $1.25.
"People were looking looking for dovishness out of [ECB President Mario] Draghi, and it wasn't until the end of the news conference that he delivered that," said Luke Bartholomew, investment manager at Aberdeen Standard Investments.
U.S. equities hit record highs on Wednesday before falling from those levels. A roll-over in tech stocks, valuation concerns and worries about protectionist U.S. policies knocked the major indexes from their records.