U.S. stocks rise to finish a wild July as Amazon soars, Apple sinks, and inflation worries worsen
The gains for companies that invested in AI like Amazon came despite a rise in oil prices. Apple was caught in the AI-induced chip crunch.

NEW YORK — U.S. stocks rose Friday to finish a wild July for Wall Street as Amazon leaped, Apple sank, and rising oil prices worsened worries about inflation staying high.
The S&P 500 climbed 0.7% after veering between gains and losses through the day. The Dow Jones Industrial Average added 276 points, or 0.5%, and the Nasdaq composite rallied 1% after briefly losing all of an early 1.3% jump.
It’s a fitting finish to July for the U.S. stock market, which lurched up and down as oil prices shot higher because of the war with Iran and worries grew about whether Big Tech’s massive investments in artificial-intelligence technology will translate into profits and whether chipmaker stocks soared too high in the euphoria around AI.
Friday’s gains sent the S&P 500 to its first winning week in three, but the main measure of the U.S. stock market nevertheless finished the month with a tiny loss.
Amazon led the market with a leap of 15.3% after reporting much stronger profit for the latest quarter than analysts expected. Its profit more than tripled from a year earlier, thanks in part to an acceleration of growth in its cloud computing business.
Analysts said that could be a signal Amazon’s huge AI investments are paying off, and Amazon increased its forecast for how much it will spend on investments this year.
The reaction was similar to what Microsoft got a day before, when its stock soared to its best day in nearly 18 years on signals that its AI investments may also be yielding higher profits.
Chip companies selling the processors and computer memory that such “hyperscalers” are scrambling to buy swung sharply again on Friday. Micron Technology, for example, went from an early jump of 6.4% to a loss of 6.5% before finishing with a fall of 5.9%.
More firmly on the losing end of Wall Street was Apple, which dropped 7.4% despite reporting stronger profit for the latest quarter than expected. Its forecast for revenue growth in the current quarter fell short of expectations, which executives pinned on a supply crunch in components getting vacuumed up in the AI boom.
All told, the S&P 500 rose 52.09 points to 7,489.72. The Dow Jones Industrial Average added 276.97 to 52,485.03, and the Nasdaq composite climbed 251.68 to 25,373.85.
The gains came despite another rise in oil prices as uncertainty continues about when the war with Iran will allow crude to flow freely again from the Middle East.
The price for a barrel of Brent crude rose 1.2% to settle at $87.93 after careening between $72 and $102 earlier in July.
Higher oil prices have pushed the cost for a gallon of regular gasoline to an average of nearly $4.11 across the United States, up from $3.85 a month ago, according to AAA. More expensive oil also puts upward pressure on prices for virtually every product that rides on a ship, plane, or truck before getting to a customer.
The worries about inflation sent yields in the bond market even higher.
The yield on the 10-year Treasury rose to 4.71% from 4.68% late Thursday and from just 3.97% before the war with Iran sent oil prices shooting higher. That’s a notable move for the yield, which moves higher when investors’ expectations for inflation, economic growth, and other factors in upcoming years are rising.
The leap for the 10-year yield has already sent the average long-term U.S. mortgage rate to its highest level in a year.
Longer-term yields jumped on Wednesday after the Federal Reserve’s chairman, Kevin Warsh, promised again to get inflation back down to 2% but refused to say how he plans to get it there. The Fed voted again to keep its main interest rate steady on Wednesday, even though inflation remains well above 2%.
Hikes to rates by the Fed could restrain inflation, but they could also slow the economy and undercut prices for stocks and other investments. President Donald Trump, who nominated Warsh to lead the Fed, has lobbied for lower interest rates instead of higher.
Warsh has told financial markets that he does not want to give hints about what the Fed will do with interest rates, saying he wants to get direct, “unfiltered” messages from them rather than echoes back of what the Fed has suggested.
“The Fed is facing a growing credibility problem,” economists at Bank of America wrote in a report. Unless data comes in showing less pressure on inflation in the interim, “it is imperative for the Fed to pass the September test by hiking rates and delivering an internally consistent narrative.”
AP Business Writers Chan Ho-him and Elaine Kurtenbach contributed to this report.