The euro hovered near a two-month high while U.S. stocks moved sideways on Monday as worries about the pace of a U.S. economic recovery kept markets cautious.

After Friday's worst one-day drop since late June, the S&P and other U.S. stock indexes opened higher as earnings season kicked into high gear, but weak homebuilding data reminded investors of the delicate state of the economic recovery.

The early rise in stocks pushed oil prices up 1 percent and pressured gold to a two-month low amid a sharper appetite for riskier assets.

But markets lost ground after data showed homebuilder sentiment fell more than expected in July to its lowest level in more than a year after a popular homebuyer tax credit expired.

Seeing these numbers go down fits the notion that housing will be a drag into the third quarter, said Jonathan Basile, economist at Credit Suisse in New York.

No one is surprised by this, but it's a disappointment nevertheless. It's going to need a big carrot for people to buy homes. They are just not confident enough to do so. The downside surprise today means a downside surprise in housing starts tomorrow.

U.S. housing starts data is to be released on Tuesday at 8:30 a.m. EDT.

The Dow Jones industrial average .DJI gained 23.69 points, or 0.23 percent, to 10,121.59. The Standard & Poor's 500 Index .SPX rose 2.24 points, or 0.21 percent, to 1,067.12. The Nasdaq Composite Index .IXIC added 7.05 points, or 0.32 percent, to 2,186.10.

Markets awaited earning results from IBM (IBM.N) and Texas Instruments (TXN.N) after the bell.

World stocks as measured by MSCI .MIWD00000PUS edged down 0.3 percent, while its emerging market counterpart .MSCIEF lost 0.5 percent.

In Europe, the FTSEurofirst 300 index .FTEU3 turned negative after the U.S. homebuilder sentiment, falling 0.5 percent and pressured by BP (BP.L) shares, which shed 4.4 percent as investors fretted about possible seepage from its capped Gulf of Mexico oil well.

Asian stocks excluding Japan .MIAPJ0000PUS fell 1 percent.

Data at the end of last week showed consumer sentiment in the world's biggest economy dropped to a near one-year low in July and consumer prices fell for a third month in June, highlighting a sluggish U.S. recovery.

EURO SEEN CAPPED

The euro was up 0.40 percent at $1.2982, hovering near a two-month high against the dollar and rebounding from lows hit after a downgrade of Ireland's sovereign ratings.

The euro initially reacted to that, but quickly realized that this is not a game changer, said Matthew Strauss, senior currency strategist at RBC Capital Markets in Toronto. Overall, the market is still looking for direction after last week's strong move in the euro.

Moody's Investors Service downgraded Ireland's sovereign bond rating to Aa2, with a stable outlook, from Aa1.

Semi-official euro demand was helping to push the rate back above $1.2900, while a large buy order from the Middle East, executed through a major U.S. bank in London, lifted euro/dollar to a session high of $1.2991.

The International Monetary Fund and the European Union on Saturday suspended a review of Hungary's funding program, which also pressured the single currency.

In energy and commodity prices, crude oil rose 1.2 percent to $76.90 per barrel, while spot gold fell more than 1 percent to a two-month low at $1,178.40 an ounce.

U.S. Treasury debt prices slipped, but volume was scant, and analysts said market action would be driven mostly by stock price movements.

The benchmark 10-year U.S. Treasury note was down 4/32, with the yield at 2.9393 percent. The 2-year U.S. Treasury note dipped 1/32, with the yield at 0.5926 percent. The 30-year U.S. Treasury bond was off 13/32, with the yield at 3.9618 percent.

(Additional reporting by Wanfeng Zhou and Richard Leong in New York; editing by Jeffrey Benkoe)