The S&P 500 index ended the last trading day of the month flat, while the Dow Jones Industrial Average edged down, and the Nasdaq closed higher in light trading on Friday as Canada and the United States concluded trade talks without resolution ahead of the Labor Day weekend.

Capping a low-volume, late-summer week marked by tariff-related volatility, all three major equity indexes posted net gains for the period. The indexes were also up for the month of August, with the Nasdaq posting its largest monthly gain since January.

Talks between Canada and the United States to renegotiate the North American Free Trade Agreement (NAFTA) ended on a sour note as the two sides were unable to reach a deal, according to the Wall Street Journal.

In recent days trade jitters abated as Mexico and the United States were able to reach a bilateral deal. However, those jitters re-emerged later in the week following a report that Trump is prepared to impose tariffs on an additional $200 billion of Chinese imports as soon as next week.

Amazon. continued to inch upward, rising 0.5 percent as investors watch the company close in on its $1 trillion market share milestone.

Apple ended the trading day up 1.2 percent, reaching a new closing high for the fifth straight session.

Of the 11 major sectors in the S&P 500, five ended the day lower.

Coca-Cola agreed to buy the coffee chain Costa from Britain’s Whitbread for $5.1 billion. Its shares fell 0.8 percent.

Tesla had a fifth consecutive decline following news that fund manager BlackRock voted in favor of replacing Elon Musk with an independent chairman.

American Outdoor Brands was the top percentage gainer on the Nasdaq. The stock soared 43.6 percent after its upbeat earnings report. Sturm Ruger also gained ground, ending the day up 7.3 percent.

Chipotle extended its loss, falling 1.8 percent after William Ackman’s Pershing Square cut its stake in the company.

Ford fell 2.3 percent after scrapping a plan to sell a Chinese-made small vehicle in the United States due to tariff concerns.

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