U.S. equities edged higher for the day but down for the week after President Trump said he was “very close” to a trade pact with China, even as he warned that Beijing wanted a deal more than he did.

Automakers, an industry particularly sensitive to trade, led advances after Trump’s comments in an interview on Fox News. Bitcoin tumbled to a six-month low, and the dollar gained. All three major indexes posted losses, and it was the S&P 500’s first weekly loss since early October.

It was a mixed picture on the trade front this week, suppressing volatility and keeping stocks in a tight range within 1 percent of a record high. Chinese Vice Premier Liu He has invited U.S. Trade Representative Robert E. Lighthizer to Beijing for further talks later this month, according to people familiar with the matter.

Trump suggested Friday that he might veto legislation designed to support pro-democracy protesters in Hong Kong — despite its near-unanimous support in the House and Senate — to pave the way for a trade deal with China.

“Stocks’ short-term direction is still all about trade,” said Alec Young, managing director of global markets research at FTSE Russell. “Given precious little substance of late on that front, it’s no surprise stocks are stuck in a tight trading range with volatility at multi-month lows.”