Stocks took a late stumble on Wall Street Friday, erasing early gains and leaving major indexes mixed.

The S&P 500 closed up just a fraction of a point but still managed to post a modest gain for the week.

Big Tech and energy companies fell while health care and industrial stocks rose.

The Dow Jones Industrial Average of blue chips ended higher, but small-company stocks ended lower.

The market had been up for much of the day after the government reported that retail sales rose in September for the fifth straight month. Treasury yields were flat.

Earlier in the day stocks were broadly higher with the market on track to close out a choppy week on Wall Street with modest gains.

Energy stocks were the only laggards following a decline in the price of U.S. crude oil.

Traders appeared to shrug off a report indicating U.S. industrial production had its weakest showing last month since the spring.

“The market is sort of bouncing around here,” said Tom Martin, senior portfolio manager with Globalt Investments. “We’ve had a lot of noise lately and that’s probably what we’re going to have over the next couple of weeks.”

Stocks have been mostly climbing this month, but pulled back early this week as ongoing talks between Democrats and Republicans on an economic stimulus package failed to deliver results. Investors have been hoping that Washington would provide more financial support for the economy since July, when a $600-a-week extra benefit for the unemployed expired.

Traders have been watching economic data closely to see whether the loss of that beefed-up unemployment aid would lead to an overall pullback in spending. On Thursday, the government’s said the number of Americans seeking unemployment aid increased last week to 898,000, a historically high level that underscores how the economy continues to be hobbled by the pandemic and recession that erupted seven months ago.

But Friday’s retail sales report provides some encouragement, suggesting Americans' appetite for spending remained solid last month. The Commerce Department said retail sales rose 1.9% in September, the fifth straight monthly increase.

Other data point to persistent weakness in the economy. The Federal Reserve said Friday that U.S. industrial production fell 0.6% last month, the weakest showing since April’s 12.7% skid amid widespread business shutdowns due to the pandemic. Economists had been expecting an increase.

surge in new coronavirus infections in Europe, the Americas and parts of Asia, is also giving traders reason to turn cautious. The new caseloads prompted governments in France and Britain to impose new restrictions aimed on containing the outbreak contributed to some of the selling in the market earlier this week.

Across the S&P 500, analysts are expecting companies to report another drop in profits for the summer from year-ago levels. But they’re forecasting the decline to moderate from the nearly 32% plunge from the spring, reflecting some signs of improvement in the economy since then.

Investors are also watching earnings reports for indications of how businesses are holding up amid the pandemic. Rising COVID-19 cases may bring more social distancing restrictions and limits on public life, including a possible return to lockdowns that are damaging to growth.

Boeing rose 2.7% after Europe’s aviation regulator said it is closing in on a decision to allow the company’s 737 Max planes to return to the air after they were grounded worldwide following two deadly crashes, according to a report by Bloomberg.

Friday’s early gains on Wall Street followed a broad rally in European stock indexes, which clawed back some of their heavy losses from a day earlier. Germany’s DAX gained 1.6%, while France’s CAC 40 jumped 2%. Britain’s FTSE 100 climbed 1.5%.

In Asia, Japan’s benchmark Nikkei 225 fell 0.4%. South Korea’s Kospi declined 0.8%, Hong Kong’s Hang Seng gained 0.9% while the Shanghai Composite edged 0.1% higher.