NEW YORK (Reuters) - Wall Street ended the week with a lackluster session on Friday as investors were cautious ahead of a holiday weekend in which a fresh round of U.S. tariffs on Chinese imports were due to be levied.

While the S&P 500 .SPX registered its biggest weekly gain since June, August had its biggest monthly decline since May. Investors had fled risky assets in August due to escalations in the U.S.-China trade war and the inversion of a key part of the U.S. yield curve which is often a recessionary signal.

U.S. financial markets were due to stay closed on Monday for the Labor Day holiday and a new round of U.S. tariffs on some Chinese goods were expected to come into effect on Sunday. Trading volume was light as and the S&P swapping between negative and positive territory in the afternoon to end the day with little progress.

“People are becoming more defensive going into the weekend because we have three days where we can’t react to news and it’s three days that have a lot of uncertainty associated with them because of the tariffs,” said Robert Phipps, a director at Per Stirling Capital Management in Austin, Texas.

“Right now everything is evolving around the trade complex and probably will for the remainder of this year,” he said.

The United States and China had given hopeful signs on trade on Thursday as they discussed the next round of in-person negotiations in September.

But Randy Frederick, vice president of trading and derivatives for Charles Schwab in Austin, urged caution saying: “Frankly, markets have been overly optimistic about trade.”

The Dow Jones Industrial Average .DJI rose 41.03 points, or 0.16%, to 26,403.28, the S&P 500 .SPX gained 1.88 points, or 0.06%, to 2,926.46 and the Nasdaq Composite .IXIC dropped 10.51 points, or 0.13%, to 7,962.88.

Since bonds have recently outperformed stocks, investors may have taken early action to rebalance their portfolios for the end of the month due to the long weekend, according to Vinay Pande, head of trading strategies at UBS Global Wealth Management in New York.

U.S. consumer spending increased solidly in July as households bought a range of goods and services. While this could allay financial market fears of a recession, a survey from the University of Michigan, also out Friday, showed its consumer sentiment index in August dropping by the most since December 2012, amid nerves over the U.S.-China trade war.

“The news today has been mixed. There was positive news about consumption data and negative news on consumer confidence,” said Pande.

The Consumer Discretionary sector .SPLRCD was the S&P's biggest drag as Ulta Beauty Inc ULTA.O, which had been the S&P's top performing stock in Wall Street's decade-old bull market, tumbled 29.6% after the cosmetics company cut its full-year profit forecast.

One of the biggest percentage gainers on the benchmark index was Campbell Soup Co CPB.N, which jumped 3.9% after its quarterly profit beat estimates.

Advancing issues outnumbered declining ones on the NYSE by a 1.38-to-1 ratio; on Nasdaq, a 1.05-to-1 ratio favored advancers.

The S&P 500 posted 36 new 52-week highs and no new lows; the Nasdaq Composite recorded 37 new highs and 62 new lows.

Volume on U.S. exchanges was 5.77 billion shares, compared with the 7.13 billion average for the last 20 trading days.