The major domestic equity indexes closed out the trading day on Friday, well in to positive territory, with the S&P 500 and the Dow Jones Industrial Average extending gains and the Nasdaq turning positive on reports of progress in tariff disputes between the United States and its trading partners China and Mexico.

Chinese and U.S. negotiators are planning talks to resolve their trade row ahead of meetings in November, the Wall Street Journal reported on Friday. Additionally, Mexico’s economy minister, Ildefonso Guajardo, said he hopes to wrap up outstanding bilateral issues on the North American Free Trade Agreement (NAFTA) by the middle of next week.

Trade-vulnerable industrial stocks led advances by the S&P 500 and the Dow, with the S&P 500 industrial sector gaining 0.6 percent. The sector was led higher by a 2.3 percent rise in Caterpillar.

For the week, the S&P and the Dow posted weekly gains, but the Nasdaq showed a loss for the same period.

Following bleak forecasts, shares of Nvidia and Applied Materials fell 4.9 percent and 7.7 percent, respectively, pushing the Philadelphia Semiconductor index 0.7 percent into negative territory.

Among the so-called FAANG group of momentum stocks, all but Apple fell. Apple gained 2.0 percent to an all-time closing high.

Netflix posted its sixth consecutive loss. In addition to Apple and Netflix, the FAANG group includes Facebook, Amazon and Alphabet.

Shares of Tesla fell 8.9 percent, their worst day in over two years after Chief Executive Elon Musk’s interview with the New York Times and a UBS note saying the company could lose $6,000 on every base Model 3 sedan due to powertrain costs.

Second-quarter earnings season is approaching the finish line. Of the 467 companies in the S&P 500 that have reported, 79.2 percent have exceeded consensus estimates, according to Thomson Reuters I/B/E/S.

Bucking the otherwise downbeat department store earnings trend, shares of Nordstrom rose 13.2 percent after posting better-than-expected same-store sales and raising its earnings forecast.

Deere rose 2.4 percent after quarterly results missed analysts’ estimates due to higher raw materials and freight costs.

Approximately 6.06 billion shares changed hands on the major domestic equity exchanges, as compared to the 6.53 billion average over the past 20 trading days.

Crude Price Rise

Crude prices were higher on Friday but declined on the week over worries that oversupply would weigh on the U.S. market, while trade disputes and slowing global economic growth would dampen the demand for crude.

Domestic crude declined for the seventh consecutive week, and global benchmark Brent was dropped for a third week.

Brent futures settled up 40 cents, or 0.6 percent, at $71.83 a barrel, after touching a high of $72.49 earlier in the session. West Texas Intermediate rose 45 cents, or 0.7 percent, to $65.91, after touching a session high of $66.39. For the week, Brent was down 1.4 percent and WTI fell 2.6 percent.

Falling prices have weighed on funds with oil exposure. Two of the world’s largest energy-focused hedge funds, Andurand Capital and BBL Commodities, suffered double-digit percentage losses in July as oil prices declined by the most in two years, according to Reuters.

Money managers cut their net long domestic crude futures and options positions to the lowest in nearly two months for the week of Aug. 14, the Commodity Futures Trading Commission (CFTC) said.

Friday’s pull back from session highs came on mounting worries another consecutive gain of domestic crude inventories. Government data indicated a large build up in crude inventories this week, with production also increasing.

The number of domestic drilling rigs, an indicator of future production, was unchanged this week at 869 rigs, a considerably higher number than the 763 rigs operating a year ago, according to energy company Baker Hughes.

Another major drag on prices was the darkening economic outlook on trade tensions between the United States and China. The result is a weakening of emerging market currencies, which in turn are weighing on growth and fuel consumption.

MUFG Bank, Japan’s largest, said that the weakening Turkish lira will constrain further growth in gasoline and diesel demand this year.

Furthermore, just as demand seems to be slowing, supply looks to be rising, increasing the drag on markets.

Despite the bearish factors, analysts said prices were prevented from falling further because of U.S. sanctions against Iran, which target the financial sector from August and will include petroleum exports from November.