Solid profits and forecasts from several technology companies helped lift U.S. stocks to modest gains Thursday, nudging the S&P 500 within striking distance of its all-time high.

The benchmark index wavered between small gains and losses through much of the day as investors reviewed another round of third-quarter earnings reports and company outlooks heading into 2020.

Traders have braced for weaker results this earnings season amid concerns about the costly trade war between the United States and China, and increased signs of slowing economic growth worldwide.

Earnings reports in the last couple of weeks, representing roughly a third of companies in the S&P 500, have mostly exceeded Wall Street analysts' modest expectations. However, many of those that delivered improved results for the quarter have also issued disappointing profit outlooks. That's led to several days of uneven trading in the markets. On Thursday, decliners outnumbered gainers among stocks in the New York Stock Exchange.

"What we would have needed to see for the market to be really cheering this [earnings] story is if companies were beating and then raising forward expectations," said Rob Haworth, senior investment strategist at U.S. Bank Wealth Management. "But you're not seeing that very consistently."

After moving sideways for much of the day, the S&P 500 added 5.77 points, or 0.2%, to 3,010.29. The index is now within 0.6% of its all-time high set July 26. The Dow Jones Industrial Average dropped 28.42 points, or 0.1%, to 26,805.53. The Nasdaq, which is heavily weighted with technology stocks, climbed 66 points, or 0.8%, to 8,185.80. The Russell 2000 index of smaller stocks slipped 2.67 points, or 0.2%, to 1,550.18.

Lasting tribute in Oakdale ... What's in the store with the weather ... Out East: Shellfish surprise Credit: Newsday

Updated 19 minutes ago Knicks back in finals for first time since 1999 ... Ticket prices through MSG roof! ... Blakeman's agenda for 'new' NY ... Out East: Shellfish surprise

Lasting tribute in Oakdale ... What's in the store with the weather ... Out East: Shellfish surprise Credit: Newsday

Updated 19 minutes ago Knicks back in finals for first time since 1999 ... Ticket prices through MSG roof! ... Blakeman's agenda for 'new' NY ... Out East: Shellfish surprise

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME