By Anora Mahmudova, MarketWatch

NEW YORK (MarketWatch) -- U.S. stocks attempted a rebound Monday, but gave up most gains after home sales data showed a drop in December. Blue chips outperformed on an optimistic Caterpillar Inc. forecast.

Indexes struggled to recoup some of the deep losses from last week, their worst week in over a year, after weak data from China and selloffs in emerging-markets currencies triggered a global flight from equities.

The S&P 500 (SPX) was down 4 points, or 0.2%, at 1,786.50 after spending the early part of the session higher. The Dow Jones Industrial Average (DJI) added 21 points, or 0.1%, to 15,900.04. It was up about 48 points before the 10 a.m. housing data.

The Nasdaq Composite (RIXF) gave up opening gains and were firmly in negative territory. The tech-heavy index was recently 32 points, or 0.8%, lower at 4,096.85. Follow the stock market live blog.

"Markets are looking for an excuse to take money off the table, as we had a huge rally last year, said Scott Wren, senior equities strategist at Wells Fargo Advisors.

"We are telling our retail investors that it is a buying opportunity and instead of getting out, they should be considering putting more cash to work. Retail investors should be welcoming such pullbacks, as the 12-month outlook for stocks, especially sectors such as industrials, tech and consumer discretionary, which are usually hit the most during such sell-offs and become cheap," he added.

Upbeat results from Caterpillar Inc. lifted the Dow. Shares of Caterpillar Inc. (CAT), seen as an economic bellwether for global activity, rose 5.6%. The company posted fourth-quarter earnings per share of $1.54, topping forecasts, and a 44% profit gain. Cost cutting offset a sales drop of 10%. Caterpillar gave a forecast that beat analysts estimates for the year, and said it expects a $1.7 billion buyback in the first quarter of this year.

Sales of new single-family homes fell in December, but the whole of 2013 saw the highest sales level in five years, the government reported Monday. Sales of new single-family homes dropped 7% in December due to harsh winter weather. The median price of new homes ticked up in December and for 2013, the median price hit $265,800, up 8.4% from the prior year, the strongest annual growth since 2005.

Read: How much gas in economy's tank? Let's see

Homebuilders fell after the housing data and some ratings downgrades. KB Home was downgraded to underweight from equalweight and Toll Brothers' rating was cut to equal weight from overweight.

Shares in KB Home (KBH) gave up gains to fall 0.4%, while Toll Brothers' (TOL) shares were down a fraction.

Shares in Google Inc (GOOG) fell 2.2% after the company said it bought artificial-intelligence company DeepMind. Samsung Electronics Co. and Google also signed a long-term cross-licensing deal on technology patents.

Shares in Care.com Inc (CRCM), which jumped more than 40% on debut on Friday, continued to rise, adding 8.6%.

Investors will also focus on the Federal Reserve this week as the central bank will take center stage on Wednesday. Most observers expect the central bank to cut its bond-buying again, by about $10 million to $65 billion a month. Expectations of Fed tapering are among the reasons Wall Street suffered its worst weekly performance in more than a year last week.

In other markets, European stocks were lower on Monday, while Asia followed up those Wall Street losses with a 2.5% drop for the Nikkei 225 Index and a 2% loss for the Hang Seng Index . Gold edged lower and natural-gas prices(NGG14) fell.

More must-reads from MarketWatch:

How investors should read the news

Movers: Apple, Google in focus; Caterpillar rises on earnings

Stock investors trash market darlings, face Apple, Fed

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

Caterpillar (NYSE:CAT)
Historical Stock Chart
From Feb 2024 to Mar 2024 Click Here for more Caterpillar Charts.
Caterpillar (NYSE:CAT)
Historical Stock Chart
From Mar 2023 to Mar 2024 Click Here for more Caterpillar Charts.