By Tomi Kilgore 

U.S. stocks edged higher, erasing opening losses, as investors shrugged off disappointing housing market data and as jitters over Iraq eased.

The Dow Jones Industrial Average advanced 19 points, or 0.1%, to 16800. The Dow was down as much as 48 points soon after the open before rebounding.

The S&P 500 index tacked on three points, or 0.1%, to 1941. The index was now just 0.5% below its June 9 record high close of 1951.27. The Nasdaq Composite Index climbed 19 points, or 0.4%, to 4340.

Small-company stocks outperformed the broader market for a second straight session, a sign that investors were perceiving less risk in the market. The Russell 2000 index of small-cap companies rose 0.8%, adding to a 0.4% gain in the previous session.

While the turmoil in Iraq remained in the headlines, the tension in the market appears to have eased as oil prices declined, and some safe-haven investments like gold and U.S. Treasurys pulled back.

Crude-oil futures gave up 0.3% to $106.64 a barrel. Gold futures lost 0.7% to $1,267 an ounce, after rising Monday for a sixth straight session, while the yield on the 10-year Treasury note edged up to 2.646% from 2.599% late Monday. Yields rise as Treasury prices fall.

"We've turned our attention away from the Middle East for the moment," said Joseph Quinlan, chief market strategist at U.S. Trust, Bank of America Private Wealth Management. "I believe everyone is focused on the Fed's meeting" on Wednesday.

Earlier, data showed that new residential construction for May declined 6.5% to a seasonally adjusted annualized rate of 1 million units, below expectations of 1.03 million. Building permits, which are an indicator of future construction, slid 6.4% to a 991,000 annual rate versus an estimate of 1.04 million.

Separately, the consumer-price index for May climbed 0.4% on the month, compared with expectations of a 0.2% increase. Excluding food and energy components, core CPI rose 0.3%, compared with expectations of a 0.2% rise.

Investors will be looking ahead to the release of the Federal Reserve's policy statement on Wednesday. The Fed is widely expected to announce another $10 billion reduction in its highly-stimulative bond-buying program to $35 billion a month. But investors will be looking for any changes in the Fed members' economic projections that might influence policy going forward.

"There's some positioning [by investors] related to a potential surprise, but I believe it will be steady as she goes," Mr. Quinlan said.

European stocks edged higher as investors digested mixed economic data. The Stoxx Europe 600 was up 0.2% after shedding 1.3% in the past two sessions. Annual inflation in the U.K. slowed in May to the lowest rate in five years, while investor confidence in Germany declined for a sixth-straight month despite expectations for a rise.

Asian markets were mostly lower, with China's Shanghai Composite declining 0.9%. Japan's Nikkei Stock Average bucked the trend by rising 0.3%.

In corporate news, Dow component AT&T gained 0.3% after The Wall Street Journal reported the company will be the exclusive carrier for the new smartphone from Amazon.com Inc. The phone is expected to be unveiled on Wednesday. Amazon edged up 0.2%.

Kindred Healthcare Inc. dropped 2.7% after the company increased its offer to buy the home health and hospice company Gentiva Health Services to $14.50 a share from $14 a share, raising the value of the deal to about $534 million in cash. Gentiva's stock rallied 4.4%.

Netflix climbed 3.5% after analysts at Morgan Stanley turned bullish on the stock, citing the company's long-term profit potential and belief that revenue will rise past current expectations. The firm now rates Netflix overweight, up from a previous rating of equal weight, and has a target of $500 on the stock.

Write to Tomi Kilgore at tomi.kilgore@wsj.com

Netflix (NASDAQ:NFLX)
Historical Stock Chart
From Aug 2024 to Sep 2024 Click Here for more Netflix Charts.
Netflix (NASDAQ:NFLX)
Historical Stock Chart
From Sep 2023 to Sep 2024 Click Here for more Netflix Charts.