The Dow Jones Industrial Average rose on Friday, posting its first eight-day winning streak in more than a year, amid improving sentiment around U.S.-China trade relations.
The 30-stock index closed 37.07 points higher, or 0.1% at 27,219.52. The S&P 500 and Nasdaq Composite struggled, however. The S&P 500 slipped 0.1% to 3,007.39. The Nasdaq ended the day down 0.2% at 8,176.71.
The Dow finished Friday's session 0.7% below an intraday record high of 27,398.68. The S&P 500 was also within striking distance of its all-time high of 3,027.98.
Trade bellwethers Caterpillar and Boeing rose 1.5% and 1.1%, respectively. Those gains were slightly offset by a 1.9% drop in Apple. The tech giant's stock fell after an analyst at Goldman Sachs cut his price target on Apple to $165 per share from $187.
"If anybody had any doubt about what was moving markets, it's the trade war," said Brent Schutte, chief investment strategist for Northwestern Mutual Wealth Management.
Schutte pointed out that so-called defensive sectors, which have been in vogue recently amid trade and recession fears, have unwound this week. Two of those sectors, real estate and consumer staples, were down 3.5% and 0.9%, respectively.
Sentiment around the trade war improved after the New York Times reported Friday that China will exempt some U.S. agricultural products, including soybeans and pork, from additional tariffs.
On Thursday, the U.S. welcomed China's renewed purchases of American farm goods, with President Donald Trump saying it was expected Beijing would purchase "large amounts" of agricultural products. Trump also said he would consider an interim trade deal with China.
"This is quickly becoming the base-case assumption and thus it's unclear whether stocks will react favorably to any future headlines simply confirming the likelihood of such a scenario," said Adam Crisafulli, executive director at J.P. Morgan, in a note.
Trump's comments came after his decision to delay increasing tariffs on $250 billion worth of Chinese goods from Oct. 1 to Oct. 15 as a "gesture of good will" to China. The U.S. and China have imposed tariffs on billions of dollars' worth of one another's goods since the start of 2018, battering financial markets and souring business and consumer sentiment.
The upbeat sentiment around the trade war pushed the major indexes to their third straight weekly gain. The Dow rose 1.6% week to date while the S&P 500 and Nasdaq both rose about 0.9%.
It also led to a massive sell-off in U.S. sovereign bonds. The benchmark 10-year Treasury yield shot up more than 30 basis points this week, going to around 1.89% from 1.57% earlier in the week.
Bank stocks got a boost from the higher rates. Bank of America climbed nearly 9% week to date while Citigroup and J.P. Morgan Chase both gained more than 6%. The three banks also rose more than 1.5.% each on Friday.
On the data front, consumer sentiment for September topped expectations as consumers felt better about the economy. However, worries over the trade war increased.
—CNBC's Sam Meredith and Michael Bloom contributed to this report.