Energy stocks led the gainers as the price of crude oil rose for the fifth day in a row. Phone companies were the biggest laggards.
The Standard & Poor’s 500 index gained 0.1 percent, to 2,357.16. The Dow Jones industrial average rose 0.01 percent, to 20,658.02. The Nasdaq composite added 0.1 percent, to 5,880.93.
Bond prices rose. The 10-year Treasury yield fell to 2.36 percent from 2.38 percent late Friday.
The major indexes veered lower soon after the market opened on Monday, but moved into positive territory by midday. They spent much of the afternoon drifting between small gains and losses. Trading was mostly quiet ahead of the Good Friday holiday, when US markets will be closed.
No major economic reports are due this week, though the next cycle of company earnings reports kicks off on Wednesday.
‘‘In terms of everything else, the market is in a wait-and-see mode,’’ Schiegoleit said.
Several oil industry stocks got a boost from the rising crude prices. Hess climbed 4 percent, and rig operator Transocean rose 2.6 percent.
Benchmark crude rose 1.6 percent to $53.08 a barrel in New York. Brent crude gained 1.3 percent to $55.98 in London.
Traders bid up shares in several companies announcing deals.
Trucking companies Swift Transportation and Knight Transportation agreed to combine as a company called Knight-Swift Transportation Holdings; Swift’s shares rose 23.7 percent, while Knight’s gained 13.4 percent.
Straight Path Communications more than doubled after the wireless spectrum license company agreed to be acquired by AT&T in a deal valued at $1.25 billion. Straight Path’s shares gained 151.2 percent.
A potential company sale also drew investors to buy up shares in Whole Foods Market. The stock jumped 10 percent after Jana Partners bought an 8.8 percent stake in the supermarket chain. Three Jana employees plan to run for spots on the board and seek to launch a review of options for the company, including a potential sale. The stock was the biggest gainer on the S&P 500.