By Anna Isaac and Dawn Lim

U.S. stocks swung between small losses and gains as an uncertain economic recovery and the U.S. presidential race injected turbulence into markets, leaving the S&P 500 on course for a fourth consecutive week of losses.

The broad stock market index added 0.4% but was on track for a weekly loss of 1.8%. The Dow Jones Industrial Average edged up 0.2%, while the tech-heavy Nasdaq Composite climbed 1%. Both indexes were poised to fall for the week.

Investors' confidence has been crimped by elevated levels of new coronavirus infections in the U.S. and Europe, as well as signs that the global economic recovery is slow and uneven. The uncertainty and political risks generated by November's presidential election have added to volatility in markets.

"We're in a bit of a holding pattern. It feels like a bit of a phony market right now. I don't think there's any key factors that have changed," said David Coombs, head of multiasset investments at Rathbone Brothers. "Until we get a vaccine for the population at large, the coronavirus course is uncertain."

New economic data provided hints of recovery in the manufacturing industry. New orders for durable goods rose 0.4% in August from July, the Commerce Department said Friday. The increase, on the heels of bigger advances earlier in the summer, was weaker than economists predicted.

Investors are awaiting signs of progress on additional U.S. stimulus spending from the government. House Democrats are readying a scaled-down package of around $2.4 trillion that would include assistance to airlines, restaurants and small businesses, The Wall Street Journal reported. But Republicans said the chances of a deal before Election Day remained slim.

"We've had such a huge fiscal response already, it's easy to say the response now is disappointing," said Holger Schmieding, chief economist at Berenberg Bank. "It's basically a matter of time: before or after the election. Significant support is coming. The Fed is asking for it."

The U.S. reported about 44,000 new coronavirus cases Thursday, up from about 37,000 a day earlier and bringing the total number of people who have been infected in the country to about 6.98 million, according to data compiled by Johns Hopkins University. Daily new infections have been going up again since mid-September.

"As we go into the fourth quarter, risks are starting to pile up, making it harder for equities to make gains. It's the election risk, the Covid risk, and the fiscal risk," said Seema Shah, chief strategist at Principal Global Investors. "And then of course the economic data: we've had all the easy gains in the third quarter and we want to be sure that momentum isn't running out."

In bond markets, the yield on the U.S. 10-year Treasury ticked down to 0.657%, from 0.664% Thursday.

Shares of Novavax surged 11% after the company said Thursday it started a final-stage study of its experimental Covid-19 vaccine in the U.K. The stock, which has been popular among investors using the Robinhood app, has gained some 2,700% this year.

Barclays analysts touted a more bullish outlook for cruise lines and said in a Friday research note the sector is "nearing an inflection point." The cruise industry has been proposing safety measures in hopes of bringing back limited voyages from the U.S. Norwegian Cruise Line Holdings gained 7%, while Carnival rose 5% and Royal Caribbean Group rose 4%.

Overseas, the pan-continental Stoxx Europe 600 fell 0.3%.

In commodities markets, gold slid 0.6% to $1,866.50 a troy ounce. The precious metal has been hit by a strengthening dollar and falling inflation expectations.

The major Asian equity benchmarks ended the week on a mixed note. Japan's Nikkei 225 rose 0.5% Friday, while China's Shanghai Composite Index ticked down 0.1%.

Write to Anna Isaac at anna.isaac@wsj.com and Dawn Lim at dawn.lim@wsj.com