A rebound in Apple shares helped push US stocks higher on Wednesday, breaking the market's two-day string of losses.
Apple shares jumped 3.1% to $101, the most actively traded on the Nasdaq, after several brokerages raised their price targets on the iPhone maker.
Its shares had ended down slightly on Tuesday. Investors took profits in the stock after the company launched the iPhone 6 and introduced a new product, the Apple Watch.
Several companies that deal in wireless and cash-less payments rose on Wednesday, as well, in the wake of Apple announcing the Apple Pay mobile payment service.
Shares of On Track Innovations Ltd jumped 6.9% to $3.55. Net Element Inc more than doubled, up 119% to $3.80. But eBay Inc fell 3.1% to $51.10 as analysts viewed as a threat to PayPal, its online payment service.
Wednesday's gains follows two sessions of losses for the S&P 500.
More From This Section
"The equity market seems to have this rising tide atmosphere, and everyone's watching Apple. As it moves, so does the market," said Michael O'Rourke, chief market strategist at JonesTrading in Greenwich, Connecticut.
Energy shares were among the biggest drags for the second session this week, following another decline in oil prices. US crude futures fell to a 16-month low, while Brent fell to a 17-month low.
The S&P energy index ended down 0.3%. The index is down 3.9% for the month so far.
Other recent weakness in US stocks has been triggered by concerns the Federal Reserve could raise interest rates sooner than some investors had expected. Higher rates would raise borrowing costs for individuals and companies.
The Dow Jones industrial average rose 54.84 points, or 0.32%, at 17,068.71, the S&P 500 gained 7.25 points, or 0.36%, at 1,995.69 and the Nasdaq Composite added 34.24 points, or 0.75%, at 4,586.52.
The largest percentage gainer on the New York Stock Exchange was Daqo New Energy, which rose 14.43%, while the largest%age decliner was Pulse Electronics, which fell 21.94%.
Among the most active stocks on the NYSE were US-listed shares of Petrobras, down 2.52% at $17.38, and Rite Aid, up 2.54% at $6.46.
Besides Apple, GT Advanced Technologies, down 14.5% at $12.78, and 21Vianet Group, down 8.0% to $20.13, were among the most actively traded on Nasdaq.
It was a second day of sharp losses for GT Advanced Technologies. Apple said its new iPhone 6 would not feature screens made with GT's sapphire glass displays.
Advancing issues outnumbered declining ones on the NYSE by 1,612 to 1,414, for a 1.14-to-1 ratio on the upside; on the Nasdaq, 1,646 issues rose and 1,049 fell for a 1.57-to-1 ratio favoring advancers.
The broad S&P 500 index posted 14 new 52-week highs and five new lows; the Nasdaq Composite recorded 52 new highs and 60 new lows.
About 5.5 billion shares changed hands on US exchanges, matching the average for the last five days, according to data from BATS Global Markets.