Dow Ekes Out a Gain, Led by Microsoft

Stocks pulled off a gain Tuesday, after spending much of the day in the red. Microsoft led the Dow after several positive analyst comments.

But the retail sector took a hit today after weak outlooks from Home Depot and Target.

The gains were modest: The Dow Jones Industrial Average and the Nasdaq each rose 0.3 percent, while the S&P 500 added 0.1 percent. Still, it was enough to notch a new 13-month high on every index.

Microsoft gained 2 percent. Morgan Stanley raised its price target on the stock, citing encouraging demand for Windows 7 and the outlook for the holiday season.

UBS analyst Brent Thill on Monday slapped a "buy" rating and $34 price target on Microsoft stock, which is currently just shy of $30.

Thill also has a "buy" on Adobe and Oracle , with price targets of $43 and $27, respectively.

In other analyst action, Barclays raised its rating on ExxonMobil to "overweight" from equal weight."

Home Depot was the biggest drag on the Dow, falling 2.4 percent, after the home-improvement chain beat earnings expectations and raised its full-year outlook but said its markets remain under pressure. And, when you break down their forecast, the fourth-quarter outlook was below consensus.

Target fell 3 percent after the discount retailer reported its earnings rose 18 percent, snapping eight quarters of decline, but was also cautious on the fourth quarter amid weak sales results for early November, sending its shares lower.

And Pacific Sunwear droped 23 percent as the teen chain reported its loss for the latest quarter widened and warned its loss for the holiday quarter would be much more than Wall Street expects.

Consumer-discretionary stocks were among the day's worst performers, with the S&P discretionary-sector index down 0.7 percent.

Telecoms were one of the best performers, with gains across the smartphone sector: Palm jumped 5.8 percent, while Leap Wireless advanced 3.4 percent Motorola and Garmin gained nearly 2 percent.

Citigroup rose 1.4 percent after the lumbering financial giant gave its CFO and global markets co-head a pay increase. CEO Vikram Pandit's salary was unchanged.

Wall Street firms bailed out by the government, like Citigroup, have been struggling with how to retain top talent — and get them to perform.

Winterizing Your Portfolio - A CNBC Special Report
Winterizing Your Portfolio - A CNBC Special Report

Ford rose 3.1 percent and touched a two-year high as the Ford Fusion was named Motor Trend's 2010 car of the year.

As for the day's data points: Producer prices rose 0.3 percentin October, with the core rate dropping 0.6 percent. Economists were looking for an increase of 0.5 percent and a drop of 0.1 percent, respectively.

And industrial production climbed 0.1 percentlast month, less than the 0.4-percent gain expected.

The dollar bounced backfrom a 15-month low on Monday after rare comments from Fed Chairman Ben Bernanke on the dollar. Bernanke said the central bank was ""attentive to implications of changes in the value of the dollar," but reaffirmed that the Fed planned to keep rates low for an "extended period."

Speaking in Hong Kong, San Francisco Fed President Janet Yellen said setting interest rates can play a role in averting crises, but whether they should be set in response to asset prices is still an open question. Those remarks echoed similar comments from Bernanke yesterday.

Richmond Fed President Jeffrey Lacker said a recovery is "solidly" underway and he expects the economy to grow at a "reasonable pace" next year. But he also made remarks that may be seen as a signal of Fed tightening, saying pockets of sluggishness in the economy should not prevent the Fed from beginning to unwindits extraordinary level of support.

"If we hope to keep inflation in check, we cannot be paralyzed by patches of lingering weakness, which could persist well into the recovery," Richmond Federal Reserve Bank President Jeffrey Lacker said in a speech to members of the Virginia House of Delegates.

The Fed also announced plans to cut the maturity on discount-window loans to 28 days from 90 days amid signs of improvement in financial markets. The Fed had extended the timeframe when the financial crisis first hit in August 2007.

Volume was extremely light today, with about 972 million shares changing hands on the New York Stock Exchange. Typical volume is more like 1.5 billion. Decliners outpaced advancers, roughly 6 to 5.

If you're following the billionaires next door, Warren Buffet's Berkshire Hathaway and the Bill and Melinda Gates Foundation have both increased their stakes in a number of companies, according to their latest quarterly filings.

Berkshire has increased its stake in Wal-Mart, while lowering its holdings in ConocoPhillips and NRG Energy .

It's also reported news takes in Nestle, Republic Services, and Travelers.

The Gates Foundation has boosted its holdings in Coca-Cola, McDonald's, and Waste Management .

Still to Come:

WEDNESDAY: Weekly mortgage applications; CPI; housing starts; weekly crude inventories; Earnings from BJ's, Limited
THURSDAY: EU chooses new president; Fed's Plosser, Fisher speak; Ghosn, Rattner speak; weekly jobless claims; leading indicators; Philly Fed; Geithner speaks; Earnings from Sears, Dell, Gap
FRIDAY: Fed's Plosser speaks; state-by-state jobs report

Send comments to cindy.perman@nbcuni.com.