(AP) -- Stocks rose for the second day in a row Thursday, reflecting hope on Wall Street that Washington can approve more aid for the economy and encouragement from a report that suggests the pace of layoffs is slowing a bit, even though it remains incredibly high.
The S&P 500 climbed 0.8%, adding to its solid gains from a day earlier, when President Donald Trump apparently backtracked on his decision to halt talks on more aid for the economy. He said in a televised interview Thursday morning that "very productive" talks have begun on stimulus.
Stocks have been particularly rocky since early September, swerving on worries about everything from too-expensive prices to the still-raging pandemic, but the S&P 500 has been generally climbing the last two weeks and is on pace for its best week since August.
Resurgent optimism about the possibility that the Democrats and Republicans will deliver another economic aid package has kept investors in a buying mood the past couple of days.
"The markets hope that both sides have sort of given their opening bids and now they can meet somewhere in the middle and do so fairly quickly," said J.J. Kinahan, chief strategist with TD Ameritrade.
The S&P 500 index rose 27.38 points to 3,446.83. The Dow Jones Industrial Average gained 122.05 points, or 0.4%, to 28,425.51. The Nasdaq composite picked up 56.38 points, or 0.5%, to 11,420.98.
Small company stocks fared better than the rest of the market. The Russell 2000 index of small-cap stocks climbed 17.51 points, or 1.1%, to 1,628.55. Global stock indexes also closed higher.
Banks, technology and communication companies accounted for much of the broad gains. Energy stocks notched the biggest gain as the price of U.S. crude oil climbed more than 3%. Occidental Petroleum climbed 8.8%, the biggest gainer in the S&P 500.
A government report showed that 840,000 workers applied for unemployment benefits last week. That's down slightly from 849,000 the prior week, though it's still remarkably high compared with history. It also was slightly worse than economists were expecting, 837,000.
"The important thing was we continue to see less people filing," Kinahan said.
Still, several areas of the economy have been slowing recently after supplemental weekly unemployment benefits and other stimulus for the economy approved by Congress earlier this year expired. That has investors focused on whether Congress can deliver more aid. So far, bitter partisanship on Capitol Hill has been preventing a deal.
"The market is vulnerable to the gyrations of the political back-and-forth over a relief package," said Quincy Krosby, chief market strategist at Prudential Financial.
The market has been swooping up and down this week in particular. On Tuesday, Trump said that he told his representatives to halt negotiations until after the election because he said House Speaker Nancy Pelosi was negotiating in bad faith. That caused stocks to suddenly swing from a 0.7% gain to a 1.4% drop.
But just a few hours later, Trump said that he would be open to several targeted programs, including aid for the airline industry specifically and $1,200 in payments to Americans. That caused Wednesday's rise, where the S&P 500 more than recovered all its losses from the prior day.
Pelosi spoke with Mnuchin on Wednesday evening about a standalone effort to help the airline industry, and they agreed to talk again Thursday.
On Thursday morning, Trump said in an interview with Fox Business that he shut down talks "because they weren't working out. Now, they are starting to work out."
But, Pelosi on Thursday said there wouldn't be standalone bill for the airline industry unless it was part of a more expansive bill.
"The backdrop for the labor market, while solid, is slowing and the prospect of thousands of layoffs within the airline industry just adds pressure on consumer spending," Krosby said.
Despite the uncertainty about the prospects for another bailout, airline stocks notched gains Thursday. United Airlines rose 1.7%, Delta Air Lines picked up 1.6% and American Airlines added 0.7%.
"The on-and-off nature of the fiscal stimulus discussion in the U.S. hardly inspires lasting confidence," Riki Ogawa of Mizuho Bank said in a report, noting such uncertainty will continue through the presidential election campaign, and perhaps even after the vote.
Some investors also see rising poll numbers for Joe Biden in the upcoming presidential election as an indication that more stimulus may be on the way, regardless of what Trump says. If Democrats sweep the White House, Senate and House of Representatives, they say a big rescue package becomes more likely. And that could offset higher taxes and tighter regulations that a Democratic-controlled government could also create.
Merger-and-acquisition activity also helped to boost markets. Eaton Vance jumped 48.1% after Morgan Stanley agreed to buy the investment company. Morgan Stanley rose 0.6%.
IBM rallied 6% after it said it's spinning off a business unit that provides infrastructure services, as it focuses on its cloud and artificial-intelligence businesses.
Of course, many risks remain for the market. Stocks still look expensive relative to corporate profits to critics. Tensions between the world's two largest economies, the United States and China, are still simmering. And on top of it all, the pandemic is still raging, with Trump's own COVID-19 diagnosis showing how far it is reaching.
Germany is seeing a sharp jump in new coronavirus infections, raising fears the pandemic is gaining in a country that so far has coped better than many of its European neighbors. The British government is mulling fresh restrictions on everyday life amid mounting evidence that the measures so far have done little to keep a lid on new coronavirus infections. France set a record number of infections on Wednesday.
European markets rose broadly, and Asian markets closed mostly higher. The yield on the 10-year Treasury note fell to 0.76% from 0.81% late Wednesday.