The slump in crude oil prices and disappointing U.S. home sales data helped nudge stocks mostly lower on Monday, pulling the market back from an all-time high reached last week.
The Dow Jones industrial average and Standard & Poor's 500 index spent much of the day hovering slightly below their most-recent highs. But the Nasdaq composite mounted a late-afternoon comeback that extended its recent win streak for the ninth day in a row.
Oil drilling companies and homebuilders notched broad declines, while traders bid up shares in utilities stocks.
Investors were looking ahead to the start of a two-day round of Congressional testimony by Federal Reserve Chair Janet Yellen. The remarks could provide insight into when the central bank will begin raising its key interest rate from near zero.
"The markets are in a holding pattern," said Erik Davidson, chief investment officer of Wells Fargo Private Bank. "We'll have some very interesting information coming up from Janet Yellen tomorrow and Wednesday, so the markets are looking at that very closely."
The Dow ended down 23.60 points, or 0.1%, to 18,116.84. The S&P 500 fell 0.64 points, or 0.03%, to 2,109.66. The Nasdaq gained 5.01 points, or 0.1%, to 4,960.97. The index, which has yet to reclaim its record high from the dot-com era, in now within 87 points of that March 2000 peak.
The three stock indexes are up for the year.
Stocks started off the day basically flat as investors weighed developments in Greece and falling oil prices.
Greece's new government and its creditors reached an agreement over the weekend that staved off the threat of a Greek bankruptcy and an exit from the euro. Athens was expected to send creditors a list of reforms tied to the four-month bailout pact early Tuesday.
The price of oil fell for the fourth day in a row as the return of a Libyan oil field raised expectations for more oil supply. Benchmark U.S. crude fell $1.36 to close at $49.45 a barrel in New York.
That helped drag down shares in several offshore oil drilling and oilfield services companies.
Transocean fell 75 cents, or 4.4%, to $16.26, while Ensco shed $1.11, or 3.7%, to $28.65. Nabors Industries fell the most among stocks in the S&P 500, losing 67 cents, or 5%, to $12.85.
Investors bought up shares in Valeant Pharmaceuticals, which announced on Sunday a deal to buy rival drugmaker Salix Pharmaceuticals for about $10 billion in cash. Valeant rose $25.49, or 15%, to $198.75.
A midmorning report showing that sales of previously occupied homes tumbled 4.9% last month sent most homebuilder shares lower. UCP declined the most, shedding 45 cents, or 4.8%, to $8.97.
"The home numbers were a little disappointing," said Bob Doll, chief equity strategist at Nuveen Asset Management.
All told, six of the 10 sectors in the S&P 500 fell. Telecommunications stocks declined the most. Utilities stocks led the gainers.
Tuesday will provide investors with some fresh insight on the U.S. consumer.
The Conference Board will report its latest consumer confidence index. January's reading surged to the highest level in nearly seven years.
But the biggest market-moving news could come from the Fed.
Yellen is scheduled to deliver her semiannual report to Congress on the economy and interest rates. Investors will be listening for any hints of when the central bank will move to raise its key interest rate. Higher Fed rates would affect rates on many consumer and business loans and could depress stock and bond prices.
The Fed's most recent policy statement expressed the intention to be "patient" about raising rates. Many economists have predicted the central bank will raise rates in June.
In other futures trading Monday, Brent crude, a benchmark for international oils used by many U.S. refineries, fell $1.32 to close at $58.90 in London. Wholesale gasoline rose 0.5 cents to close at $1.646 a gallon. Heating oil rose 10.6 cents to close at $2.218 a gallon, and natural gas fell 7.2 cents to close at $2.879 per 1,000 cubic feet.
Precious and industrial metals futures closed slightly lower. Gold fell $4.10 to $1,200.80 an ounce, silver fell two cents to $16.25 an ounce and copper edged down less than a penny to $2.59 a pound.
U.S. government bond prices rose. The yield on the 10-year Treasury note fell to 2.06% from 2.11% late Friday.
Among other stocks making moves Monday:
— Cooper Tire & Rubber fell 5% after the tire maker reported fourth-quarter earnings that fell short of what Wall Street analysts had expected. The stock shed $1.89 to $35.82.
— Tower Semiconductor reported a profit during its fourth quarter after reporting a loss in the same period a year earlier. Shares in the chipmaker vaulted $2.07, or 15.1%, to $15.76.
— Polypore International surged 12.7% on news the company is selling its energy storage business to Asahi Kasei for $2.2 billion after it sells another segment to 3M for $1 billion. The stock gained $6.75 to $59.70.