Stocks slipped lower minutes before the close after struggling with direction much of the day despite a strong report on retail sales.
The Dow Jones Industrial Averagewas barely higher following an 80-point rally in the previous session,putting the blue-chip index on pace to end higher for the ninth session out of the past 10.
Hewlett-Packard , Traveler's and Wal-Mart led the blue-chip index higher. Boeing and American Express fell.
The S&P 500and the tech-heavy Nasdaq rose. The CBOE Volatility Index, the mostly widely used gauge of fear in the market, rose above 21.
Technology, telecom and health care sectors gained, while financials declined.
Share prices had been higher across-the-board earlier in the session, but began to back off as the S&P topped 1,127, near the top of a trading range in place since about mid-May.
Until investors are ready for the market to break out of the range, stocks may have a hard time moving much higher, said Ryan Detrick, senior technical strategist at Schaeffer’s Investment Research.
Still, a robust August retail sales report and recent signs of strength in sectors that typically lead a bull market, namely consumer discretionary, retailers, and restaurants, is encouraging, Detrick said.
"It shows people are opening their pocketbooks and confidence is coming back," he said. "Leadership is coming from the sectors you want to see have leadership, which makes us think we may break out eventually."
Detrick added that "upside is the way to play this market," probably through to the end of the year.
Macro-economic data such as jobless claims and retail sales have driven the market's direction, although secular growth stories in areas such as technology, energy and health care may begin to lift stocks as well, said Lewis Piantedosi, lead portfolio manager at Eaton Vance Management.
Technology stocks, for instance, are mostly all higher across the board as "strong secular growth themes" continue to boost names like Salesforce , Netflix and Amazon.com , Piantedosi said.
Meanwhile, tech companies focused on the beleaguered PC business may have sunk low enough to attract investor attention, Piantesdosi said.
"We're seeing a nice rally in some of those stocks because we’re at a point where expectations are so low, we don’t have a high bar to jump over to meet expectations," he said.
Cisco shares jumped more than 3 percent after CEO John Chambers explained plans to begin dividend payments in 2011. Often called the "tech bellwether," analysts look to Cisco for clues about the health of the overall sector.
Semiconductors led tech stocks, with Texas Instruments and Qualcomm trading higher.
National Semiconductor shares rose even after Citigroup cut its price target on the chipmaker to $15 from $18.
The tech sector has gotten a boost recently from a spike in global M&A activity. According to Dealogic, technology-targeted M&A hit 4,150 deals in 2010, the highest number of deals since 2000. Deal volume is at $111.4 billion, up 50 percent from the $74.1 billion in volume seen in 2009. The biggest deal was Intel's $7.67 billion purchase of McAfee in mid-August.
Shares of most retailers spiked higher after a retail sales report revealed the highest gains in five months. JC Penney soared more than 6 percent, and led the S&P 500. Abercrombie & Fitch , Kohl's and Macy's also advanced.