The S&P 500 rose 0.6% and broke its three-day losing streak. The Dow Jones Industrial Average gained 299 points, or 0.7%, and the Nasdaq composite added 0.4%. All three indexes pulled closer to the all-time highs they set at the start of the week.

Stocks got some help from a report showing that inflation in the United States accelerated to 2.7% last month from 2.6% in July, according to the measure of prices that the Federal Reserve likes to use. While that’s above the Fed’s 2% target, and it’s more painful than any household would like, it was precisely what economists had forecast.

That offered some hope that the Fed could continue cutting interest rates in order to give the economy a boost. That’s critical for Wall Street because it’s already sent U.S. stocks on a blistering run to records from a low in April in large part because of expectations for a string of rate cuts.

Without such cuts, growing criticism that stock prices have become too expensive by rising too quickly would become even more powerful. The Fed just delivered its first rate cut of the year last week but is not promising more because they could worsen inflation.

One factor threatening to push inflation higher is President Donald Trump’s tariffs, and he announced a set of more late Thursday. They include taxes on imports of some pharmaceutical drugs, kitchen cabinets and bathroom vanities, upholstered furniture and heavy trucks starting on Oct. 1.