NEW YORK (AP) -- U.S. stocks rallied on Wednesday, but only after zooming up, down and back up again in a fitting end to what was a wild month and quarter for Wall Street.
Prospects for additional support from Congress for the economy helped drive the day's trading, as they have for weeks. The S&P 500 shot to a gain of as much as 1.7% after Treasury Secretary Steven Mnuchin told CNBC that he would talk with House Speaker Nancy Pelosi about a potential deal in the afternoon, "and I hope we can get something done."
But the gains nearly vanished as pessimism rose about Washington's ability to get past its partisanship and send economic aid that investors say is crucial. The S&P 500 hit its low for the day just after Pelosi said she and Mnuchin "found areas where we are seeking further clarification," though she said talks will continue.
By the end of trading, momentum had returned, and the S&P 500 rose 27.53 points, or 0.8%, to 3,363.00. The Dow Jones Industrial Average gained 329.04, or 1.2%, to 27,781.70, and the Nasdaq composite added 82.26, or 0.7%, to 11,167.51.
It was the last day of a strong quarter for the market, where the S&P 500 rallied 8.5% to follow up on its 20% surge in the spring. Continued support from the Federal Reserve helped drive the gains, as the central bank leaned further into the whatever-it-takes approach taken to support markets and the economy. After already cutting interest rates to nearly zero, the Fed said during the quarter that it may keep interest rates low even after inflation runs above its target level.
But momentum slowed sharply at the end of the quarter, and the S&P 500 lost 3.9% in September for its first monthly loss since the market was selling off in March. A long list of worries dogged Wall Street, headlined by concerns that the Big Tech stocks dominating the market simply got too expensive following their tremendous run to records.
Other worries include rising tensions between the United States and China, as well as the uncertainties swirling around the upcoming U.S. elections.
Trading has also been notably erratic recently, with momentum veering sharply in several different directions during a single day.
On Wednesday, the S&P 500 careened between a gain of 0.1% and 1.7% for a total spread of 1.6 percentage points. That was typical for the month, marking the median for September. It's also twice as wide as the median over the last 10 years, 0.8 percentage points.
The tumult has come as the economy's strong rebound earlier this year following the easing-up of lockdowns has slowed. The number of layoffs has remained stubbornly high, for example, and The Walt Disney Co. said late Tuesday that it plans to lay off 28,000 workers because of government restrictions due to the pandemic that are hurting its theme parks.
Other areas of the economy have also seen growth slow since the expiration of extra unemployment benefits and other economic aid that Congress approved earlier.
"We all knew that the small businessman or restaurant owner was getting hurt, but this takes it to a different level of just how serious it is," said J.J. Kinahan, chief strategist with TD Ameritrade. "It maybe changes the narrative a bit."
A report from payroll processor ADP on Wednesday gave some encouragement, though. It said hiring by private employers accelerated this month, with 749,000 jobs added versus economists' expectations for 605,000. Other economic reports on Wednesday also came in stronger than expected, including one on business activity in the Chicago area.
That raises hopes for the federal government's more comprehensive jobs report, which arrives on Friday. For that, economists had been expecting to see hiring slowed to 850,000 from 1.4 million in August.
This month's jobs report will take on even more importance than usual because it will be the final one released before Election Day in November.
Tuesday night's debate between President Donald Trump and the Democratic nominee, Joe Biden, was the first of this election season, and it amplified some of the market's concerns. Trump said it may take months to learn the election's results, and such a long period of uncertainty could make an already shaky market even more volatile.
But several analysts said they didn't see the debate having a big effect on the stock market, whose path depends much more on what happens with corporate profits, interest rates and the coronavirus pandemic than who sits in the White House.
"Last night was pretty much a nothing burger from a market perspective, other than perhaps suggesting more uncertainty in the weeks ahead, which could continue to drive volatility," said Mike Loewengart, managing director of investment strategy at E-Trade Financial.
Trump again lobbed claims of fraud at the voting process, even when the head of the FBI has said there has not been any significant coordinated national voter fraud. The tone was combative through the night, with plenty of insults and talking over one another, and reflective of the country's deepening partisan divide.
Shares of data-mining company Palantir jumped 31% to $9.50 on their first day of trading. The company was born 17 ago with the help of CIA seed money. Palantir isn't selling new shares to raise money. Instead, it's listing existing shares for public trading.
In Europe, Germany's DAX fell 0.5%. The CAC 40 in Paris fell 0.6%, and London's FTSE 100 shed 0.5%.
In Asia, Japan's Nikkei 225 lost 1.5%, Hong Kong's Hang Seng rose 0.8% and stocks in Shanghai slipped 0.2%.
The yield on the 10-year Treasury rose to 0.68% from 0.66% late Tuesday.