Markets ended mostly higher, with the Dow and the S&P 500 posting small gains after paring early losses amid renewed hopes of possible trade talks between the United States and China. However, the Nasdaq failed to add to recent gains following a decline in shares of Apple after the company’s u new product line failed to boost the stock. The Dow Jones Industrial Average (DJI) rose 0.1%, to close at 25,998.92. The S&P 500 advanced less than 0.1% to close at 2,888.92. However, the Nasdaq Composite Index closed at 7,954.23, declining 0.2%. A total of 7.1 billion shares were traded on Wednesday, higher than the last 20-session average of 6.2 billion shares. Advancers outnumbered decliners on the NYSE by a 1.35-to-1 ratio. On Nasdaq, a 1.12-to-1 ratio favored declining issues.How did the Benchmark Perform?The Dow advanced 27.86 points, with The Boeing Company BA and Caterpillar, Inc. CAT contributing to the rally. Shares of Boeing and Caterpillar gained 2.4% and 1.6%, respectively. However, hares of 3M Company MMM took a hit, plummeting 2.4%. Boeing has a Zacks Rank #3 (Hold). You can see the complete list of today’s Zacks #1 Rank (Strong Buy) stocks here.The S&P 500 added 1.03 points, helped by consumer staples. The Consumer Staples Select Sector SPDR (XLP) gained 1.2%. However, the Technology Select Sector SPDR (XLK) shed 0.4%. The tech heavy Nasdaq gave up 18.24 points, with tech giants taking a hit. Shares of Apple, Inc. AAPL declined 1.3%, while Facebook, Inc. FB fell 2.4%.U.S.-China Possible Trade Talks Raise HopesTrade war fears have been rattling markets for a while now. However, on Wednesday investors’ confidence got a boost on news of the United States planning to initiate fresh round of talks with China. Reportedly, the United States has reached out to China in order to start a new round of talks, as it prepares to go ahead with tariffs on $200 billion worth of Chinese goods.Trade tensions between the United States and China have been on the rise till Tuesday. Last Friday President Donald Trump had said that he was ready to move forward with additional tariffs on $267 billion worth of Chinese goods. Wednesday’s news definitely helped lift investors’ confidence, resulting in a rally in trade sensitive stocks like Boeing and Caterpillar.Apple, Chipmakers Take a Toll on MarketsOn Wednesday, Apple unveiled its new line of products. The company rolled out iPhone XS and XS Max with extended battery life. Apple also unveiled a special model equipped dual-Sim slots, exclusively for the China market. Apple has been trying to stay competitive in the China market and the special model with dual Sim is a proof of that. Only last week, the company had said that some of its products could get affected because of tariffs. However, the new products failed to impress investors much, resulting in its shares to decline.It wasn’t only Apple but chipmakers too suffered on Wednesday, with shares of semiconductor companies taking a hit. Semiconductor stocks have been under pressure lately, as concerns over slowing memory-chip demand continue to rise. Shares of Micron Technology, Inc. MU declined 4.3%, while Lam Research Corporation LRCX and Applied Materials, Inc. AMAT lost 3.2% and 2%, respectively.Stocks That Made HeadlinesHershey's Pirate Brands Buyout to Bolster Snacking BusinessMoving ahead with expansion in the snacking category, The Hershey Company HSY inked a deal to buy Pirate Brands from B&G Foods, Inc. BGS. (Read More)Southwest Posts Drop in August Load Factor, Tweaks Q3 ViewSouthwest Airlines Co. LUV reported a rise in traffic for August. Traffic inched up 1.3% to around 11.42 billion. (Read More)Today's Stocks from Zacks' Hottest StrategiesIt's hard to believe, even for us at Zacks. But while the market gained +21.9% in 2017, our top stock-picking screens have returned +115.0%, +109.3%, +104.9%, +98.6%, and +67.1%.And this outperformance has not just been a recent phenomenon. Over the years it has been remarkably consistent. From 2000 - 2017, the composite yearly average gain for these strategies has beaten the market more than 19X over. Maybe even more remarkable is the fact that we're willing to share their latest stocks with you without cost or obligation.See Them Free>>Want the latest recommendations from Zacks Investment Research? Today, you can download 7 Best Stocks for the Next 30 Days. Click to get this free report Southwest Airlines Co. (LUV): Free Stock Analysis Report Facebook, Inc. (FB): Free Stock Analysis Report The Boeing Company (BA): Free Stock Analysis Report Apple Inc. (AAPL): Free Stock Analysis Report 3M Company (MMM): Free Stock Analysis Report Hershey Company (The) (HSY): Free Stock Analysis Report B&G Foods, Inc. (BGS): Free Stock Analysis Report Caterpillar Inc. (CAT): Free Stock Analysis Report Micron Technology, Inc. (MU): Free Stock Analysis Report Applied Materials, Inc. (AMAT): Free Stock Analysis Report Lam Research Corporation (LRCX): Free Stock Analysis Report To read this article on Zacks.com click here. Zacks Investment Research