By Noel Randewich

(Reuters) - Wall Street edged lower on Wednesday as investors stewed about future interest rate hikes and cheaper oil dragged down energy shares, although Apple surged to its highest level this year.

Speculation about the timing of the Federal Reserve's next interest rate hike has shaken major stock indexes following contrasting comments from Fed officials.

The S&P 500 remains down almost 3 percent from before a steep selloff on Friday, even though interest rate futures indicate expectations for a rate hike at the Fed's Sept. 20-21 meeting are still low.

"What you're seeing is a little preview for what will happen when the Fed does raise rates," said Chris Zaccarelli, chief investment officer at Cornerstone Financial Partners. "People are starting to make changes to their portfolios."

Apple <AAPL.O> jumped 3.6 percent and briefly touched a 2016 high, with its market capitalization topping $600 billion for the first time since April, as Wall Street bet the technology company's newest iPhone would help shore up falling sales.

Its rally helped push the S&P 500 technology index <.SPLRCT> up 0.58 percent, making it the session's strongest sector.

Oil prices dropped 2 percent following data that showed large weekly builds in U.S. petroleum products, sending the S&P energy index <.SPNY> down 1.15 percent.

Exxon Mobil <XOM.N> declined 0.72 percent, the heaviest drag on the S&P 500.

After spending much of the day with gains, the Dow Jones industrial average <.DJI> ended down 0.18 percent at 18,034.77 points and the S&P 500 <.SPX> gave up 0.06 percent to 2,125.77.

The Nasdaq Composite <.IXIC> added 0.36 percent to 5,173.77.

Monsanto <MON.N> agreed to be bought by Bayer <BAYGn.DE>, but its stock rose just 0.62 percent to $106.76, well below the offer of $128 per share, due to concerns about regulatory approvals.

Vitae Pharmaceuticals <VTAE.O> shares more than doubled to $20.85 after Allergan <AGN.N> said it would buy the company for $639 million. Allergan rose 1.78 percent.

Ford <F.N> fell 1.94 percent after the automaker said 2017 financial performance would decline from this year's levels.

Declining issues outnumbered advancing ones on the NYSE by a 1.11-to-1 ratio; on Nasdaq, a 1.03-to-1 ratio favored decliners.

The S&P 500 posted 1 new 52-week high and 3 new lows; the Nasdaq Composite recorded 45 new highs and 41 new lows.

About 7.0 billion shares changed hands on U.S. exchanges, above the 6.5 billion daily average for the past 20 trading days, according to Thomson Reuters data.

(Additional reporting by Yashaswini Swamynathan in Bengaluru; Editing by Meredith Mazzilli and Nick Zieminski)