NEW YORK (TheStreet) -- Stocks booked their second-straight week of gains on Friday after consumer sentiment beat expectations and companies from Cliffs Natural Resources (CLF) to Campbell Soup (CPB) topped earnings estimates.

The S&P 500 is close to eliminating its year-to-date losses in part due to Federal Reserve Chairwoman Janet Yellen's indication earlier this week that the central bank's stimulus tapering plans will stay the course.

  • The S&P 500 finished up 0.48% to 1,838.63, while the Dow Jones Industrial Average was 0.79% higher at 16,154.39. The Nasdaq gained 0.08% to 4,244.02. The S&P, Dow and Nasdaq gained 2.3%, 2.3% and 2.9%, respectively.
  • The Thomson Reuters/University of Michigan preliminary index of U.S. consumer sentiment was unchanged in February from a month earlier at 81.2. Expectations were for a decline to 80.2.
  • "The truth is that confidence has not been a reliable predictor of consumption for some years now, so this really doesn't offer much comfort. We would place more weight on the trends in job and income growth," Capital Economics senior U.S. economist Paul Dales told clients.
  • January industrial production fell 0.3% after rising 0.3% in December. The result was below expectations, with manufacturing output falling 0.8%, partly due to severe weather.
  • Top gainers in the S&P 500 included Cliffs Natural Resources and Campbell Soup after both beat earnings estimates. Their shares added 5.8% and 5%, respectively. Defensive play Exxon Mobil (XOM) was a top gainer in the Dow, rising 2.9% amid the cold weather, while Murphy Oil (MUR) increased 5%. Reuters reported Friday that Murphy is considering selling some of its Asian oil and gas assets in a deal that could fetch up to $3 billion.
  • Import prices rose by a slightly more-than-expected 0.1% in January after an upwardly revised 0.2% in December, according to the Bureau of Labor Statistics.
  • The European Union's gross domestic product rose 1.1% at an annualized rate during the fourth quarter, the third-straight quarter of growth. For 2013 as a whole, GDP fell 0.4%.
  • Italy's sacked prime minister Enrico Letta has submitted his resignation, with Matteo Renzi, a centre-left Democratic party leader, expected to form a new government next week.
  • Jos. A. Bank Clothiers (JOSB) closed up 0.36% after its announcement that the company is acquiring Eddie Bauer for $825 million. Weight Watchers International (WTW) tumbled 27.7% after its quarterly earnings missed projections.
  • Germany's DAX closed ahead by 0.68% while the FTSE finished up 0.06%. Japan's Nikkei closed down 1.53% while the Hang Seng was 0.60% higher.

-- By Jane Searle, Andrea Tse and Joe Deaux in New York