U.S. stocks rose on Friday and the S&P 500 was on track for a second straight week of gains as optimism over more federal fiscal aid gathered momentum.

U.S. House Speaker Nancy Pelosi said she would resume talks on a possible COVID-19 stimulus package with Treasury Secretary Steven Mnuchin later on Friday, with a report saying Mnuchin will present $1.8 trillion in counter offer.

Recent trading on Wall Street has been dictated by headlines on fiscal aid, with the three main indexes tumbling on Tuesday after U.S. President Donald Trump called off negotiations. He has since indicated he was willing to resume discussions.

"The market's reacting well to Trump's sudden turnaround in terms of a support package and this new package that he proposed that's much larger than previously," said Tim Ghriskey, chief investment strategist at Inverness Counsel in New York, New York.

"It probably shows some desperation on his part. A lot of this has been politics, but a lot of people believe the economy really needs some economic support here, so that's a good thing."

The Dow Jones Industrial Average rose 128.45 points, or 0.45%, to 28,553.96, the S&P 500 gained 25.23 points, or 0.73%, to 3,472.06 and the Nasdaq Composite added 127.11 points, or 1.11%, to 11,548.09.

Energy stocks fell more than 1% following recent gains.

Strategists say investors have also begun to digest the possibility of Democratic candidate Joe Biden winning the Nov. 3 preidential election after a fractious debate last month led to a jump in his lead over Trump in several national polls.

In company news, Xilinx Inc surged 13.8% after a report said Advanced Micro Devices Inc was in talks to buy the chipmaker in a deal valued at more than $30 billion. Shares of AMD fell. General Electric Co jumped 2.3% as a report said Goldman Sachs reinstated coverage on the U.S. industrial conglomerate with a "buy" rating, saying the company will emerge stronger from the COVID-19 pandemic.

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

The S&P 500 posted 75 new 52-week highs and one new low; the Nasdaq Composite recorded 135 new highs and 16 new lows.