Following the strong upward move seen over the two previous sessions, stocks showed a lack of direction throughout the trading day on Friday. The major averages spent the session bouncing back and forth across the unchanged line before closing mixed. The Dow held on to a modest gain, inching up 37.07 points or 0.1 percent to 27,219.52, its best closing level in over a month, but the Nasdaq dipped 17.75 points or 0.2 percent to 8,176.71 and the S&P 500 edged down 2.18 points or 0.1 percent to 3,007.39. Despite the mixed performance on the day, the major averages all moved to the upside for the week. The Dow jumped by 1.6 percent, while the S&P 500 and the Nasdaq advanced by 1 percent and 0.9 percent, respectively. The choppy trading on Wall Street came as the major averages encountered some resistance as they climbed back within striking distance of the record highs set in July. Signs of easing trade tensions between the U.S. and China and upbeat economic data generated some positive sentiment, but traders seemed wary of pushing stocks to new highs amid lingering uncertainty. On the trade front, China's Ministry of Commerce revealed plans to exempt U.S. agricultural products, including soybeans and pork, from additional tariffs. China will add the agricultural products to a list of 16 types of American-made products granted tariff exemptions as a sign of goodwill ahead of the next round of trade talks. The Commerce Ministry also said it welcomes President Donald Trump's move to temporarily delay raising the rate of tariffs on $250 billion worth of Chinese imports. Meanwhile, Trump said he would think about an interim deal with China but would prefer a full agreement as the world's two largest economies look to end the widening trade war. "If we're going to do the deal, let's get it done," Trump told reporters on Thursday. "A lot of people are talking about it, I see a lot of analysts are saying an interim deal — meaning we'll do pieces of it, the easy ones first." "But there's no easy or hard. There's a deal or there's not a deal," he added. "But it's something we would consider, I guess." In U.S. economic news, the Commerce Department released a report showing U.S. retail sales increased by more than expected in August amid a jump in auto sales. The Commerce Department said retail sales rose by 0.4 percent in August after climbing by an upwardly revised 0.8 percent in July. Economists had expected retail sales to rise by 0.2 percent compared to the 0.7 percent increase originally reported for the previous month. The stronger than expected retail sales growth came as sales by motor vehicle and parts dealers spiked by 1.8 percent in August after inching up by 0.1 percent in July. However, Andrew Hunter, Senior U.S. Economist at Capital Economics, called the jump in auto sales "suspicious looking," noting the surge in the nominal value of motor vehicle sales is "hard to square" with the 0.7 percent increase in the unit sales reported by manufacturers. Excluding the jump in auto sales, retail sales came in unchanged in August after surging up by 1.0 percent in July. Ex-auto sales had been expected to inch up by 0.1 percent. A separate report from the University of Michigan showed U.S. consumer sentiment has rebounded by more than expected in the month of September. Most of the major sectors ended the day showing only modest moves, contributing to the lackluster close by the broader markets. Tobacco stocks showed a significant move to the downside, however, with the NYSE Arca Tobacco Index tumbling by 2 percent. Considerable weakness also emerged among gold stocks, as reflected by the 2 percent slump by the NYSE Arca Gold Bugs Index. The weakness among gold stocks came amid a decrease by the price of the precious metal, with gold for December delivery sliding $7.90 to $1,499.50 an ounce. Telecom and networking stocks also saw notable weakness on the day, while energy, banking and chemical stocks showed strong moves to the upside. Looking ahead, the Federal Reserve is likely to be in the spotlight next week, with the central bank widely expected to announce another interest rate cut following a two-day meeting ending on Wednesday. The monetary policy decision may overshadow reports on industrial production, housing starts, existing home sales and regional manufacturing activity.