Wal-Mart fell 3.4 percent to close at $69.48, its lowest in nearly 2-1/2 years, after its profit missed estimates and it cut its outlook.

Chinese stocks fell more than 6 percent overnight. Fears that Beijing may be intent on a deeper devaluation of the yuan pushed oil prices and industrial metals, including copper, to near six-year lows.

The materials sector <.SPLRCM> was the largest decliner among the top ten industry sectors with a 0.7 percent decline. Freeport McMoRan fell 3.1 percent to $9.92.

"You would think that a 6-percent China move amid the recent currency adjustments would have netted a more negative result," said Andre Bakhos, managing director at Janlyn Capital LLC in Bernardsville, New Jersey.

He said the market has not found a reason to break lower or test record highs, so "it’s been a rubber-band kind of mentality."

The Dow Jones industrial average <.DJI> fell 33.84 points, or 0.19 percent, to 17,511.34, the S&P 500 <.SPX> lost 5.52 points, or 0.26 percent, to 2,096.92 and the Nasdaq Composite <.IXIC> dropped 32.35 points, or 0.64 percent, to 5,059.35.

Homebuilders continued on a winning streak after data showed U.S. housing starts rose to a near eight-year high in July. The PHLX housing sector index <.HGX> rose 1.3 percent for an eighth straight session of gains.

"Housing starts was a very good number, with positive revisions, and I think that caught the market’s eye," said Doug Coté, chief market strategist at Voya Investment Management.

Underscoring the strength of the homebuilding sector, Home Depot rose 2.6 percent to $122.80, a record closing high.

TJX jumped 7.2 percent to close at a record high of $76.78 after same-store sales beat estimates.

Dow component Disney fell 1.9 percent to $106.94 after Wells Fargo cut its rating on the stock and five other media companies, including CBS. CBS fell 1.4 percent to $49.35.

Declining issues outnumbered advancing ones on the NYSE by 1,975 to 1,064, for a 1.86-to-1 ratio; on the Nasdaq, 1,906 issues fell and 890 advanced, for a 2.14-to-1 ratio favoring decliners.

The S&P 500 posted 41 new 52-week highs and 9 new lows; the Nasdaq was recording 69 new highs and 85 new lows.

About 5.4 billion shares exchanged hands in U.S. exchanges, below the 6.7 billion daily average so far this month, according to BATS Global Markets data.

(Reporting by Rodrigo Campos and Chuck Mikolajczak; Editing by Nick Zieminski)

By Rodrigo Campos