Stocks eke out gains after Bernanke speech; Yahoo spikes 10%

Stocks squeezed out modest gains in choppy trading Wednesday, following comments from Fed Chairman Ben Bernanke that monetary policy will remain highly accommodative even as the central bank could start to scale back its bond buying later this year.

(Read More: After-hours buzz: Intel, IBM, American Express & more)

"U.S. equities have recouped their Spring swoon as a litany of Fed governors' pronouncements have on balance calmed fears QE tapering might begin before the U.S. recovery is strong enough to handle it," according to Alec Young, global equity strategist at S&P Capital IQ. "This more dovish Fed perception, coupled with a recent softening in economic news flow has hit bond yields and the greenback, while emerging market stocks have finally caught a bid—outperforming the S&P by 2.6 percent since July 10—as carry trade unwinding has eased. Turning back to the U.S., second-quarter beats will now need to take the lead in fueling stocks, as we think a more dovish Fed is now priced into a very overbought market."

S&P 500

The Dow Jones Industrial Average edged up 18.67 points to close at 15,470.52, led by DuPont and Bank of America.

The S&P 500 rose 4.65 points to end at 1,680.91. And the Nasdaq added 11.50 points to finish at 3,610. The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, ended below 14.

Most key S&P sectors ended in positive territory, led by materials, while utilities lagged.

In his statement, Bernanke reiterated the central bank's plan to start paring back its bond-purchase program later this year, but said that could change if the economic outlook shifted.

"Our asset purchases depend on economic and financial developments, but they are by no means on a preset course," according to Bernanke's prepared remarks to the U.S. House of Representatives Financial Services Committee.

Bernanke said the pace of asset purchases could be reduced "somewhat more quickly" if economic conditions were to improve faster than expected. On the other hand, the current $85 billion monthly pace "could be maintained for longer" if the labor market outlook darkened, or inflation did not look like it was rising back toward the Fed's 2 percent goal.

Meanwhile, the U.S. economy continued to grow at a modest to moderate pace in June and early July, with manufacturing expanding in most areas of the country, according to the Federal Reserve's Beige Book report.

(Read more: Fed's Bernanke Gets What He Wants: A Big Yawn)

On the economic front, housing starts tumbled 9.9 percent in June to a seasonally adjusted annual rate of 836,000 units, according to the Commerce Department, the lowest level since last August. Economists polled by Reuters had expected groundbreaking to rise to a 959,000-unit rate last month.

Mortgage applications fell last week, due to a decline in demand for refinancing loans as mortgage interest rates remained at a two-year high, according to the Mortgage Bankers Association.

Caterpillar slumped after widely-followed hedge fund manager Jim Chanos said he is betting against the heavy-equipment maker's stock.

Among earnings, Bank of America climbed after the financial giant posted a 70 percent jump in earnings, thanks to lower operating expenses.

(Read More: Enjoy it while it lasts: Bank earnings face trouble)

Yahoo surged nearly 10 percent to hit a five-year high after the Internet company beat earnings expectations, though revenue and current-quarter guidance fell short of forecasts. Still, at least seven brokerages lifted their price target on the company.

St. Jude soared after the medical equipment company exceeded quarterly expectations and raised the lower end of its full-year earnings forecast. The company also said sales would gain momentum this year as it rolls out a series of new heart devices.

Analysts expect S&P 500 companies' second-quarter earnings to have grown 3 percent from a year earlier, with revenue up 1.5 percent, according to the latest data from Thomson Reuters.

American Express, Ebay, IBM and Intel are among notable companies scheduled to post results after the closing bell.

American Express declined to lead the Dow laggards after the European Commission said it would propose limits on fees that banks can charge to process debit-card and credit-card transactions.

(Read More: Earnings preview: Bad news ahead for IBM, Intel?)

—By CNBC's JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)

On Tap This Week:

THURSDAY: Jobless claims, Ben Bernanke speaks, Philadelphia Fed survey, leading indicators, natural gas inventories, Fed balance sheet/money supply, Dell special shareholder mtg; Earnings from BlackRock, Morgan Stanley, United Health, Verizon, Nokia, Google, Microsoft, AMD, Capital One, Chipotle
FRIDAY: G20 in Russia; Earnings from GE, Schlumberger, Vodafond, Honeywell

What's Trending on