S&P 500 index has its best weekly gain since early March

U.S. stock indexes ended mostly higher Friday as the market closed out its biggest weekly gain since March.

Drug makers and other health companies climbed after investors sized up President Donald Trump's latest plans to rein in drug prices and concluded any policy changes didn't pose immediate threats to health care company profits.

"All of this will have to go through a year-plus regulatory process, and none of it will have immediate impact," Terry Haines, macro research analyst at Evercore ISI, wrote in a research note Friday. "Thus our market positive view today."

The health sector's gains outweighed losses in technology stocks, phone companies and banks.

All told, the S&P 500 index added 4.65 points, or 0.2 percent, to 2,727.72. The benchmark index had its best weekly gain since early March with an increase of 2.4 percent.

The Dow Jones industrial average climbed 91.64 points, or 0.4 percent, to 24,831.17. The Nasdaq composite fell 2.09 points, or 0.03 percent, to 7,402.88. The Russell 2000 index of smaller-company stocks rose 3.08 points, or 0.2 percent, to 1,606.79.

For the week, the Dow notched a gain of 2.3 percent, while the Nasdaq finished 2.7 percent higher. The Russell 2000 picked up a gain of 2.6 percent.

Trading was choppy for much of the day as investors waited for the Trump administration to release details of its plan to control drug prices. After Trump began discussing the broad goals of his plan Friday afternoon, health care sector stocks mostly moved higher.

Regeneron Pharmaceuticals jumped 6.2 percent to $306.94 and CVS Health gained 3.2 percent to $64.41. Biogen added 3.1 percent to $282.39.

"Trump had a choice today: To seek disruptive fundamental reform or to embrace more incremental steps," Haines wrote. "Trump chose the incremental over the disruptive, which is the decisive factor for markets today."

Technology stocks, which are up 10.8 percent this year, outgaining all other sectors in the S&P 500, were among the biggest decliners Friday.

Symantec slumped 33.1 percent to $19.52 after the security software company revealed an internal investigation that could delay its annual report. The company also said the matter has been referred to the Securities and Exchange Commission. Symantec also gave weak profit forecasts.

Chipmaker Nvidia reported solid quarterly results, but shed some of its recent gains, sliding 2.2 percent to $254.53.

Investors continued to key in on the latest corporate earnings and outlooks.

Trade Desk vaulted 43.4 percent to $75.61 after the digital advertising platform company raised its annual forecasts after a strong first quarter.

Yelp fell 7.8 percent to $44.02 after the online review portal gave an outlook for its current quarter fell short of analysts' expectations.

TiVo slid 1.2 percent to $13.88 after the digital video recording company took a bigger-than-expected loss and reported weak revenue.

Despite the rash of disappointing company report cards, corporate earnings have been a source of good news for investors in recent weeks.

Roughly 90 percent of the companies in the S&P 500 have reported results so far this earnings season, and some 62 percent of those have delivered both earnings and revenue that exceeded financial analysts' expectations, according to S&P Global Market Intelligence.

Walmart, Home Depot and other retailers are due to report quarterly results next week.

"The market is looking forward to the next ingredient that's going to push it up or down as you get through earnings," Jeff Zipper, managing director at U.S. Bank Private Wealth Management.

Benchmark U.S. crude oil fell 66 cents to settle at $70.70 a barrel in New York. Brent crude, used to price international oils, lost 35 cents to close at $77.12. Oil futures have remained near their highest level since 2014 this week following the Trump administration's decision to re-impose sanctions Iran, the world's fifth-biggest oil producer.

Bond prices fell. The yield on the 10-year Treasury rose 2.97 percent from 2.96 percent late Thursday.

The dollar fell to 109.30 yen from 109.37 yen on Thursday. The euro strengthened to $1.1945 from $1.1927.

Gold fell $1.60 to $1,320.70 an ounce. Silver dropped 1 cent to $16.75 an ounce. Copper was little changed at $3.11 a pound.

In other energy futures trading, heating oil was little changed at $2.22 a gallon. Wholesale gasoline also held steady at $2.19 a gallon. Natural gas slipped a penny to $2.80 per 1,000 cubic feet.

European stock indexes finished mostly lower Friday after a strong rally saw many indexes strike multi-week highs. Germany's DAX fell 0.2 percent and France's CAC 40 slid 0.1 percent. Britain's FTSE 100 gained 0.3 percent. Earlier in Asia, Japan's benchmark Nikkei 225 rose 1.2 percent and South Korea's Kospi added 0.6 percent. Hong Kong's Hang Seng jumped 1.0 percent.