The Fed is currently buying $85 billion a month in bonds to keep interest rates low and to encourage spending and hiring.
Among individual companies in the S&P 500, Advanced Micro Devices rose the most after news that it the company is making chips for two big gaming devices. Homebuilders, which are very sensitive to the outlook for interest rates, followed.
D.R. Horton rose $1.84, or 8.7 percent, to $22.89 and Lennar Group climbed $2.93, or 8.5 percent, to $37.49.
The housing market has benefited from low interest rates because they help make mortgages cheaper.
"The Bernanke qualifications have taken the interest rate risk off the table and now it's really about what will earnings say," said Jonathan Lewis, chief investment officer at Samson Capital Advisors.
Corporations began reporting earnings this week for the second quarter, which ended 11 days ago. S&P Capital IQ forecasts that companies in the S&P 500 will report average earnings growth of 3 percent from a year earlier.
The price of gold rose for a fourth straight day, climbing $32.50, or 2.6 percent, to $1,279.90 an ounce. Gold has rebounded this week after falling close to a three-year low. That helped mining stocks. Freeport-McMoRan Copper & Gold rose $1.29, or 4.7 percent, to $28.04. Newport Mining gained $1.42, or 5.3 percent, to $28.02.
In other commodity trading, oil fell back from a 16-month high, dropping $1.61, or 1.5 percent, to $104.91 a barrel.
Among stocks making big moves:
— Bridgepoint Education rose $2.53, or 20 percent, to $15.81, after the for-profit education company said its Ashford University had won accreditation. Bridgepoint, which also operates the University of the Rockies, struggled with accreditation problems for much of 2012.
—Microsoft rose 96 cents, or 2.7 percent, to $35.66, after the company announced a major reorganization. The world's largest software maker has been struggling with a steady decline in PC demand as people turn to tablets and other mobile devices.
— Rockwell Medical Technologies Inc. jumped 70 cents, or 18 percent, to $4.46, after the drug developer said an experimental treatment for kidney patients took a step toward winning approval.
— Celgene rose $8.82, or 7.1 percent, $133.90 after the Swiss drugmaker said its cancer drug Revlimid met its goals in a late-stage study.