NEW YORK (AP) — U.S. stock indexes are drifting around their records Friday as hopes hold that the economy can pull off the rare feat of getting painfully high inflation under control without a recession.

The S&P 500 was mostly unchanged in afternoon trading a day after setting an all-time high for the 42nd time this year. The Dow Jones Industrial Average was up 341 points, or 0.8%, and on track to set its own record. The Nasdaq composite fell 0.3% as of 12:01 p.m. Eastern time.

Treasury yields eased in the bond market after a report showed inflation slowed in August by a touch more than economists expected. It echoed similar numbers reported earlier in the month about inflation in August, but Friday's report has resonance because it's the measure of inflation that officials at the Federal Reserve prefer to use.

The Fed had long been keeping its main interest rate at a two-decade high in hopes of slowing the economy enough to stifle inflation. Now that inflation has eased substantially from its peak two summers ago, it's begun cutting rates to ease the brakes off a slowing job market and prevent a recession.

If the Fed can pull off a perfect landing for the economy where it chokes off high inflation without suffocating the economy, all while lowering interest rates, it would be a form of nirvana for financial markets. And it’s a large reason why U.S. stocks have rallied to records.

Of course, that path is not certain. U.S. employers have slowed their hiring, and the inflation report on Friday also showed growth in U.S. consumer spending in August fell short of economists' expectations. That's important because consumer spending is the main engine of the economy.

Part of the shortfall may have been because incomes for Americans grew less in August than economists expected. As the Federal Reserve cuts interest rates, starting with its bigger-than-usual cut last week, Americans will see lower interest payments on their savings accounts and other similar investments.

The boost that lower interest rates can give through cheaper loans to buy homes, cars and things on credit cards, meanwhile, can take longer to come to fruition, “so consumption spending will likely get squeezed,” said Brian Jacobsen, chief economist at Annex Wealth Management.

More encouraging data arrived later in the morning, when a report said sentiment among U.S. consumers is stronger than economists expected.

On Wall Street, Bristol-Myers Squibb rose 3.2% after receiving U.S. federal approval for its new approach to treat schizophrenia in adults.

Costco Wholesale fell 1.9% after delivering weaker revenue in the latest quarter than analysts expected. That was even though its profit topped expectations.

Another company that depends on people spending money, ski-resort operator Vail Resorts, sank 4.8% after reporting a larger loss for the latest quarter than analysts expected. Scant snowfalls at its Australian resorts hurt its results, and it gave a forecast for profit in its upcoming fiscal year that fell short of forecasts.

Trump Media & Technology Group swung from an early loss to jump 7.5% following the first disclosure of a major investor selling its shares now that a restriction for insiders has lifted.

A Florida firm owned by former contestants on “The Apprentice” has dumped nearly all of its 5.5% ownership stake in TMTG, which owns former president Donald Trump’s Truth Social platform, according to a filing made with U.S. regulators on Thursday.

Trump has said he does not plan to sell any of his shares, and he owns more than half of the company, but the stock has been shaky amid speculation about whether he may.

Markets overseas again made big moves, as stocks in Shanghai rallied 2.9% to close their best week since 2008. Hong Kong’s Hang Seng jumped 3.6% to cap its best week since 1998.

They soared following a barrage of announcements through the week from China’s central bank and government in hopes of propping up the world’s second-largest economy. Investors aren’t convinced all the stimulus will ultimately succeed, but they say they’re impressed by the size of it all following earlier piecemeal efforts.

Besides Chinese stocks, prices for copper, stocks of some luxury retailers and other companies seen as benefiting from a stronger Chinese economy also rose over the week.

In the bond market, the yield on the 10-year U.S. Treasury eased to 3.76% from 3.80% late Thursday.

The two-year Treasury yield, which moves more closely with expectations for what the Fed will do with short-term interest rates, fell to 3.57% from 3.63%.

Traders are betting on a roughly coin flip's chance the Fed will cut the federal funds rate by another half of a percentage point at its next meeting in November, according to data from CME Group. It usually moves rates by just a quarter of a percentage point.

___

AP Writers Matt Ott and Zimo Zhong contributed.