NEW YORK (Reuters) - Wall Street edged higher on Wednesday after stumbling out of the starting gate on the first trading day of 2019, while fears of a global economic slowdown were exacerbated after Apple cut its holiday-quarter revenue forecast.

Apple AAPL.O dropped 8 percent in extended trading late in the day after the iPhone maker slashed its outlook for the December quarter, blaming weak demand in China.

Shares of Apple's suppliers also fell, and S&P 500 futures ESv1 dropped 1.3 percent, signaling that Wednesday's modest advance could unwind when the market reopens on Thursday.

“To see Apple’s sales drop off this much says something about the Chinese economy,” said Tim Ghriskey, chief investment strategist at Inverness Counsel in New York. “Any company that does business in China will feel the impact of this.”

Stocks had started the session lower after separate reports showed a deceleration in factory activity in China and the euro zone, indicating the ongoing trade dispute between the United States and China was taking a toll on global manufacturing.

Energy .SPNY stocks led the S&P 500's advance and the sector was the index's biggest percentage gainer, buoyed by a 2.4 percent jump in crude prices. The group was the worst performing S&P sector in 2018.

Gains were offset by healthcare .SPXHC and so-called defensive sectors, such as real estate .SPLRCR, utilities .SPLRCU and consumer staples .SPLRCS. Healthcare companies provided the biggest drag on the S&P 500 and the Dow.

The Dow Jones Industrial Average .DJI rose 18.78 points, or 0.08 percent, to 23,346.24, the S&P 500 .SPX gained 3.18 points, or 0.13 percent, to 2,510.03 and the Nasdaq Composite .IXIC added 30.66 points, or 0.46 percent, to 6,665.94.

Of the 11 major sectors in the S&P 500, seven closed in positive territory.

Banks got a boost from Barclays, as the broker wrote in a research note that the sector could outperform the S&P this year. The Dow Jones Industrial average was led higher with gains from Goldman Sachs GS.N and JPMorgan JPM.N.

Tesla Inc TSLA.O delivered fewer-than-expected Model 3 sedans in the fourth quarter and cut U.S. prices. The electric automaker's shares slid 6.8 percent.

General Electric Co GE.N jumped 6.3 percent in heavy trading as bargain hunters bought the stock in the wake of its over 50-percent plunge in 2018.

In the coming weeks, the fourth-quarter reporting period will get underway. Analysts see S&P 500 companies posting profit gains of 15.8 percent, significantly smaller than the third quarter’s 28.4 percent advance.

Slideshow ( 7 images )

Advancing issues outnumbered declining ones on the NYSE by a 2.10-to-1 ratio; on Nasdaq, a 2.42-to-1 ratio favored advancers.

The S&P 500 posted no new 52-week highs and 4 new lows; the Nasdaq Composite recorded 9 new highs and 58 new lows.

Volume on U.S. exchanges was 7.80 billion shares, compared to the 9.18 billion average for the full session over the last 20 trading days.