The Nasdaq Composite rose slightly on Thursday, lifted by gains in Amazon and Apple, to notch its longest winning streak in nearly a year.
The tech-heavy index gained 0.04 percent to close at 7,891.78 as Amazon rose 0.6 percent to an all-time high while Apple jumped 0.8 percent. The Nasdaq also posted an eight-day winning streak, its longest since October.
Meanwhile, the broader market closed slightly lower as the failed to reach an all-time high. The S&P 500 fell 0.1 percent to 2,853.58 as energy and financials lagged. The Dow Jones Industrial Average slipped 74.52 points to 25,509.23 with Procter & Gamble slipping 1.2 percent.
The S&P 500 and Dow both traded flat for most of the session, but a late-day decline pushed them lower.
However, the S&P 500 is still less than 1 percent away from reaching 2872.87, a record high set on Jan. 26. The broad index has neared record territory as strong quarterly earnings have largely offset worries about rising trade tensions.
"The recent strength in equity markets is being driven by earnings and earnings have been superb," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management. "So the move higher here has been warranted."
Nearly 90 percent of S&P 500 companies have reported quarterly results thus far. Of those companies, 76 percent have reported better-than-expected earnings. Overall, S&P 500 earnings for the second quarter are up more than 24 percent versus the year-earlier period.
Booking Holdings and Norwegian Cruise Line both reported better-than-expected earnings on Thursday. Shares of Norwegian Cruise Line rose more than 4 percent, but Booking Holdings fell after issuing a weak third-quarter profit forecast.
"Earnings drive markets and earnings have been fantastic," said JJ Kinahan, chief market strategist at TD Ameritrade. "As much as people want to talk about fear, the Vix, gold and a lot of other things are telling you that maybe you should not be so fearful."
The Cboe Volatility Index (VIX), widely considered to be the best fear gauge in the market traded at 11.2 after hitting its lowest level since mid-January. Meanwhile, gold futures are trading near their lowest levels in over a year.
Trade tensions have simmered throughout the strong earnings season, however. Beijing announced Wednesday it would counter the most recent round of U.S. tariffs with its own. The Chinese Ministry of Commerce announced a 25 percent charge on $16 billion worth of U.S. goods. In total, 333 goods have been picked out by China, including vehicles, various types of fuels, recyclables and fiber optical cables.
It followed an announcement by the U.S. Trade Representative's office that the States would begin gathering levies on an additional $16 billion in Chinese goods from later this month.
Trade is "in the headlines and people think about it, but investors are also realizing ... the trade war is a long game and every piece of news we get is a piece of the puzzle," said Craig Birk, chief investment officer at Personal Capital.
The producer's price index remained unchanged in July, while economists polled by Reuters expected a gain of 0.2 percent. The report comes as the latest reading of the consumer price index — a key metric for inflation — is set for release on Friday.
Investors will be looking at the index for clues about the Federal Reserve's latest monetary policy moves. However, Brent Schutte, chief investment strategist for Northwestern Mutual Wealth Management, says the central bank will keep tightening monetary policy at a gradual pace. "Given how far into uncharted territory they have gone, they have been forced to gradually inch the ball moving forward," Schutte said.
Correction: The Nasdaq was on pace for an 8-day winning streak. The headline on an earlier version misstated the length of the winning streak.