By Caroline Valetkevitch
(Reuters) - The S&P 500 ended at its best level since July on Tuesday, helped by a big jump in energy shares and investor confidence that higher interest rates will not derail the economy.
The index finished below its best levels of the session, though, while the Nasdaq ended lower. Biotech shares dropped following disappointing news from several key companies including Biogen. The Nasdaq Biotech Index <.NBI> was down 2.5 percent, its biggest daily percentage decline since May 11.
Giving the S&P 500 its biggest boost, the S&P energy index <.SPNY> jumped 2.1 percent as oil prices reached 2016 highs due to supply constraints and a weak dollar. Exxon Mobil <XOM.N> gained 1.5 percent to $90.71.
Gains this week have once again put the S&P 500 within striking distance of record highs reached in May 2015. Comments from Fed Chair Janet Yellen on Monday seemed to ease some worries about the economy, while underscoring views the Fed may be in no rush to raise rates.
"The big story for the market right now is, do we break out to all-time highs," said Michael Sheldon, chief investment officer at Northstar Wealth Partners in West Hartford, Connecticut.
"If we do so in the near term, we could see a rush of money jump into the market from investors who had been sitting out on the sidelines, in fear missing out on further market gains."
The Dow Jones industrial average <.DJI> ended up 17.95 points, or 0.1 percent, to 17,938.28, and earlier broke above 18,000, while the S&P 500 <.SPX> gained 2.72 points, or 0.13 percent, to 2,112.13, its highest close since July 22.
The benchmark index now sits less than 19 points from its all-time closing high of 2130.82.
The Nasdaq Composite <.IXIC> dipped 6.96 points, or 0.14 percent, to 4,961.75.
Navistar International <NAV.N> shares jumped 19.6 percent to $14.54 after it posted a surprise second-quarter profit.
On the downside, the S&P 500 healthcare index <.SPXHC> dropped 0.7 percent, dragged down by Biogen <BIIB.O> and Alexion <ALXN.O>.
Biogen tumbled 12.8 percent to $252.86 after its multiple sclerosis drug failed in a mid-stage study.
Alexion dropped 10.9 percent to $138.13 after its drug failed a trial, while Valeant <VRX.N> slumped 14.6 percent to $24.64 after the drugmaker cut its full-year forecast.
About 6.4 billion shares changed hands on U.S. exchanges, below the 6.9 billion daily average for the past 20 trading days, according to Thomson Reuters data.
Advancing issues outnumbered declining ones on the NYSE by 1,896 to 1,136, for a 1.67-to-1 ratio on the upside; on the Nasdaq, 1,462 issues rose and 1,364 fell for a 1.07-to-1 ratio favoring advancers.
The S&P 500 posted 43 new 52-week highs and one new low; the Nasdaq recorded 82 new highs and 22 new lows.
(additional reporting by Yashaswini Swamynathan in Bengaluru; Editing by Nick Zieminski)