(AP) -- Energy companies led U.S. stocks modestly higher Wednesday, nudging the Nasdaq composite to its fifth record-high close in a row.
Rising crude oil prices gave energy companies a boost, including oil rig operator Transocean, which rose 4 percent. Traders also bid up shares in utilities.
Health care stocks fell after President-elect Donald Trump spoke about the need for the government to stem drug costs by creating new bidding procedures. Pharmaceutical company Endo International led the decliners in the Standard & Poor's 500 index, sliding 8.5 percent.
The stock market spent much of the day wavering between small gains and losses as investors sized up outlooks from several companies ahead of the latest batch of corporate earnings reports.
"The heavy load comes in the coming weeks," said Tim Dreiling, regional investment director for U.S. Bank's Private Client Reserve. "There's a little bit of a wait-and-see on what those earnings numbers look like."
The Dow Jones industrial average rose 98.75 points, or 0.5 percent, to 19,954.28. The S&P 500 index added 6.42 points, or 0.3 percent, to 2,275.32. The Nasdaq gained 11.83 points, or 0.2 percent, to 5,563.65. The index has risen every day this year.
During a press conference Wednesday morning, Trump said the government has to create new bidding procedures for the pharmaceutical industry "because they're getting away with murder." The remarks sent health care stocks broadly lower, particularly pharmaceutical companies. At one point, drugmakers and one prescription drug distributor accounted for the nine biggest losers in the S&P 500.
Endo International posted the biggest loss, tumbling $1.30 to $14.01. Perrigo slid $5.77, or 6.9 percent, to $77.88. Mallinckrodt slumped $3.31, or 6.2 percent, to $50.44.
P[L1] D[0x0] M[300x250] OOP[F] ADUNIT T
Not all drugmakers had a bad day.
Merck rose 2.9 percent on news that the Food and Drug Administration will do a quick review of one of the company's drugs for its potential to treat a type of lung cancer. The stock added $1.71 to $61.63.
Big U.S. companies start reporting fourth-quarter earnings this week. On Friday JPMorgan Chase, Wells Fargo and Bank of America release their results.
"As we look into 2017, we still expect equities are going to be able to grind higher, because we still have enough of an economic push to do that," Dreiling said. "But a move up in equities is going to have to come from earnings, otherwise, these valuations ... look pretty stretched, pretty rich at these levels."
Investors had their eye Wednesday on companies that released earnings or forecasts of their upcoming quarterly results.
SuperValu slid 7.5 percent after the grocery store operator announced a weak third-quarter profit, partly because of falling food prices. The stock shed 36 cents to $4.43.
Traders bid up shares in several companies that projected strong fourth-quarter results.
Intuitive Surgical gained $15.96, or 2.4 percent, to $678.16, while medical device maker Stryker added $1.76, or 1.4 percent, to $123.66.
Quarterly outlooks from other companies failed to impress investors.
Signet Jewelers cut its profit forecast for the fourth quarter and current fiscal year, noting its sales fell 5 percent over the holidays. The stock fell $2.76, or 3.2 percent, to $84.70.
Auto parts supplier BorgWarner slid 1.6 percent after it issued a profit and sales forecast that fell short of what Wall Street was anticipating. The stock shed 65 cents to $40.12.
The major indexes in Europe were mixed.
Germany's DAX rose 0.5 percent, while France's CAC 40 was essentially flat. Britain's FTSE 100 gained 0.2 percent.
Earlier in Asia, a strong earnings forecast from Samsung Electronics helped drive gains on the South Korean stock market, where the Kospi added 1.5 percent and hit its highest close in over a year. Japan's benchmark Nikkei 225 rose 0.3 percent. Australia's S&P/ASX 200 added 0.2 percent. Hong Kong's Hang Seng gained 0.8 percent.
Benchmark U.S. crude rose $1.43, or 2.8 percent, to close at $52.25 a barrel in New York. Brent crude, which is used to price oil sold internationally, gained $1.46, or 2.7 percent, at $55.10 a barrel in London. In other energy trading, wholesale gasoline added 5 cents to $1.59 a gallon and heating oil rose 4 cents to $1.65 a gallon. Natural gas futures slipped 5 cents to $3.22 per 1,000 cubic feet.
Bond prices rose. The yield on the 10-year Treasury note fell to 2.36 percent from 2.38 percent late Tuesday.
In currency markets, the dollar fell to 115.43 yen from 115.73 yen late Tuesday. The euro rose to $1.0576 from $1.0560. The pound, which has been declining amid concern that Britain might break off completely from the European Union's single market, gained ground on the dollar. The British currency strengthened to $1.2208 from $1.2163.
Among metals, the price of gold rose $11.10 to $1,196.60 an ounce. Silver slipped 2 cents to $16.83 an ounce. Copper was little changed at $2.61 a pound.