(Reuters) - The S&P 500 rose on Friday, helped by healthcare stocks after President Donald Trump blasted high drug prices but avoided taking aggressive measures to cut them.

Johnson & Johnson and Pfizer each rose over 1 percent while Merck & Co jumped 2.8 percent after Trump in a speech said foreign governments “extort” unreasonably low prices from U.S. drugmakers. His healthcare deputies released a series of proposals to address high drug costs.

“They’ve walked the tightrope between cost savings for the American people and maximizing profits for publicly traded healthcare stocks,” said Jake Dollarhide, chief executive officer of Longbow Asset Management in Tulsa, Oklahoma.

The S&P healthcare index ended 1.47 percent higher, while the Nasdaq Biotechnology index rallied 2.68 percent.

The tech sector slipped 0.32 percent, with Apple Inc dropping 0.38 percent after a nine-day winning streak that saw the iPhone maker edge closer to $1 trillion in market capitalization.

Also weighing on tech was Nvidia, which fell 2.15 percent on worries that a short-term surge in demand for graphics chips from cryptocurrency miners may be undermining the company’s core business with computer gamers.

“Tech is giving back some of its gains. Market participants are not making aggressive bets after the week we’ve had, heading into the weekend,” said Keith Lerner, chief market strategist at SunTrust Advisory Services in Atlanta. “We’re in a holding pattern today, digesting the strong gains of the week.”

Trader Michael Capolino shouts out a bid on the floor of the New York Stock Exchange (NYSE) in New York, U.S., May 3, 2018. REUTERS/Brendan McDermid

The Dow Jones Industrial Average rose 0.37 percent to end at 24,831.17 points, while the S&P 500 gained 0.17 percent to 2,727.72, its highest close since mid-March. The Nasdaq Composite slipped 0.03 percent to 7,402.88.

For the week, the Dow rose 2.3 percent, the S&P 500 added 2.4 percent, and the Nasdaq climbed 2.7 percent.

During Friday’s session, the Dow edged above 100-day moving average for the first time since April 18, following the S&P 500’s similar move a day earlier. Some traders believe such developments mean the market is likely to move higher.

Volume on U.S. exchanges was 5.8 billion shares, light compared with the 6.6 billion-share average over the last 20 trading days.

With March-quarter reports mostly wrapped up, S&P 500 companies appear to have grown their earnings per share by 26 percent, according to Thomson Reuters I/B/E/S.

Due to increased expectations for corporate profits and a dip in stock prices since January, the S&P 500 is now trading at 16 times expected earnings, its lowest multiple in two years, according to Thomson Reuters Datastream.

“We have very strong fundamentals from an earnings perspective and valuations are looking a bit more reasonable than they were late last year,” said Bill Northey, senior vice president at U.S. Bank Wealth Management.

Boosting the Dow was Verizon, which rose 3 percent after JPMorgan upgraded the wireless carrier to “overweight,” saying 5G opportunity will start to crystallize in the next few months.

Symantec slumped 33 percent after the Norton Antivirus maker said it was investigating concerns raised by a former employee.

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

The S&P 500 posted 30 new 52-week highs and three new lows; the Nasdaq Composite recorded 137 new highs and 51 new lows.