Stocks turned positive in the final minutes of trading after moving in a narrow range amid very light volume for most of a session lacking in much economic news.
The Dow Jones Industrial Average bounced above and below zero just before the close, after trading lower most of the session, and after ending last week higherfollowing Egyptian President Hosni Mubarak's decision to step down, and the U.S. government's plan to cut the size of the Federal Housing Administration.
Wal-Mart, Verizon, and Coca-Colaled blue chips lower, while Exxon Mobil and Alcoa rose.
The S&P 500 gained slightly, trading just shy of a doubling of its ominous 666 intraday low hit on March 6, 2009, a point considered the next resistance level for the broad-market index. The tech-heavy Nasdaq also rose moderately, exceeding a three-year record set on Friday. The CBOE Volatility Index, widely considered the best gauge of fear in the market, rose above 15.50.
Among key S&P 500 sectors, energy, materials and health care gained, while utilities and telecom fell.
The market moved within a narrow range on Monday in the absence of major market moving economic or geopolitical news. The Dow traded within about a 35-point range all session.
Meanwhile, oil prices began to advance again Monday after Chinese trade data indicated a rise in imports of crude, and as unrest rippled throughout the Middle East. Brent crude rose more than 2 percent to $103.08 a barrel, while U.S. light crude fell slightly to $84.81 a barrel, after trading higher earlier in the session.
Stocks of energy companies rose as well as the Oil Service Holdrs Trust gained about 2 percent after slipping last week. Major producers rose as well, including ConocoPhillips ,Devon Energy and BP , as well as Exxon, which traded above its 52-week high.
Also, materials and energy stocks got a boost from Citigroup, which raised its price targets for several steel and coal companies, saying international demand will support higher prices for the sector. Citi boosted US Steel's price target to $60 a share from $57, Freeport McMoran's to $60 a share from $59, and Cliffs Natural Resources' target to $108 a share from $87. The brokerage also lifted the stocks of coal companies, including Patriot Coal, Arch Coal and Peabody Energy.
Ahead of the session, TrimTabs Investment Research reported being "cautiously bullish" on the market, saying investor complacency with the market's strong showing counters upbeat factors, such as continued support for the economy from the Federal Reserve and evidence the economy continues to grow at a moderate pace.
While the market continues to trade at multi-year highs, many investment analysts believe there is still room for stocks to move higher. The S&P 500 is trading at 14 times earnings, which Michael Hanlon, senior investment analyst at John Hancock Asset Management, told CNBC isn't a "stretch valuation."
"We're still finding value in financials, we’re still finding value in technonology, and we’re even still finding value in consumer discretionary stocks," Hanlon said.
Concerns over Middle East have eased somewhat since Mubarak’s exit, but the outlook for Egypt remains uncertain and more unrest could cause further volatility. The Market Vectors Egypt Exchange-Traded Fund continued to trade higher, although the Egyptian stock market, on which the ETF is based, remains closed.
President Obama's budget would slash $1.1 trillion from the U.S. deficit over 10 years and includes a range of domestic spending reductions that would put the government on track to halve the federal budget deficit by the end of Obama's first term in office.
With no macroeconomic data due on Monday, investors will gear up for retail sales data on Tuesday and inflation figures later in the week. Creeping inflation has increasingly become a concern for investors.
Elsewhere, Netflix soared more than 6 percent after Caris raised its price target on the subscription movie and TV content provider to $316 a share from $224. (Read more: Netflix Streaming Selection Set To Improve.)
Also, Nielsen , which tracks consumer use of media, said Netflix was the only paid video service to reach the top ten of video services on the web, which includes several free sites, such as YouTube and Hulu.
But the real reason for Monday's spike was investors who held short positions in the stock—or bets that the stock would fall in price—had given up, Scott Redler, chief strategic officer at T3trading.com, told CNBC.com.
"I think the shorts are throwing in the towel," Redler said.
The move to give up on the short positions is in the wake of investor Whitney Tilson's decision to end his significant short position in the stock last week, in the face of unrelenting gains, Redler said.
Netflix was trading at around $246 a share on Monday, up from $183 a share less than a month ago. The sharp move higher also reflected the fact Netflix has only 55 million shares outstanding, compared with 900 million for a stock like Apple , so moves can be exaggerated, Redler added.
Netflix's rise combined with moves higher by Apple, Google and Amazon (the "Fab 4, according to Eliot Spar at Stifel Nicolaus) helped to push the Nasdaq higher, Spar said in a note to clients.
Elsewhere, Wal-Mart's shares were under pressure after JPMorgan became the latest brokerage to downgrade the big-box retailer. JPMorgan lowered Wal-Mart's rating to "neutral" from "overweight," and cut its price target to $54 a share from $59. The brokerage said the deterioration in the company's same stores sales results could last for years and that its response to heightened competition has fallen short. (Read more: Is Wal-Mart No Longer a Retail Wizard?)
Nokia fell after news the wireless handset maker has entered into a partnership with Microsoft. Also, JPMorgan downgraded the company on Monday to "underweight" from "overweight."
Also Clorox shares fell to the bottom of the S&P 500 after the consumer products company's stock was cut to "neutral" from "buy" by UBS, and to "underperform" from "neutral" by Bank of America Merrill Lynch. Clorox had soared Friday after news activist investor Carl Icahn owns about 9 percent of the company's shares.
Green Mountain Coffee Roasters fell after news reports over the weekend that rival Starbucks may soon offer a single-serve product to compete in a niche that had been dominated by Green Mountain. Canaccord Genuity believes Starbucks and Green Mountain are likely to partner in creating a new technology for the Keurig brewing systems, but that view is not universally shared by analysts.
In earnings news, MGM Resorts sank after reporting a loss in the fourth quarter that was still less than the loss reported a year ago. Marriott International traded flat ahead of reporting earnings after-the-bell on Monday.
Earnings expected to take center-stage later this week include Dell , which will release quarterly figures after the bell on Tuesday, while Deere will report before Wednesday’s opening bell.
TrimTabs noted that companies reporting earnings so far have announced "huge" new stock buybacks. "All else being equal, fewer shares translate into higher stock prices," the firm said, adding that "companies announced a whopping $77.4 billion in float shrink in the past three weeks, and the volume of stock buyback announcements in earnings season is running at the fastest pace in three years."
In merger and acquisition news, General Electric will buy the well support division of British energy services firm John Wood Group for about $2.8 billion. General Electric owns a stake in CNBC's parent company, NBC Universal.
Also, private equity company Clayton Dubilier & Rice was close to buying Emergency Medical Servicesand EchoStarhas agreed to buyHughes Communications for about $1.33 billion, excluding debt, a move that will boost the broadband capabilities of the communication equipment provider.
Seahawk Drilling plunged after news Hercules Offshore has agreed to buy off-shore drilling rigs and related assets from its rival for $100 million in cash and stock.
The dollar rose against a basket of currenciesas the euro struggled amid reports that Germany’s financial watchdog has become involved in a rescue of WestLB. Gold rose slightly to close at $1,364.60 an ounce.
Some of the biggest financial policymakers appear before Congress this week, with the highest-profile event on Thursday when Federal Reserve Chairman Ben Bernanke testifies before the Senate Banking Committee.
The panel will also hear from the heads of the Securities and Exchange Commission and the Commodity Futures Trading Commission.
In Europe, Italy sold 5.2 billion euros in government bonds on Monday morning in an auction analysts said received solid demand.
Meanwhile, European shares closed at a 29-month high, led by mining stocks. The FTSEurofirst300 index rose 0.3 percent.
Coming Up This Week:
MONDAY: Earnings after-the-bell from Marriott.
TUESDAY: Retail sales, Empire state manufacturing survey, import & export prices, Treasury international capital, business inventories, housing market index, Cleveland Fed President speaks, Dodd-Frank hearing, Geithner testifies before U.S. House, Fannie/Freddie reform hearing, credit-card default rates reported, 13-F filings due; earnings before-the-bell from Barclays; earnings after-the-bell from Dell and Tesla.
WEDNESDAY: Weekly mortgage applications, housing starts, PPI, industrial production, House hearing on FCIC report, oil inventories, FOMC minutes; earnings before-the-bell from Comcast; earnings after-the-bell from CBS, NetApp and Nvidia.
THURSDAY: Weekly jobless claims, CPI, leading indicators, Philadelphia Fed survey, Chicago Fed President speaks, money supply; earnings before-the-bell from Barrick Gold, AngloGold and Nordstrom.
FRIDAY: Earnings before-the-bell from Campbell Soup.
More From CNBC.com: