WASHINGTON (Reuters) - U.S. consumer confidence surged to near an 18-year high in August, as households remained upbeat on the labor market, pointing to strong consumer spending that should help to sustain the economy for the remainder of the year.

FILE PHOTO: People are seen walking through Roosevelt Field shopping mall in Garden City, New York February 22, 2015. REUTERS/Shannon Stapleton/File Photo

The bright economic outlook, however, was dimmed somewhat by other data on Tuesday showing the goods trade deficit widened sharply in July as exports of agricultural products tumbled, indicating trade could be a drag on growth in the third quarter.

The jump in confidence this month suggests consumers are little worried about the Trump administration’s protectionist trade policy, which has led to an escalation of a trade war between the United States and China as well as tit-for-tat tariffs with the European Union, Canada and Mexico.

Economists have warned that the duties on imports will raise prices for ordinary Americans as well as make raw materials more expensive for some manufacturers. There have been reports of some companies either laying off workers or planning to as a result of the import tariffs.

“That suggests a degree of skepticism about trade, inflation, or anything else knocking the economy off track,” said Jim Baird, chief investment officer at Plante Moran Financial Advisors in Kalamazoo, Michigan. “For now, consumers remain resiliently positive, which bodes well for household spending in the coming months.”

The Conference Board said its consumer confidence index jumped 5.5 points to 133.4 this month, the highest reading since October 2000. Consumers’ assessment of both current business and labor market conditions improved further in August.

Many consumers said they planned to buy a house or other big-ticket items in the months ahead. The survey’s so-called labor market differential, derived from data about respondents who think jobs are hard to get and those who think jobs are plentiful, rose to 30.0 in August from 28.0 in the prior month.

That measure closely correlates to the unemployment rate in the Labor Department’s employment report. It is consistent with continued reduction in slack in the labor market, which is near full employment. Consumers’ near-term inflation expectations moderated this month from July.

The Conference Board survey’s findings are in stark contrast with a University of Michigan survey showing consumer sentiment falling to an 11-month low in early August as households worried about rising inflation eating into their modest wage increases and eroding their purchasing power.

Economists attributed the divergence between the two surveys on their treatment of the labor market.

“The latest reading from the Conference Board index was one of the more upbeat measures, which could be related to the survey’s emphasis on the labor market, many other labor market indicators have been strong lately.”

Stocks on Wall Street were trading flat a day after the United States and Mexico reached an agreement on an overhaul of the North American Free Trade Agreement (NAFTA). The dollar .DXY slipped to a four-week low against a basket of currencies. Prices for U.S. Treasuries fell.

GOODS TRADE DEFICIT WIDENS

Separately, the Commerce Department said in its advance economic indicators report that the goods trade gap surged 6.3 percent to $72.2 billion last month. Exports of goods dropped 1.7 percent to $140.0 billion, weighed down by a 6.7 percent plunge in shipments of food, feeds and beverages.

That likely reflected a continued reversal of soybean exports after farmers front-loaded shipments of the crop in April and May to China before Beijing’s retaliatory tariffs came into effect in early July.

There were also decreases in exports of capital and consumer goods last month, though motor vehicle exports rose. Imports of goods rose 0.9 percent to $212.2 billion in July, boosted by imports of food, industrial supplies and capital goods.

There were also increases in motor vehicle imports, but imports of consumer goods fell.

The government reported last month that trade contributed 1.06 percentage points to the economy’s 4.1 percent annualized growth pace in the second quarter.

Despite the anticipated drag from trade, economic growth in the July-September quarter is still likely to remain solid.

The Commerce Department also reported on Tuesday that wholesale inventories jumped 0.7 percent in July and stocks at retailers increased 0.4 percent, suggesting inventories could provide a boost to gross domestic product this quarter.

There was an outright inventory liquidation in the second quarter. As a result, inventories subtracted a full percentage point from GDP growth in the April-June quarter.

A third report showed the S&P CoreLogic Case-Shiller composite index of 20 metropolitan areas rose 6.3 percent in June on a year-over-year basis after increasing 6.5 percent in May. House prices are being driven by tight inventories.

The combination of higher house prices and rising mortgage rates is making the purchase of a home unaffordable for some Americans, especially as wage growth lags. That has hurt home sales, leading to a slowdown in the housing market.

“House prices will advance this year and next, albeit at a relatively modest pace compared with the last several years,” said Brent Campbell, an economist at Moody’s Analytics in West Chester, Pennsylvania.