The Fed's main tool for stimulating the economy, the federal funds rate is the interest rate banks charge one another for overnight loans. Keeping it at historic lows, as the Fed has done since 2008, is meant to stimulate spending by lowering interest rates on everything from mortgages to car and student loans.

Following the Fed's announcement, the Dow Jones industrial average (INDU) gained 83 points, or 0.7%, after shedding as much as 95 points earlier in the day. The S&P 500 (SPX) added 11 points, or 0.9%, after losing 7 points earlier.

The Nasdaq (COMP) continued to buck the trend, adding 32 points, or 1.1%. Software company CA (CA) and Apple (AAPL, Fortune 500) were among the biggest gainers on the tech-heavy index, thanks to better-than-expected earnings.

"Investors are definitely encouraged by the Fed's promise to remain accommodative for the next few years, but they're also wondering why the Fed is being so cautious since we've seen pretty good economic data recently," said Mark Lamkin, CEO of Lamkin Wealth Management.

In addition to keeping low rates, Fed chief Ben Bernanke also left the door wide open to additional stimulative policies, including a third round of bond purchases, a policy known as quantitative easing, or QE3.

During a press conference following the statement, Bernanke said "expanding the balance sheet certainly remains an option" for the Fed, and the central bank would consider it "very seriously if, in particular, progress towards full employment was -- continued or became more inadequate, or if inflation remained exceptionally low."

"The Fed is in a wait-and-see mode," noted Lamkin. "They saying they're encouraged by the signs, but not so encouraged that they're ready to take the economy and markets off the juice."

Late Tuesday, the iPhone and iPad maker reported a whopping quarterly profit of $13 billion -- the best quarter ever for a technology company. The company said sales for the quarter hit $46.3 billion, sending shares shooting up 6.2% Wednesday. The gains helped Apple surpass Exxon Mobil (XOM, Fortune 500) as the most valuable U.S. company.

Meanwhile, investors are also watching Greece's ongoing negotiations with representatives of private-sector creditors to reduce its debt burden. Officials are set to resume informal talks Thursday in Athens.

Greece is in desperate need of an agreement to receive additional bailout funds from the European Union and International Monetary Fund. Without these funds, the country may not be able to make a €14 billion debt payment that's due March 20.

U.S. stocks ended mostly in the red Tuesday, as investors waded through corporate results and awaited progress out of Greece.

The UK government reported a 0.2% decline in fourth-quarter gross domestic product, the broadest measure of economic activity, due to weakness in the production and construction sectors.

Meanwhile, Germany's Ifo index, a widely watched gauge of business confidence, rose in January, indicating that the German economy may be gathering steam. The positive report follows an auction of 30-year German bonds that drew strong demand.

Markets in Hong Kong and Shanghai were closed Wednesday for the Chinese New Year. Japan's Nikkei (N225) ended 1% higher.

The central bank said it expects the unemployment rate to fall to between 8.2% and 8.5% in 2012, an improvement over what it had predicted back in November.

But the Fed is also predicting the economy will grow between 2.2% and 2.7% this year, slightly slower than it had previously thought.

For that reason, most of the policymakers at the Fed think the federal funds rate should remain near zero for the foreseeable future.

Pending home sales for the month of December dropped by 3.5%, after rising 7.3% in the prior month. Economists were expecting sales to fall 3%.

Companies: Shares of Boeing (BA, Fortune 500) turned higher, as the airplane maker reported a jump in fourth-quarter profit and revenue. Earlier shares were down, as the company also issued a disappointing full-year earnings guidance.

Following the closing bell, Netflix (NFLX) said it began to add customers again last quarter, a sign that the company is recovering after a series of blunders damaged its sterling reputation with consumers and investors. Netflix also beat earnings and sales estimates for the corner, and shares rose 10% in after-hours trading.