The Dow and S&P 500 fell on Tuesday to snap a six-session winning streak as a sharp decline in Walmart (WMT.N) weighed heavily, but gains in Amazon (AMZN.O) and chip stocks helped the Nasdaq hold near the unchanged mark.

Walmart, the world's biggest brick-and-mortar retailer, reported a lower-than-expected profit and posted a sharp drop in online sales growth during the holiday period. Its shares slumped 10.2 per cent, and suffered their biggest percentage fall since January 1988.

Markets have been choppy in recent weeks, falling more than 10 per cent from their Jan. 26 high only to rebound last week with their best weekly gain in five years. Tuesday's declines once again pushed the S&P 500 below the 50-day moving average, a technical support level.

"The basic framework in terms of the economic landscape and earnings have not really changed, although clearly Walmart has driven some fear into the market," said Peter Kenny, senior market strategist at Global Markets Advisory Group, in New York.

"We are looking for a confirmation, a technical confirmation the markets are on solid footing."

The report pulled other grocery retailers lower, with Target (TGT.N), off 3 per cent and Kroger down 4.2 percent. The S&P consumer staples index dropped 2.25 per cent and is down nearly 5 per cent for the year.

In contrast, shares of online retailer Amazon climbed 1.4 per cent.

The Dow Jones Industrial Average fell 254.63 points, or 1.01 per cent, to 24,964.75, the S&P 500 lost 15.96 points, or 0.58 per cent, to 2,716.26 and the Nasdaq Composite dropped 5.16 points, or 0.07 per cent, to 7,234.31.

The initial market selloff in January was sparked after economic data raised worries the economy may overheat, causing a quick spike in bond yields and concern the Federal Reserve may become more aggressive in raising U.S. interest rates.

While still near four-year highs, yields have leveled off somewhat of late, as benchmark 10-year U.S. Treasury notes last fell 4/32 in price to yield 2.8896 per cent, from 2.877 percent late on Friday.

The S&P technology index gained 0.3 as the sole major S&P sector on the plus side, buoyed by a gain of nearly 2 per cent in the semiconductor sector.

Qualcomm (QCOM.O) fell 1.3 per cent after the chipmaker raised its offer to buy NXP Semiconductors NV to US$127.50 per share from US$110. NXP shares jumped 5.96 per cent.

"What is going on with Qualcomm and their bid for NXP is certainly making all the semiconductors look more attractive," said JJ Kinahan, chief market strategist at TD Ameritrade in Chicago.

Home Depot (HD.N) edged down 0.14 per cent after the largest U.S. home improvement chain's quarterly profit beat market estimates in an improving housing market.

Declining issues outnumbered advancing ones on the NYSE by a 1.98-to-1 ratio; on Nasdaq, a 2.05-to-1 ratio favored decliners.

The S&P 500 posted 14 new 52-week highs and one new low; the Nasdaq Composite recorded 86 new highs and 30 new lows.

Volume on U.S. exchanges was 6.79 billion shares, below the 8.48 billion average over the last 20 trading days.

CANADIAN MARKETS

Canada's main stock index closed lower on Tuesday, following a mixed session, with weakness among gold mining stocks offsetting gains for the energy group.

The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE closed down 13.2 points, or 0.1 per cent at 15,439.44. Just three of the index's 10 main groups ended lower.

The materials group, which includes precious and base metals miners and fertilizer companies, lost 1.0 per cent. Osisko Gold Royalties (OR.TO) fell by 8.1 perc ent, Endeavour Mining (EDV.TO) was down 4.9 per cent and Klondex Mines (KDX.TO) fell by 4.6 per cent.

Gold futures fell 1.8 per cent to $1,329 an ounce.

Copper prices declined 0.6 per cent to $7,076.5 a tonne.

The energy group climbed 0.4 per cent. Crescent Point Energy Corp (CPG.TO) gained 3.2 per cent and Suncor Energy (SU.TO) rose 1.1 per cent.

The price of oil reached a nearly two-week high amid inventory declines at a key storage hub and expectations that top producers could extend cooperation beyond 2018.

The largest percentage gainer on the TSX was cannabis producer Canopy Growth Co (WEED.TO), which rose 11.7 per cent to $29.60, while the largest decliner was auto parts company Uni-Select Inc (UNS.TO), down 11.8 per cent to $22.94.

Among the most active Canadian stocks by volume were Bombardier B (BBDb.TO), up 5.1 percent to $3.92, Aurora Cannabis (ACB.TO), up 8.2 per cent to $10.96, and Canopy Growth.