NEW YORK (TheStreet) -- U.S. stocks were higher on Wednesday, though remained on track for their worst quarter in four years. 

The S&P 500 was up 1.4%, and the Nasdaq added 1.8%. The Dow Jones Industrial Average climbed 1.1% but was on track for its third straight quarter of losses. The last time the Dow suffered a three-quarter stretch of losses was more than six years ago near the end of the "Great Recession."

Major benchmark indexes were on track for quarterly losses of around 9% after facing a range of worries over the past three months. Prime among them, China's devaluation of the yuan and further signs of a slowdown in the world's second-largest economy that rocked markets since August. The performance is its worst since the third quarter of 2011 when the S&P 500 lost 14% as a Europe's debt crisis crushed global markets.

A dour environment for equities could continue in the final three months of the year, according to James Abate, chief investment officer of Centre Funds. 

"When we look forward, essentially we see a soft economic backdrop continuing to put pressure on margins which is why we still think that the market is vulnerable to further corrective action as we move into the fourth quarter," Abate told TheStreet.

Crude oil prices closed 24% lower for the quarter after commodity prices took a hit on signs of a slowdown in China, the world's second-largest energy consumer. Over the month, oil has lost 8.4% to settle just above $45 a barrel. West Texas Intermediate crude oil fell 0.3% on Wednesday after the Energy Information Administration reported a gain of 4 million barrels in weekly inventories, the first increase in three weeks. 

The Nasdaq enjoyed its best daily gain in three weeks as the tech sector rallied. Among the best performers, Google(GOOGL) - Get Report , Apple(AAPL) - Get Report , Amazon(AMZN) - Get Report , and Intel(INTC) - Get Report  were all higher. The Technology SPDR ETF (XLK) - Get Report climbed 1.6%.

Consumer goods stocks were also sharply higher. Netflix(NFLX) - Get Report , Toyota(TM) - Get Report , Disney(DIS) - Get Report , Comcast(CMCSA) - Get Report and Home Depot(HD) - Get Report  each climbed, while the Consumer Discretionary SPDR ETF (XLY) - Get Report added 2.1%.

Manufacturing activity in Chicago fell sharply in September to its weakest reading since May. Chicago PMI fell to 48.7 over the month from 54.4 in August. Economists had expected a slight decline to 53. Chicago manufacturing has a strong correlation with the national ISM index which monitors the overall U.S. manufacturing sector.

The U.S. economy added 200,000 private sector jobs in September, above expectations for an increase of 190,000. However, August's job gains were revised down to 186,000 from 190,000, according to the ADP jobs report. The official jobs report from the Labor Department will be released on Friday. 

Twitter(TWTR) - Get Report shares spiked 2% on reports co-founder Jack Dorsey will assume the position of permanent CEO after acting as interim chief since June, according to Re/code. Former CEO Dick Costolo stepped down in early June. 

Costco(COST) - Get Report  was flat after the bulk retailer beat quarterly profit estimates and reported strong comparable-store sales. Sales in the U.S. rose 2%, or 6% excluding gas and foreign exchange, over the fourth quarter. Domestic strength offset weakness in Canada and other international markets.

Ralph Lauren(RL) - Get Report climbed 12.5% after its namesake CEO and founder announced he was stepping down as chief executive. Gap's(GPS) - Get Report president of Old Navy, Stefan Larsson, will assume the role of CEO.

Western Digital(WDC) - Get Report added 14% after China's Unisplendour agreed to take a 15% stake in the company in a purchase worth $3.8 billion. The deal values Western Digital shares at $92.50, a massive premium to the $69.37 closing price on Tuesday.

Advance Auto Parts(AAP) - Get Report rose 11% after hedge fund Starboard Value disclosed a 3.7% ownership stake. The firm said the auto retailer's share price could surge to $350, more than double Advance Auto Parts' Tuesday close. Starboard's stake makes it the sixth-largest shareholder.

Comsore(SCOR) - Get Report jumped more than 8% after agreeing to acquire audience measurement firm Rentrak (RENT) in an all-stock deal worth $732 million. The acquisition comes as both companies attempt to better evaluate what consumers are watching and how in order to effectively target advertising.