NEW YORK - The Dow Jones industrial average had its biggest surge in three years Thursday, rising sharply for a second day. The Federal Reserve set off the rally a day earlier by indicating that it was in no hurry to raise interest rates.

The gains were led by technology stocks as Oracle soared following better-than-expected earnings. Industrial and health care stocks also logged big gains. Even the energy sector advanced, despite another drop in the price of oil.

Fed Chair Janet Yellen said Wednesday that she foresaw no rate hike in the first quarter of 2015. The comments eased concerns that policymakers would start raising interest rates at a time when growth outside the United States appears to be flagging. They also helped investors look past worries about the impact of a slumping oil price and turmoil in Russia, where the currency has slumped.

"What we're seeing is a move back to fundamentals," said Karyn Cavanaugh, a senior market strategist at Voya Investment Management. "Earnings continue to be good. . . . The U.S. economy is continuing to do well."

The Standard & Poor's 500 index rose 48.34 points, or 2.4 percent, to 2,061.23. The Dow Jones industrial average gained 421.28 points, or 2.43 percent, to 17,778.15. The Nasdaq Composite gained 104.09 points, or 2.24 percent, to 4,748.40.

Oracle was the biggest gainer in the S&P 500 index after it reported earnings late Wednesday that beat the expectations of Wall Street analysts. The company said its software and cloud revenue grew 5 percent. The stock rose $4.19, or 10.2 percent, to $45.35. The company's advance helped push up the tech sector 3 percent.

The price of oil fell $2.36 to close at $54.11 a barrel, after rising as high as $58.71 in morning trading. Oil has plunged since June, when it peaked at $107 a barrel. Overproduction and weak demand are behind the fall in global oil prices. Brent crude, a benchmark for international oil, fell $1.91 to close at $59.27 in London.

The yield on the benchmark 10-year U.S. government Treasury note climbed to 2.21 percent from 2.14 percent a day earlier.

In currency trading, the euro fell to $1.2274 from $1.2329 the previous day. The dollar edged higher against the Japanese yen, climbing to 118.83 yen from 118.83 yen.

In metals trading, gold edged up 30 cents to $1,194.80 an ounce, silver was essentially unchanged at $15.93 an ounce and copper fell two cents to $2.85 a pound.

In other energy trading on the NYMEX, futures for wholesale gasoline fell 3.9 cents to close at $1.53 a gallon; heating oil fell seven cents to close at $1.94 a gallon; and natural gas fell six cents to close at $3.64 per 1,000 cubic feet.