Technology, health care lift stocks to record highs

FILE - This July 15, 2013, file photo, shows a sign for Wall Street outside the New York Stock Exchange. Global stock markets eked out some modest gains Wednesday, July 19, 2017, as investors turned their attention to upcoming central bank meetings in Japan and Europe. (AP Photo/Mark Lennihan, File)
FILE - This July 15, 2013, file photo, shows a sign for Wall Street outside the New York Stock Exchange. Global stock markets eked out some modest gains Wednesday, July 19, 2017, as investors turned their attention to upcoming central bank meetings in Japan and Europe. (AP Photo/Mark Lennihan, File)

NEW YORK (AP) - U.S. stocks continued to climb Wednesday, led by technology, health care and energy companies. Media companies also rose as stock indexes set record highs.

The technology part of the Standard & Poor's 500 index finally broke the record it set in March 2000, before the dot-com bubble burst. Energy companies rose with the price of oil as U.S. energy stockpiles continued to shrink. Cable network companies Scripps Networks and Discovery Communications jumped after the Wall Street Journal reported that they are in talks to combine.

Stocks have been setting records for most of this year, and over the last few months, they've gotten a boost from a recovery in corporate profits.

"Earnings are coming in better than expected so far," said Jon Adams, senior investment strategist for BMO Global Asset Management. "Technology in particular has come in very strong."

The Standard & Poor's 500 index rose 13.22 points, or 0.5 percent, to 2,473.83. Despite a sharp drop from IBM, the Dow Jones industrial average added 66.02 points, or 0.3 percent, to 21,640.75. The Nasdaq composite gained 40.74 points, or 0.6 percent, to 6,385.04. The Russell 2000 index of smaller-company stocks jumped 14.16 points, or 1 percent, to 1,441.77. All four indexes closed at record highs.

The S&P 500 technology index finally surpassed its peak from late March 2000, at the height of the dot-com boom. That index came close to an all-time high in early June, but after that technology companies went into a swoon that lasted about a month. Their recovery over the last two weeks has helped the Nasdaq composite pull off a rally as well.