Stocks rose Wednesday and the Nasdaq saw its best percentage gain for 2012 a day after Apple's blowout results further lifted optimism about the strength of earnings.
Pushing the S&P 500 to its session high in afternoon trade, Federal Reserve Chairman Ben Bernanke said the Fed stands ready to act if further economic help is needed.
Earlier, the Fed repeated its promise to leave interest rates on hold until at least late 2014.
Shares of Apple, which has the world's biggest market capitalization, jumped some 9 percent and accounted for about 28 percent of day's S&P 500's gain, according to Standard & Poor's. The stock hit a session high at $618.
The results boosted S&P 500 companies' earnings growth to an estimated 6.9 percent for the first quarter, up from an estimate of 4.6 percent before Apple.
Apple's stock had sold off recently, partly on fears that its earnings could disappoint.
"The (Fed) statement and the market's reaction were both as expected," said Erik Davidson, deputy chief investment officer of Wells Fargo Private Bank in San Francisco.
"Apple ... is having a big impact on the market and really pulling up the Nasdaq because of how big it is."
The earnings season so far has been stronger than expected. With 200 of the S&P 500 companies reporting, three-fourths have topped estimates, according to Thomson Reuters data.
Boeing Co posted higher quarterly profit, helped by increased commercial aircraft sales, and raised its earnings forecast for the year. Boeing's stock shot up, giving the Dow its biggest lift.
On the down side, Caterpillar Inc shares dropped after it said profit rose 29 percent. But the heavy equipment maker stoked Wall Street's fears about emerging markets by repeatedly citing slowdowns in economic growth in China and Brazil.
In a troubling sign, March durable goods orders fell 4.2 percent in the biggest drop in three years. The report was the latest to show softness in U.S. economic data.
Reuters contributed to this report.