The S&P 500 closed just short of an all-time high Friday as investors welcomed solid company earnings reports and an encouraging update on trade talks between the United States and China.

Technology, communications services and financial stocks powered the rally. The index ended within 0.1% of its record set July 26. It also notched its third straight weekly gain.

Strong earnings reports from Intel, Charter Communications and other companies helped reverse a mixed start.

The buying accelerated around midday after the U.S. Trade Representative's office said the discussions with China's negotiating team "made headway and the two sides are close to finalizing some sections of the agreement."

"You've had indexes around the world make new highs since the last time the S&P did," said Willie Delwiche, investment strategist at Baird. "If we want to see a new high that's going to be durable we need to see more U.S. broad market improvement. It's heading in that direction, but it's not there yet."

The S&P 500 rose 12.26 points, or 0.4%, to 3,022.55.

The Dow Jones Industrial Average gained 152.53 points, or 0.6%, to 26,958.06. The Nasdaq climbed 57.32 points, or 0.7%, or 8,243.12. The Russell 2000 index of smaller stocks picked up 8.53 points, or 0.6%, to 1,558.71.

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Out East: Nettie's Country Bakery ... Rising beef prices ... Get the latest news and more great videos at NewsdayTV

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Out East: Nettie's Country Bakery ... Rising beef prices ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME