Gains by healthcare companies led U.S. stock indexes mostly higher Tuesday, pushing the market further into record territory.
The Dow Jones industrial average briefly climbed above the 23,000 mark for the first time, settling just below the milestone. Slight gains nudged the Dow and Standard & Poor's 500 indexes to new highs for the second straight day this week.
Healthcare companies posted some of the biggest gains after UnitedHealth Group and Johnson & Johnson reported strong earnings. News of a plan backed by the White House that would extend federal payments to health insurers also gave the sector a boost. Banks and other financial stocks declined the most. Packaged food and beverage companies were also big laggards.
Trading was mostly listless as investors sized up the latest company earnings news and looked ahead to a slate of corporate report cards later this week.
"Expectations of ongoing earnings growth are reasonably strong, but there may be a bit of a wait-and-see at this point in time given the run in the equity markets," said Jason Pride, director of investment strategy at Glenmede.
The S&P 500 index ticked up 1.72 points, or 0.1%, to 2,559.36. The Dow rose 40.48 points, or 0.2%, to 22,997.44. The Nasdaq composite slipped 0.35 points, or 0.01%, to 6,623.66. The Russell 2000 index of smaller-company stocks fell 5.18 points, or 0.3%, to 1,497.50.
More stocks fell than rose on the New York Stock Exchange.
The major stock indexes drifted between small gains and losses for much of the day.
Early on, traders eyed earnings news from big companies such as Goldman Sachs, Morgan Stanley, UnitedHealth Group and Johnson & Johnson, among others.
UnitedHealth, the country's biggest health insurer, jumped 5.5% to $203.89 after reporting earnings that beat analyst estimates. Johnson & Johnson advanced 3.4% to $140.79 after reporting a strong quarter of its own.
Health insurers, hospitals and other healthcare companies also rose as two leading lawmakers reached a deal on a plan that would extend federal payments to health insurers that President Trump blocked last week. Trump said Tuesday that the White House has been involved in the plan, which he called a "short-term deal." Biogen rose 2.6% to $344.47. Anthem rose 2.4% to $186.19.
Morgan Stanley rose 0.4% to $49.12 after posting quarterly results that beat Wall Street's expectations.
Traders took a dimmer view of Goldman Sachs' results. The bank also posted results that beat financial analysts' estimates, but its trading desks, which are weighted toward bonds, currencies and commodities, struggled during the quarter. Goldman shares slid 2.6% to $236.09.
Netflix fell 1.6% to $199.48 after the streaming video company said its debt and programming costs continue to rise as it gained subscribers last quarter.
Although only a few companies have reported results so far, earnings are mostly looking good, said Erik Davidson, chief investment officer for Wells Fargo Private Bank.
"Earnings are growing year over year, and, most importantly, the [revenue] overall thus far seems to be doing OK," he said.
Fifty companies are scheduled to report quarterly results this week, the first full week of the third-quarter earnings season. S&P 500 companies are forecast to deliver 3.3% earnings growth in the third quarter, according to S&P Global Market Intelligence.
Among the big names due to report earnings this week are American Express, Verizon Communications and General Electric.
Traders also drew encouragement Tuesday from economic data that showed U.S. industrial production rose a solid 0.3% last month, as manufacturing of automobiles, home electronics and appliances increased. The gains were limited because of lingering damage from Hurricanes Harvey and Irma.
Separately, a gauge of home builders' confidence rose more than expected this month as builders looked past a recent slowdown in new home sales and the risk of rising labor and materials costs because of the two hurricanes.
Bond prices were little changed. The yield on the 10-year Treasury note held steady at 2.30%.
Oil prices edged up. Benchmark U.S. crude rose a penny to $51.88 a barrel. Brent crude, used to price international oils, rose 6 cents to $57.88 a barrel.
Wholesale gasoline rose a penny to $1.63 a gallon. Heating oil was little changed at $1.81 a gallon. Natural gas rose 2 cents to $2.96 per 1,000 cubic feet.
Gold fell $16.80 to $1,286.20 an ounce. Silver fell 33 cents to $17.04 an ounce. Copper fell 4 cents to $3.20 a pound.
The dollar fell to 112.18 yen from 112.22 yen. The euro fell to $1.1772 from $1.1792. The pound fell to $1.3191 from $1.3243 after Bank of England Governor Mark Carney warned about the economic effect of Brexit.
Markets overseas were mixed. Germany's DAX and London's FTSE 100 each fell 0.1%, while France's CAC 40 was essentially flat. Hong Kong's Hang Seng was unchanged ahead of a twice-a-decade congress Wednesday by China's ruling Communist Party. Tokyo's Nikkei 225 gained 0.4%, Sydney's S&P-ASX 200 rose 0.7%, and Seoul's Kospi advanced 0.2%.
3:10 p.m.: This article was updated with closing prices, context and analyst comments.
1:25 p.m.: This article was updated with the close of markets.
8:50 a.m.: This article was updated with more recent market movements.