The US trade deficit in goods narrowed in June amid a broad decline in imports, but the improvement was probably insufficient to prevent trade from again subtracting from economic growth in the second quarter. The report from the Commerce Department on Tuesday also showed exports dropping to a five-month low, pulled down by a sharp decline in shipments of industrial supplies, which include petroleum. The decrease likely reflected a pullback in crude oil prices amid a fragile ceasefire between the US and Iran. With businesses ramping up investment in artificial intelligence and consumer spending resilient, last month's drop in imports could be temporary. The AI build-out is reliant on imports. The government on Monday reported a strong increase in orders and shipments for non-defense capital goods in June."Our model mapping the trade data onto the national accounts now points to net trade subtracting around one percentage point from second-quarter GDP growth," said Oliver Allen, senior US economist at Pantheon Macroeconomics. The goods trade gap contracted 4.2% to $101.5bn last month, the Commerce Department's Census Bureau said. Economists polled by Reuters had forecast the goods deficit at $100.0bn. The goods trade deficit average for the three months through June remained wider than the first-quarter average.Goods imports decreased $8.2bn to $306.2bn. They increased 16.6% on a year-on-year basis in June. The decline in monthly imports likely reflected the fading boost from businesses rushing to restock to avoid shortages and higher prices due to the Middle East conflict. Consumer goods imports led the decline, with a 3.8% drop. Imports of capital goods fell 2.0%, but surged 37.4% year-on-year. Food imports decreased 2.5%, while those of automotive vehicles dropped 2.5%. Industrial supplies imports fell 1.9%, likely reflecting lower oil prices. Exports of goods fell $3.8bn to $204.7bn last month. Exports of industrial supplies tumbled 4.4%, also likely a function of lower crude prices. Food exports dropped 3.1%, while shipments of capital goods fell 1.1%. But exports of automotive vehicles jumped 5.1% and those of consumer goods increased 3.2%. The government is scheduled to publish its advance estimate of second-quarter gross domestic product growth on Thursday. A Reuters survey of economists estimates the economy grew at a 2.1% annualized rate last quarter, which would match the first quarter's pace. Trade has subtracted from GDP for two straight quarters. Stocks on Wall Street were higher. The dollar was lower versus a basket of currencies. US Treasury yields fell. Some of the anticipated drag from trade could be offset by robust business investment in equipment and an expected pickup in consumer spending. Inventories, which have been drawn down for four straight quarters, remain a wild card.The Census Bureau report showed wholesale inventories increased 0.3% in June, matching May's gain. Stocks at retailers were unchanged after rising 0.5% in May, though inventories at motor vehicle and parts dealers increased 0.4%. Excluding motor vehicles and parts, retail inventories fell 0.2%. This component goes into the calculation of GDP. Other news on the economy on Tuesday was downbeat. A separate report from the Conference Board showed its consumer confidence index slipped to 90.8 this month from 92.2 in June, confounding economists' expectations for a rise to 92.3. Though the ebb in confidence largely reflected continued labor market pessimism, the Middle East conflict, entering its sixth month, continues to dampen household spirits. Confidence waned among respondents identifying as Independents and Democrats, with Republicans somewhat more optimistic."Consumers' write-in responses on factors affecting the economy continued to be mostly pessimistic in July," said Dana Peterson, chief economist at the Conference Board. "Comments about food and grocery prices increased. Notably, references to jobs and unemployment picked up slightly." The share of consumers viewing jobs as "plentiful" dropped to the lowest level since February 2021. There was a dip in the proportion saying jobs were "hard to get."Still, the survey's so-called labor market differential, derived from data on respondents' views on whether jobs are "plentiful" or "hard to get," narrowed to 3.1 in July from 3.8 last month. This measure correlates to the unemployment rate in the Labor Department's monthly employment report."Whatever hopes that the public had for change in Washington after the elections in November 2024 have now been replaced by the same old concerns about the future as a result of inflation's higher prices and the ongoing affordability crisis," said Christopher Rupkey, chief economist at FWDBONDS. "The latest reading does not herald a pullback or downturn in the economy, but economic growth is likely to remain moderate. "The affordability crisis was underscored by a third report from the Federal Housing Finance Agency showing single-family house prices increased 2.2% year-on-year in May after rising 2.0% in April. Rising house prices are combining with higher mortgage rates to push homeownership out of the reach of most young adults. The average rate on the popular 30-year fixed-rate mortgage has increased by 60 basis points since the US and Israel attacked Iran at the end of February. It averaged an 11-month high of 6.58% last week, data from mortgage finance agency Freddie Mac showed."Affordability and demand are still challenged," said Michael Gapen, chief economist at Morgan Stanley. "Housing activity is bouncing along the bottoms. Given we do not expect much more support to affordability through the price channel, we likely need lower rates to spark demand."