* Fed on track to raise rates sometime next year
* Energy shares lead gains on S&P 500
* Indexes up: Dow 1.7 pct, S&P 2 pct, Nasdaq 2.1 pct (Updates close with Oracle up after the bell)
By Caroline Valetkevitch
NEW YORK, Dec 17 (Reuters) - The S&P 500 scored its best day since October 2013 on Wednesday as the Federal Reserve gave an upbeat assessment of the U.S. economy and said it would take a patient approach toward raising interest rates.
The rally, which followed a three-day losing streak, was also driven by a 4.2 percent gain in the S&P energy index .
Following a two-day meeting, the U.S. central bank gave a strong signal that it was on track to raise interest rates sometime next year.
The Fed said it would take a "patient" approach in deciding when to bump borrowing costs higher, which Fed Chair Janet Yellen, at a news conference, defined as "at least a couple of meetings."
The statement from the Fed, which has kept benchmark rates near zero since 2008, came against a backdrop of solid domestic economic growth but trouble overseas.
"This is the market saying, 'Ah, I get it,' the Fed does not want to be in the business of disruption, this is a steady monetary policy and the Fed will continue to be supportive of asset prices," said Scott Clemons, chief investment strategist at Brown Brothers Harriman Private Banking in New York.
In other comments, Yellen said it was not a major concern that some banks may be leveraged and exposed to oil price moves. U.S. and Brent oil are down roughly 50 percent since June.
The Dow Jones industrial average rose 288 points, or 1.69 percent, to 17,356.87, while the S&P 500 gained 40.15 points, or 2.04 percent - its biggest daily percentage rise since October 2013 - to 2,012.89. The Nasdaq Composite added 96.48 points, or 2.12 percent, to 4,644.31.
All 10 S&P sectors ended higher, with all but the industrials sector up at least 1 percent.
Shares of Exxon Mobil jumped 3 percent to $89.02, while Chevron gained 4.2 percent to $106.02. Energy shares have fallen sharply with the recent heavy selloff in oil prices.
Shares of the Herzfeld Caribbean Basin Fund, a closed-end mutual fund listed on Nasdaq, hit a seven-year high as President Barack Obama announced a move to normalize relations between the United States and Cuba.
The fund, which holds stocks and assets that fund manager Thomas Herzfeld believes would benefit from an eventual end to the U.S. economic embargo against Cuba, rose 28.9 percent.
After the bell, shares of Oracle jumped 4.7 percent to $43.11 as the company posted a 3.5 percent rise in total revenue in the company's first quarter since Larry Ellison stepped down as chief executive.
About 9.4 billion shares changed hands on U.S. exchanges, above the 7.3 billion average this month, according to BATS Global Markets.
NYSE advancing issues outnumbered decliners 2,777 to 353, for a 7.87-to-1 ratio; on the Nasdaq, 2,214 issues rose and 545 fell for a 4.06-to-1 ratio. (Additional reporting by Herbert Lash; Editing by Nick Zieminski, Peter Galloway and Diane Craft)