Investors remained in a record-setting mood Tuesday, edging the Dow Jones industrial average and Standard & Poor's 500 index to their latest all-time highs.
Pharmaceutical and medical equipment companies led the broad pickup in stocks, extending gains for the S&P 500 and Dow. The Nasdaq notched its first gain this week.
A positive outlook from homebuilders and encouraging news from Japan and Germany also helped lift markets.
The rally builds on a market rebound in recent weeks powered by strong corporate earnings and easing concerns among investors about the spread of Ebola and economic growth overseas.
"We've gotten good news on all of the worries since mid-October and we had much better-than-expected earnings," said Kate Warne, an investment strategist at Edward Jones. "As a result, it's not surprising we're seeing a series of record highs."
The major stock indexes opened flat on Monday, but quickly began to rise.
Germany's ZEW measure of investor sentiment showed an improvement in November after 10 months of declines, allaying worries about a slowing economy and lifting European markets.
Developments in Japan, whose economy slipped into recession in the third quarter, provided some relief.
Tokyo's benchmark Nikkei index rose 2.2 percent amid expectations, later confirmed, that Japan's government will delay a sales tax hike that was planned for next year.
U.S. stocks also got a boost from an increase in a measure of U.S. homebuilders' confidence, which rebounded in November as both sales expectations and buyer traffic improved.
The indexes continued to build on their gains throughout the day as investors piled into health care stocks. Pharmaceutical giant Actavis led all stocks in the S&P 500, vaulting 8.7 percent. Medical device maker Medtronic climbed 3.3 percent.
The energy sector lagged the rest of the market as the price of oil resumed its slide.
All told, the S&P 500 index added 10.48 points, or 0.5 percent, to 2,051.80. Its previous closing high was set Monday.
The Dow rose 40.07 points, or 0.2 percent, to 17,687.82. That's just 0.2 percent higher than its most recent record close last Thursday.
The Nasdaq composite gained 31.44 points, or 0.7 percent, to 4,702.44.
Nine of the 10 sectors in the S&P 500 notched gains, led by health care stocks. The sector is up 23.5 percent this year. Telecommunications stocks declined.
On Oct. 15 the S&P 500 nearly fell into a "correction," a trading term for a drop of 10 percent or more from a recent peak. The market has mostly risen since then.
The rise in Actavis came a day after the company agreed to buy Botox-maker Allergan for $66 billion. Actavis rose $21.66 to $269.60.
"Actavis is up strong, so that suggests it's a better take on the merger deal, as people get more into the details of it," said Warne.
Medtronic shares ended up $3.28 at $72.47.
Investors kept rewarding strong company earnings.
Solar power products company JA Solar jumped 8.8 percent after it reported better-than-expected quarterly financial results. The stock added 69 cents to $8.49.
Some companies' quarterly report cards failed to impress investors.
Urban Outfitters fell 6.6 percent a day after the retailer reported third-quarter results that fell short of Wall Street's expectations. The stock shed $2.04 to $28.79.
Home Depot's third-quarter profit rose 14 percent, but the company said it could not account for all possible losses from a huge data breach it revealed in September. Shares in the nation's largest home improvement retailer fell $2.05, or 2.1 percent, to $95.98.
With the bulk of earnings season over, investors are looking ahead to how companies will fare this holiday season.
"The broad equity market is in holiday mode," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management. "I don't see the market moving meaningfully higher or lower in the near term until we get greater visibility on what consumers are going to do in the holiday season."
Market watchers anticipate the slide in gas prices will prompt consumers to spend more in coming weeks. The average price of gasoline in the U.S fell to $2.89 this week, 33 cents below prior-year levels.
"That's a meaningful dip," Sandven said.
The price of oil fell on mounting evidence of a slower global economy and doubts that OPEC will decide to cut output when it meets next week.
Benchmark U.S. crude fell $1.03 to close at $74.61 a barrel on the New York Mercantile Exchange. Brent crude, a benchmark for international oils used by many U.S. refineries, fell 84 cents to close at $78.47 on the ICE Futures exchange in London.
In other energy futures trading on the NYMEX:
— Wholesale gasoline rose 1.7 cents to close at $2.043 a gallon
— Heating oil fell 2.3 cents to close at $2.381 a gallon.
— Natural gas fell 9.7 cents to close at $4.244 per 1,000 cubic feet.
Gold rose $13.60 to $1,197.10 an ounce, silver rose 12 cents to $16.17 an ounce and copper fell four cents to $3 a pound.
The yield on the 10-year U.S. Treasury note slipped to 2.32 percent from 2.34 percent late Monday.
Among stocks making big moves Tuesday:
— Nokia rose 26 cents, or 3.4 percent, to $7.93 on news that the company plans to launch a tablet computer next year that will run on the Android operating system.
— SunEdison surged 29.3 percent after the solar energy company agreed to buy wind energy company First Wind for more than $1.9 billion. SunEdison gained $4.87 to $21.48.