The stock market ended an up-and-down day with solid gains, led by energy companies as the price of crude oil climbed, the AP reports. Transocean, an oil rig operator, rose 4% Wednesday. Health care stocks fell after President-elect Donald Trump said the government needs to overhaul how it buys drugs from pharmaceutical companies. Many of the biggest losses in the Standard & Poor's 500 index went to drugmakers. Endo International plunged 8.5%. Despite those drops, the Nasdaq composite posted another gain and another all-time high. The index has risen every day this year. The S&P 500 climbed 6 points, or 0.3%, to 2,275. The Dow Jones industrial average rose 98 points, or 0.5%, to 19,954. The Nasdaq composite increased 11 points, or 0.2%, to 5,563.