NEW YORK (Reuters) - The S&P 500 posted its highest closing level since Nov. 8 on Friday as investors clung to signs of progress in the ongoing trade talks between the United States and China.

Investors assessed a slew of headlines on the talks, with top trade negotiators from the two countries meeting to wrap up a week of discussions on some of the thorniest issues in their trade war.

If the two sides fail to reach a deal by midnight on March 1, then their seven-month trade war could escalate.

“People are expecting some sort of positive news on trade and tariffs with China fairly soon,” said Peter Tuz, president of Chase Investment Counsel in Charlottesville, Virginia.

“But we won’t know until the end of next week,” he said, and, “there has been a lack of specifics.”

Optimism on the trade front and dovish signals from the U.S. Federal Reserve have driven the recent gains and left indexes well above their lows of December, when the market swooned on fears of an economic slowdown. The S&P 500 is now up about 19 percent since its late-December low.

The S&P 500 technology index was up 1.3 percent, leading gains among the 11 major S&P sectors, while the trade-exposed industrials index climbed 0.6 percent.

Slideshow ( 3 images )

The Dow Jones Industrial Average rose 181.18 points, or 0.7 percent, to 26,031.81, the S&P 500 gained 17.79 points, or 0.64 percent, to 2,792.67 and the Nasdaq Composite added 67.84 points, or 0.91 percent, to 7,527.55.

All three indexes registered gains for the week, with both the Dow and Nasdaq posting a ninth week of increases.

The number of New York Stock Exchange and Nasdaq stocks hitting 52-week highs hit 367, the most since mid-September and outnumbered those hitting year lows by the widest margin in six months.

Stocks briefly pared gains after U.S. officials briefed on the negotiations said more time is likely needed in the talks given China’s resistance this week to American demands for specific steps by Beijing to end forced transfers of U.S. technology and certain other policies.

Afterward, President Donald Trump said there was a very good chance the United States would strike a deal with China to end the trade war, and that he was inclined to extend his March 1 deadline to reach an agreement.

“Right now the downside risk has been not as steep, but there’s always a concern that something happens last-minute,” said Quincy Krosby, chief market strategist at Prudential Financial in Newark, New Jersey.

Slideshow ( 3 images )

“Having a Chinese economy that stabilizes is constructive for global markets,” she said. “That’s what is key in terms of the market looking at the results.”

Kraft Heinz Co tumbled 27.5 percent, and was the biggest drag on the S&P along with a 1.7 percent fall in Class B shares of the company’s controlling stakeholder, Berkshire Hathaway Inc.

The packaged food company posted a quarterly loss, disclosed a Securities and Exchange Commission probe and wrote down the value of its iconic Kraft and Oscar Mayer brands.

Advancing issues outnumbered declining ones on the NYSE by a 2.99-to-1 ratio; on Nasdaq, a 2.45-to-1 ratio favored advancers.

The S&P 500 posted 64 new 52-week highs and three new lows; the Nasdaq Composite recorded 112 new highs and 21 new lows.

About 6.9 billion shares changed hands on U.S. exchanges. That compares with the 7.3 billion-share daily average for the past 20 trading days.