NEW YORK (AP) — Wall Street drifted to a mixed finish Thursday after Tesla surged to one of the best days in its history, while IBM slumped to its worst in six months.

The S&P 500 rose 0.2% to break its first three-day losing streak since early September. It bounced between losses and gains through the day, and it was roughly evenly split between stocks rising and falling.

The Dow Jones Industrial Average fell 140 points, or 0.3%, while the Nasdaq composite rose 0.8%.

Tesla led the market with a jump of 21.9% after the electric-vehicle maker reported better profit for the latest quarter than analysts expected. An optimistic CEO Elon Musk also predicted 20% to 30% sales growth next year, though its revenue for the latest quarter fell short of analysts' forecasts. It was the best day for Tesla's stock since 2013.

UPS climbed 5.3% after likewise topping analysts’ forecasts for profit. The package-delivery company’s finances can offer a window into the strength of the economy because of how many different types of customers it serves, and its revenue edged past expectations.

ServiceNow, whose platform helps companies automate and connect processes, was another one of the strongest forces pushing upward the S&P 500. It rose 5.4% after delivering stronger profit and revenue than expected, driven by interest by customers to incorporate artificial-intelligence technology.

Such gains helped to offset a drop of 6.2% for IBM, which reported revenue for the latest quarter that fell just short of analysts’ expectations. It was the single biggest reason the Dow dragged behind other indexes.

Boeing was another weight and sank 1.2% after its machinists voted to continue their strike, which has crippled aircraft production. More than 60% of union members who voted on the proposed contract rejected it, keeping them on the picket lines six weeks into their strike.

Union Pacific dropped 4.4% after the railroad reported slightly weaker profit and revenue than expected.

All told, the S&P 500 rose 12.44 points to 5,809.86. The Dow dropped 140.59 to 42,374.36, and the Nasdaq composite rose 138.83 to 18,415.49.

Stocks have broadly regressed this week after the S&P 500 and Dow both set records at the end of last week. They’ve been hurt by rising Treasury yields in the bond market, which can make investors less willing to pay high prices for stocks. Critics had already been saying beforehand that stocks looked too expensive given how much faster their prices have risen than corporate profits.

Yields have climbed as report after report has shown the U.S. economy remains stronger than expected. That's good news for Wall Street, because it bolsters hopes the economy can escape from the worst inflation in generations without the painful recession that many had worried was inevitable.

But it’s also forcing traders to ratchet back forecasts for how deeply the Federal Reserve will cut interest rates, now that it’s just as focused on keeping the economy humming as getting inflation lower. With bets diminishing on how much the Fed will ultimately cut its overnight interest rate, Treasury yields have also been given back some of their earlier declines.

A report on unemployment claims Thursday offered a mixed picture on the job market. It said fewer workers applied for unemployment benefits last week, which can be a signal of relatively low layoffs. But it also said the total number of those collecting benefits rose to its highest level in almost three years.

Altogether, the numbers show a slowing economy, “but there is no sign of a crash in employment or a surge of layoffs in these data,” according to Carl Weinberg and Rubeela Farooqi at High Frequency Economics.

Treasury yields, which had eased overnight, pared their losses after the release of the unemployment claims report before yo-yoing. The yield on the 10-year Treasury fell to 4.20% from 4.25% late Wednesday. It’s still well above its 4.08% level from late last week.

A separate preliminary report said growth in U.S. business activity may have accelerated slightly last month, as strength for companies in services industries continue to make up for weakness in manufacturing. The report from S&P Global also showed a recovery in confidence as companies anticipate greater stability and certainty after the upcoming presidential election.

A third report, meanwhile, said sales of new homes were stronger last month than economists expected.

In stock markets abroad, indexes were modestly higher in Europe after finishing mixed in Asia.

___

AP Business Writers Matt Ott and Elaine Kurtenbach contributed.