The posted a marginal gain on Friday to end the week as chipmaker stocks rose. Gains were capped, however, as reports said President Donald Trump wants to move forward with tariffs on $200 billion in Chinese goods

The broad index gained just 0.03 percent to close at 2,904.98 as the Van Eck Vectors Semiconductor ETF (SMH) gained 1 percent. The ETF was led higher by Nvidia, which rose nearly 2 percent. Nvidia rose after Needham hiked its price target on the stock, noting the company's "dominance" in machine learning gives the stock more upside. Advanced Micro Devices also rose 6.5 percent.

Financials also pushed the S&P 500 slightly higher, gaining 0.7 percent as the benchmark 10-year note yield hit 3 percent for the first time since Aug. 2. Morgan Stanley shares rose nearly 1 percent, while Goldman Sachs and Bank of America gained 0.4 percent and 0.8 percent, respectively.

The Dow Jones Industrial Average closed 8.68 points higher at 26,154.67 while the Nasdaq Composite slipped 0.1 percent to 8,010.04.

Gains were kept in check, however, after Bloomberg News reported that Trump told aides to proceed with slapping tariffs on the $200 billion worth in Chinese goods. Reuters later matched Bloomberg's reporting.

The major indexes fell to their session lows on the news but stabilized heading into the close.

"Absent any bad news, the market wants to go higher," said Craig Birk, chief investment officer at Personal Capital. "I think investors are realizing that these trade negotiations are going to go on for a while. More and more you're seeing a muted reaction the individual pieces of news."

Boeing shares pared gains to close 1.2 percent higher, while Caterpillar erased its gains to end 0.4 percent lower. Boeing and Caterpillar are considered bellwethers for global trade given their large international exposure.