NEW YORK — U.S. stocks made solid gains Thursday as Apple and Qualcomm led a rally in technology companies. Drugmakers and health insurers also rose.

Apple changed course and rose a day after it introduced three new iPhone models and updates to the Apple Watch. Chipmakers recovered after a steep drop the day before.

Stock indexes in Turkey and other emerging markets rose after the Turkish central bank raised interest rates sharply in response to the nation’s currency crisis.

Technology stocks are edging higher after a four-day losing streak last week, their longest since April. Investors worried about the prospect of heavier regulation for companies like Facebook, Twitter and Alphabet.

That uncertainty comes right before a shift in the tech sector later this month. Companies including Facebook, Netflix and Alphabet, Google’s parent company, will move into a new group called “communications services.”

Lindsey Bell, an investment strategist with CFRA, said the changes could encourage investors to look at smaller technology companies that may have been overlooked compared to giants like Apple and Alphabet.

“Some of these software companies do have great potential, and I think they’ve been underappreciated,” she said.

The S&P 500 index gained 15.26 points, or 0.5 percent, to 2,904.18. The Dow Jones Industrial Average rose 147.07 points, or 0.6 percent, to 26,145.99. The Nasdaq composite jumped 59.48 points, or 0.7 percent, to 8,013.71. The Russell 2000 index of smaller-company stocks dipped 1.38 points, or 0.1 percent, to 1,714.32.

Apple climbed 2.4 percent to $226.41 and Qualcomm rose 4 percent to $74.61 after it announced a $16 billion stock repurchase. Other chipmakers including Skyworks and Broadcom also rose.

Insurance companies reversed their recent loses and home improvement retailers slipped as Hurricane Florence weakened somewhat.

RenaissanceRe jumped 2.7 percent to $130.95 and Everest Re climbed 3.1 percent to $220.69.

Supermarket company Kroger dropped 9.9 percent to $28.58 after its sales fell short of Wall Street forecasts.

Cable channel operator Discovery rose another 3.7 percent to $31.84. The stock jumped 7.7 percent Wednesday after the company announced a deal that will make more of its programming available on the streaming service Hulu.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.