Stocks off as traders look ahead to Fed chief's testimony

Stocks closed lower on Tuesday, with the S&P 500 breaking its 8-day winning streak, following a mixed batch of economic and earnings reports as investors hesitated to jump in a day before Fed Chairman Ben Bernanke's congressional testimony.

The Dow Jones Industrial Average ended 32 points lower at 15, 451.85, dragged down by Coca-Cola and Walt Disney.

The S&P 500 and the Nasdaq snapped their 8-day rallies to close in the red. The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, rose above 14.

Most key S&P sectors turned lower, led by energy and utilities.

On the earnings front, Dow component Coca-Cola matched analyst expectations of 63 cents a share in second-quarter profit, but missed on the revenue end with $12.75 billion against expectations of $12.95 billion.

Also, Goldman Sachs was the latest participant in the parade of big U.S. financial institutions to report blowout profits. The company reported earnings per share of $3.70, well ahead of the $2.82 estimates. Revenue also easily beat expectations, sending shares higher.

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

"We know earnings in the second quarter aren't going to be particularly good and we know GDP growth in the second quarter wasn't particularly good, but there's a fair bit of optimism built into the back half of the year and so from our standpoint, we're focused almost entirely on what companies had to say on the second half of the year and what that means for stock prices," said Dan Greenhaus, chief global strategist at BTIG.

Investors will be looking ahead to Federal Reserve Chairman chief Bernanke's semi-annual testimony to Congress on Wednesday, from which they hope to garner further clues on the direction of monetary stimulus. Markets jumped last week when he said the central bank was inclined to keep its policies in place for some time

"In recent weeks the message that he's given is that we have seen signs of improvements in the U.S. economy and we're going to move towards tapering. Then he gives us the message that we got last week, so I think markets will be cautious ahead of Bernanke's testimony," said Robert Rennie, global head of currency strategy at Westpac.

Meanwhile, Kansas City Fed President Esther George said the central bank should begin to reduce its massive bond-buying program and bring it to a close "sometime in the first half of next year."

On the economic front, homebuilder confidence jumped in July to its strongest level since January 2006, according to the National Association of Home Builders. The NAHB/Wells Fargo Housing Market index rose to 57 from a revised 51 in June. Analysts polled by Reuters had projected the index likely held at its originally reported June level of 52.

Consumer price index gained 0.5 percent in June thanks to a gain in gasoline prices. Economists polled by Reuters had expected consumer inflation to increase 0.3 percent last month. Excluding food and energy costs, the core reading edged up 0.2 percent.

And industrial production edged up 0.3 percent in June after an unchanged reading in May, according to the Federal Reserve. Economists polled by Reuters had expected a gain of 0.2 percent.

Elsewhere, Japan's benchmark index hit a new seven-week high and as earnings season picked up.

The Nikkei 225 hit its highest levels since May 24, and the yen weakened to the 100 handle against the U.S. dollar, after Japan's economics minister, Akira Amari, said the government will go ahead with a planned sales tax hike.