(AP) -- Wall Street closed out its best week in three months Friday as investors drew encouragement from ongoing negotiations on Capitol Hill aimed at delivering more aid to the ailing U.S. economy.
The S&P 500 rose 0.9%, its third straight gain. The benchmark index ended the week with a 3.8% gain, its strongest rally since early July. The solid finish follows a weekslong run of mostly shaky trading over worries that Congress and the White House won't deliver more support for the economy as it reels from the impact of the pandemic and concerns that stock prices simply got too high during the summer.
Much of this week's focus has been on Washington, where President Donald Trump sent markets on a sudden skid Tuesday after he halted negotiations on a support package for the economy until after the election. He appeared to change his mind a few hours later, however. On Friday, Trump was cheerleading the prospect of a deal, declaring on Twitter that talks on a new aid package are "moving along. Go Big!"
"The fact that Trump reversed course, I think, has given people optimism again," said Randy Frederick, vice president of trading & derivatives at Charles Schwab.
The S&P 500 rose 30.31 points to 3,477.14. The Dow Jones Industrial Average gained 161.39 points, or 0.6%, to 28,586.90. The gain nudged the Dow into positive territory for the year. The Nasdaq composite climbed 158.96 points, or 1.4%, to 11,579.94.
Small-company stocks added to their solid gains this week. The Russell 2000 index picked up 9 points, or 0.6%, to 1,637.55. The index jumped 6.4% this week.
Investors have been clamoring for more federal aid since the expiration of extra benefits for laid-off workers and other stimulus for the economy that Congress approved earlier this year. Economists say the outlook is grim without such support, and the chair of the Federal Reserve has said repeatedly it will likely be necessary.
Still, the prospects for a new deal on more aid have been shaky, especially this week.
Trump said that House Speaker Nancy Pelosi was negotiating in bad faith when he called off the talks Tuesday. But within a couple hours, he appeared to backtrack. He said that he would back more limited programs that would send $1,200 payments to Americans and support the airline industry and small businesses specifically.
Pelosi on Thursday said she was not interested in a standalone measure to help airlines unless it was accompanied by a broader effort that includes COVID testing and other programs that Democrats say are needed as part of a national strategy to "crush the virus."
White House economic adviser Lawrence Kudlow told reporters that "developments are positive" ahead of a telephone conversation between Pelosi and Treasury Secretary Steven Mnuchin. At the same time, Senate Majority Leader Mitch McConnell said he doubts a deal will get done before the election.
Pelosi and Mnuchin spoke on the phone for 30 minutes, but nothing concrete appeared to immediately emerge from the discussion.
Frederick said the uncertainty over another stimulus package remains a "substantial risk" to the market.
This week's rollercoaster -- where the S&P 500 swung at least 1.4% for three straight days -- is just the latest bout of volatility for a market that has been notably rocky for weeks.
"When the world's financial markets are at the mercy of the randomness emanating from the White House, it is hardly surprising that investors elsewhere would prefer to wait on the side-lines," said Jeffrey Halley of Oanda in a report. "Unfortunately, things are unlikely to settle down over the next few weeks."
Regardless of whether Washington can strike a deal before the election, some investors are getting more optimistic about the chances for a big support package in 2021. If the Democrats sweep the White House, Senate and House of Representatives, the thinking is that they'll likely approve stimulus for the economy. That could help offset the higher tax rates and tighter regulations on businesses that investors also expect from a Democratic-controlled Washington. Wall Street is seeing a Democratic sweep as more likely than before.
Still, other challenges remain for the market. Chief among them is the still-spreading coronavirus pandemic, highlighted by Trump's own COVID-19 diagnosis.
Some areas of the economy are slowing following the expiration of Congress' last round of aid, stocks still look too expensive in the eyes of some critics and tensions continue to simmer between the United States and China.
Technology stocks and companies that rely on consumer spending drove much of Friday's rally. Utilities, real estate and energy stocks fell.
Despite the market's gains, trading underneath the surface continued to be unsettled. Airline stocks climbed at the start of trading, only to drop quickly and then rise again. United Airlines rose 0.3%, American Airlines gained 0.3% and Delta Air Lines rose 0.4%.
The yield on the 10-year Treasury held steady at 0.78%.
European markets rose, while Asian indexes ended mixed.