New York CNN Business  — 

US stocks climbed Friday on hopes for progress on the “phase one” trade deal between the United States and China, but the S&P 500 fell just short of reaching a new all-time high.

The S&P (SPX) climbed above its record closing high on July 26 around midday Friday, but the index slipped and closed up 0.4% – some three points below the July record.

The Dow (INDU) and the Nasdaq Composite (COMP) both still have a little further to go to hit their July records.

The Dow closed up 153 points, or 0.6%, while the Nasdaq finished up 0.7% on Friday.

All three indexes recorded a gain this week, in which market moves were drive mostly by corporate earnings. For the S&P, it was the third straight week of gains, while it was the fourth week of wins for the Nasdaq.

However, on Friday, the Office the US Trade Representative said that the United States and China made headway on finalizing their phase one trade agreement. This gave stocks a boost.

The world’s two largest economies reached a preliminary trade agreement two weeks ago.