U.S. stocks rallied on Thursday, with the Nasdaq closing at a record, as a round of solid earnings led by American Express had pushed equities higher.
The credit card company closed up 5.9 percent as the top boost to the Dow Industrials after reporting a smaller-than-expected drop in quarterly profit late Wednesday.
CSX Corp climbing 5.6 percent, was one of the best performers on the S&P 500 after the railroad reported a better-than-expected quarterly net profit driven by rising freight volumes and said it plans to cut costs and boost profitability moving forward.
Major indexes have fallen for two straight weeks, retreating from record levels as worries about President Donald Trump's ability to deliver on his pro-growth promises raised some concern about stretched stock valuations.
Mounting tensions between North Korea and the United States, as well as the looming French presidential elections, also served to heighten investor caution. Recent polls showed centrist Emmanuel Macron hung on to his lead in a four-way French race that is too close to call.
Of the 82 companies in the S&P 500 that have reported earnings through Thursday afternoon, about 75 percent have topped expectations, above the 71 percent average for the past four quarters.
Overall, profits of S&P 500 companies are estimated to have risen 11.1 percent in the quarter, the best since 2011.
The Dow Jones Industrial Average rose 174.22 points, or 0.85 percent, to 20,578.71, the S&P 500 gained 17.67 points, or 0.76 percent, to 2,355.84 and the Nasdaq Composite added 53.74 points, or 0.92 percent, to 5,916.78.
The S&P 500 closed just below its 50-day moving average, a level that had acted as resistance after the index fell below it last week.