By April Joyner
NEW YORK (Reuters) - U.S. stocks rose on Thursday, as losses in shares of healthcare companies, battered by Amazon's foray into drug retailing, were offset by gains in the technology and financial sectors.
The S&P 500 financial index was on track to post its first gain in 14 sessions ahead of results from the second round of the U.S. Federal Reserve's stress test for banks and lenders.
- Celebrity deaths 2018: All the stars we lost too soon 44 Pictures
- 10 finalists for TIME Person of the Year 2018 10 Pictures
But shares of several drugstore chains, drug distributors and pharmacy benefit managers fell after Amazon.com Inc said it would buy online pharmacy PillPack.
Walgreens Boots Alliance Inc, already under pressure after its third-quarter earnings report, tumbled 9.3 percent after touching more than a 3-1/2-year low. It weighed the most on the Dow, followed by UnitedHealth Group Inc, which fell 1.1 percent.
Shares of CVS Health Corp sank 6.4 percent, Rite Aid Corp shares fell 11.1 percent and Express Scripts Holding Co shares were down 1.3 percent. Amazon, by contrast, rose 2.4 percent.
Earlier in the session, the S&P 500 seesawed between gains and losses. Some investors expressed caution, given lingering worries regarding U.S. trade relations, as the end of the quarter approached.
"We're just treading water," said Brian Battle, director of trading at Performance Trust Capital Partners in Chicago. "There's been inconsistency out of the White House as to what the (trade) policy actually is. We're all just waiting and tapping our foot to see the actual policy."
The Dow Jones Industrial Average rose 122.74 points, or 0.51 percent, to 24,240.33, the S&P 500 gained 16.59 points, or 0.61 percent, to 2,716.22 and the Nasdaq Composite added 57.52 points, or 0.77 percent, to 7,502.61.
Amazon's reach was not limited to the health sector. Its plans to entice entrepreneurs to set up their own package-delivery businesses sent shares of United Parcel Service Inc and FedEx Corp skidding 2.3 percent and more than 2 percent.
Accenture PLC rose 5.3 percent after the consulting and outsourcing services provider reported quarterly revenue and profit above estimates.
Starbucks Corp dropped 3.4 percent after the company said its Chief Financial Officer Scott Maw will retire at the end of November.
Advancing issues outnumbered declining ones on the NYSE by a 1.41-to-1 ratio; on Nasdaq, a 1.15-to-1 ratio favored advancers.
The S&P 500 posted nine new 52-week highs and 24 new lows; the Nasdaq Composite recorded 34 new highs and 107 new lows.
(Additional reporting by Sruthi Shankar in Bengaluru and Savio D'Souza; Editing by Shounak Dasgupta and Chizu Nomiyama)