Stocks inched their way to a positive close after a sharp reversal in oil eased selling pressure and a late buying spree broke out in internet stocks.
The Dow Jones Industrial Average, the S&P 500 and the Nasdaq all closed Tuesday just above the unchanged mark.
Light sweet crude futures traded higher on the New York Mercantile Exchange as investors were betting persistent cold weather in the U.S. would drain heating oil inventories. But crude continued to pull back sharply after touching $59.99 a barrel in midday trading.
"I think at this stage, the market is in a tug of war between the bulls and the bears," Gene Peroni, senior managing director of equity research at Claymore Advisors, told CNBC.com. "I view this market behavior as positive and follows the old Wall Street adage of never selling a dull market short. This is a signal we are in a transitional period and this will be more of a stock-picking market than an index-focused market."
Internet stocks were among the day's bright spots as shares of Amazon.com and Yahoo! both rose more than 2.5% while eBay and Google also saw prices close higher.
But general tech weakness persisted, as Hewlett-Packard burdened the Dow, posting the largest daily decline among the 30 companies in the blue chip index.
After opening higher, Cisco Systems closed with a small loss on renewed uncertainly regarding second-quarter earnings.
Strong cash flow and increased stock buybacks are two reasons to consider investing in tech, Ajay Kapur, chief global strategist at Citigroup, said on CNBC's "Closing Bell" on Tuesday afternoon. "The technology story is very straightforward," he said. "I think these are reasonably valued companies now."
For the broader market, Kapur said Wall Street analysts' earnings forecasts for the next four quarters were too low. "The economy is picking up, unit labor costs are under control and the overall equity base is shrinking," he said. "So I expect yet another year of positive earnings surprises."
Utility stocks posted the biggest daily gain among S&P sectors followed by basic materials companies, while the late tech rally made telecommunications the session's sector loser.
Shares of General Motors rose after the company set its quarterly dividend at 25 cents a share, no change from the previous quarter.
Homebuilding stocks were weak after D. R. Horton said late Monday sales orders in January continued to fall compared to a year ago, the company revealed in documents filed with the Securities and Exchange Commission. Shares of rivals KB Home , BeazerHomes and Lennar all closed Tuesday lower.
Traders said they were not suprised the market has been trading sideways, with little economic data to move the indexes today.
"I think the market still has a positive tone, but there's no economic data and corporate activity is basically more of the same," Arthur Hogan, Managing Director at Jefferies, told CNBC.com. "We'll have to wait until tomorrow for more economic data.
"We've been pretty inactive the last couple of days, sort of languishing, but to me that feels almost a bit like a correction," Gordon Charlop, President of Walter J. Dowd, told CNBC. "We haven't been rallying with the same strength, but earnings still seem to be pretty strong and there's nothing that's making me change my optimistic forecast."
Treasury prices extended gains, sending yields lower, after a strong $16 billion auction of 3-year notes.
Treasury Secretary Hank Paulson said the economy appears to be moving from above-trend growth to a more sustainable pace of about 3%, in testimony before the House Ways and Means Committee. Paulson said low inflation is allowing workers to begin to see real wage growth.
Other actively traded stocks included National Semiconductor which fell after the company cut the fourth-quarter sales forecast late Monday. Tyco reported its fiscal first-quarter profit climbed 43% on increased revenue. The Bermuda-based conglomerate reported earnings from continuing operations for its fiscal first quarter of $742 million, or 37 cents a share.
And there was another salvo in the battle for Equity Office Properties , with Blackstone Groupraising its bid to $55.50 a share.