NEW YORK (CNNMoney.com) -- The housing finance crisis and spiraling energy costs will remain a drag on the U.S. economy for the rest of the year, Federal Reserve Chairman Ben Bernanke told lawmakers in a gloomy presentation about the economic outlook.

"The economy continues to face numerous difficulties, including ongoing strains in financial markets, declining house prices, a softening labor market, and rising prices of oil, food, and some other commodities," Bernanke told the Senate Banking Committee early Tuesday.

The nation's top central banker warned "many financial markets and institutions remain under considerable stress, in part because the outlook for the economy, and thus for credit quality, remains uncertain."

The Senate panel was meeting to hear from Bernanke about the economy and to consider the crisis at mortgage finance giants Fannie Mae and Freddie Mac, as well as growing fears about bank failures.

Shares of Fannie and Freddie on Tuesday continued the recent slide that has prompted the Treasury Department and Fed to step in and offer support.

Shares of Fannie (FNM, Fortune 500) plunged 27% on Tuesday, leaving them 64% lower this month. Freddie (FRE, Fortune 500) shares tumbled 26%, leaving them down 68% in July. Both have lost more than 80% of their value since the start of the year.

Bernanke: "Financial headwinds'

Bernanke said the financial sector's problems are not the only problems facing the economy. "The financial headwinds on spending and economic activity have been compounded by rapid increases in the prices of energy and other commodities," he warned.

The combination of rising commodity prices and tighter credit "has sapped household purchasing power even as they have boosted inflation," Bernanke said.

Bernanke added that spending has held up better than expected, helped by the Treasury's economic stimulus program, which has so far pumped $92 billion into the economy. At the same time, he warned that spending by consumers "seems likely to be restrained over coming quarters" and that businesses also are likely to be cautious with spending plans.

He also expressed concerns about rising inflation risks due to high commodity prices, suggesting that the Fed might not be able to take steps to support economic growth because of the risk that they would feed inflation pressures.

Despite Bernanke's gloomy outlook - his most pessimistic since he took office in 2006 - he said the Fed had raised its forecast for overall economic growth. It is now looking for 1% to 1.6% growth for all of 2008, up from its April forecast of 0.3% to 1.2% growth.

While the forecast did not break down the growth by quarter, he said he did not expect any robust growth over the next six months. Bernanke said the revision in the full-year forecast was caused by stronger-than-expected growth in the first two quarters of 2008, helped by the stimulus checks that goosed spending in the second quarter.

Three weeks ago, the Fed left interest rates unchanged for the first time in nine months as it said the risks of an economic slowdown appear to have diminished.



But his comments about the economy in the second half of the year seemed much more bearish than suggested in that Fed statement. Bernanke said that while he believed there would be second-half economic growth, he thought it would be weak.

His comments helped feed a sell-off in oil prices Tuesday, as traders started pricing in lower U.S. consumption of oil in the second half of the year.

Bernanke's testimony came as part of his regularly-scheduled semi-annual testimony on the state of the economy. The committee was set to joined by Treasury Secretary Henry Paulson and Christopher Cox, chairman of the Securities and Exchange Commission, for a second hearing Tuesday about Fannie Mae and Freddie Mac.

Mortgage market in cross-hairs

Mortgage finance giants Fannie and Freddie are a key source of funding for banks and other home lenders. Their ability to provide that funding is seen as a key to any recovery in housing and the economy as a whole.

The companies were set up by Congress, but they are owned by shareholders, who have fled the firms' stock recently on fears that continued problems in housing and rising mortgage defaults will force them to seek significantly more capital, a move that would dilute the value of existing shares.

Problems in the banking and home lending sectors were further highlighted by the failure of IndyMac, a California bank that was taken over by the federal government Friday evening in what could end up being the most costly bank failure in U.S. history. Stocks of many major regional banks plunged Monday on concerns over more failures.

IndyMac had been a major provider of mortgage loans that did not demand lenders to provide full or any documentation of their income. There are likely to be questions about the state of banking and the risk of more failures at Tuesday's hearings.

Sunday evening Paulson announced a proposal by Treasury to have Congress raise the $2.25 billion it is allowed to loan the two firms, and even open the door for the federal government to buy shares in the two companies if needed. The Fed announced it stood ready to loan money to the firms if they needed access to funds ahead of congressional actions.

Bernanke, in response to a question from Sen. Richard Shelby, R-Ala., said he felt that IndyMac "was particularly weighed down with low-quality mortgages. In that respect its failure, barring acquisition by another firm that didn't occur, was inevitable."

But he added that the banking system is well capitalized. "My concerns have turned less on the solvency of the institutions and more on their ability to provide credit necessary to keep the economy growing."

Bernanke said he believed that home building was likely to finally end its slide later this year or early next year, but that the decline in housing prices could continue longer than that, although he said he couldn't predict when, or at what level, they will find a bottom.