By Sinéad Carew, Sruthi Shankar and Johann M Cherian

(Reuters) – U.S. stocks rallied on Friday, putting the tech-heavy Nasdaq on course for its biggest first-half gain in 40 years as inflation showed signs of cooling while Apple returned to a $3 trillion market valuation.

Apple Inc breached the $3 trillion mark for the first time since January 2022, and was last up 1.76% at $192.90 after touching a record high of $193.15. Its shares were lifted by growing appetite for growth stocks generally as well as bets the iPhone maker will succeed in new markets.

Investors perked up on signs of cooling U.S. inflation from measures that are closely watched by the Federal Reserve. A Commerce Department report showed the Personal Consumption Expenditures (PCE) index advanced 3.8% versus April’s 4.3%. Excluding volatile food and energy, the core PCE index gained 0.3%, down from 0.4% in the previous month.

“Today is another example of how markets love any slowing of inflationary pressure. We had inflation come in increments lower,” said Matt Miskin, co-chief investment strategist, John Hancock Investment Management in Boston.

“Technology stocks are leading the way on the upside which isn’t anything new but the thought of disinflation, potentially continuing here into the summer months is helping market finish the quarter strong.”

The Dow Jones Industrial Average rose 318.65 points, or 0.93%, to 34,441.07, the S&P 500 gained 57.08 points, or 1.30%, to 4,453.52 and the Nasdaq Composite added 208.01 points, or 1.53%, to 13,799.34.

The Nasdaq was set for its strongest first-half performance in 40 years with a more than 31% gain while the Nasdaq 100 index of top technology stocks was on track for its best first half on record with roughly 39% rise.

The S&P 500’s growth index was up 1.5% and investor favorites such as Amazon, Microsoft, Alphabet and Nvidia were all extending a blistering rally fueled by strong earnings and a buzz around artificial intelligence.

Still, traders were pricing in an 86.8% chance that the Fed will hike rates by 25 basis points to 5.25%-5.50% range in its July meeting, according to CMEGroup’s Fedwatch tool, down slightly from the 89.3% on Thursday.

Hawkish remarks from Fed Chair Jerome Powell and strong economic data earlier this week boosted bets the Fed will keep hiking rates, but stock markets took comfort in signs of strength in the U.S. economy.

The CBOE Market Volatility Index, Wall Street’s fear gauge, earlier slipped to a one-week low at 12.96 points and was last down 0.37 points at 13.17.

Among other single stocks, Nike Inc was down more than 2% after it forecast first-quarter revenue below Wall Street expectations.

Carnival Corp jumped 9% after Jefferies upgraded the cruise operator’s stock to “buy” from “hold”.

Advancing issues outnumbered declining ones on the NYSE by a 3.48-to-1 ratio; on Nasdaq, a 1.74-to-1 ratio favored advancers.

The S&P 500 posted 73 new 52-week highs and no new lows; the Nasdaq Composite recorded 106 new highs and 63 new lows.

(Reporting by Sruthi Shankar, Johann M Cherian and Shashwat Chauhan in Bengaluru; Editing by Shinjini Ganguli and David Gregorio)