(This July 26 story fixes spelling of company name in paragraph 12)

(Reuters) - Robust earnings from Alphabet and Starbucks pushed the S&P 500 and Nasdaq indexes to record highs on Friday, with support from data showing U.S. economic growth slowed less than expected in the second quarter.

The U.S. Commerce Department said GDP increased at an annualized rate of 2.1% in the second quarter, higher than a 1.8% rate forecast by economists polled by Reuters.

The GDP data further solidified wide expectations that the U.S. Federal Reserve will cut interest rates at its policy meeting next week. Those expectations have powered a solid run in stocks this month, helping Wall Street scale record levels.

“This is just what the market needed, not so soft that the economy is slowing down precipitously and not so strong that the Fed is going to reverse course,” said Art Hogan, chief market strategist at National Securities in New York. “It shows that the economy is slowing, but not nearly enough to raise any red flags.”

The data comes on the heels of European Central Bank President Mario Draghi’s speech on Monday, which was less dovish than investors had anticipated and led the S&P 500 to post its first loss in the week.

Two weeks into the second-quarter earnings season, about 75% of the 218 S&P 500 companies that have reported so far have topped profit estimates, according to Refinitiv data.

Starbucks SBUX.O rallied 8.9% to a record high after the world's largest coffee chain posted its biggest same-store sales growth in three years.

Alphabet Inc GOOGL.O surged 9.6% after beating Wall Street targets on higher ad sales and growth at its cloud unit, a high-margin business it is leaning more on to drive expansion.

Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., July 25, 2019. REUTERS/Brendan McDermid

Twitter Inc TWTR.N rose 8.9% after it posted better-than-expected quarterly revenue and an uptick in daily users who see advertisements on the site.

Their upbeat earnings pushed the S&P 500 communication services index .SPLRCL up 3.25%, the most among S&P sectors.

Lead negotiators for China and the United States are set to meet in Shanghai on Tuesday for two days in the next round of talks aimed at settling the U.S.-China trade war. The results of those talks will affect sentiment on Wall Street.

“Going forward, it’s very important not to have a breakdown in trade talks. And earnings reports need to continue to come in as they have been - a little better than expectations,” said Tom Martin, a senior portfolio manager at Globalt Investments in Atlanta.

The Dow Jones Industrial Average .DJI rose 0.19% to end the week at 27,192.45 points, while the S&P 500 .SPX gained 0.74% to 3,025.86. The Nasdaq Composite .IXIC added 1.11% to 8,330.21.

For the week, the S&P 500 added 1.7%, the Nasdaq climbed 2.3% and the Dow rose 0.1%.

Even under the cloud of uncertainty related to trade conflict, the S&P 500 has risen 21% so far in 2019.

Also on Friday, McDonald's Corp MCD.N jumped as much as 2.1%, briefly hitting a record high after beating quarterly sales expectations at established U.S. restaurants.

Amazon.com Inc AMZN.O fell 1.6% and was the biggest drag on the benchmark S&P 500 after the online retailer reported its first profit miss in two years and said income would slump in the current quarter.

Intel Corp INTC.O lost 1.1%, even after the chipmaker gave an upbeat current-quarter forecast and raised its full-year revenue guidance.

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

The S&P 500 posted 41 new 52-week highs and two new lows; the Nasdaq Composite recorded 111 new highs and 79 new lows.

Volume on U.S. exchanges was 5.9 billion shares, compared with the 6.3 billion-share average for the full session over the last 20 trading days.