LONDON (CNNMoney.com) -- The mortgage wipeout could result in a $2 trillion cutback in lending and have dramatic implications for the U.S. economy, according to Wall Street investment bank Goldman Sachs.

The housing slump is expected to end up costing banks, hedge funds and other lenders an estimated $400 billion as defaults on home loans rise, according to Goldman economist Jan Hatzius.

A $400 billion loss is equal to just about 2.5 percent of U.S. stock market capitalization - or a bad day on Wall Street, he wrote in a commentary on Thursday.

But most stock investors don't react aggressively to capital losses the way banks and other lenders do. A bank that aims to maintain a capital ratio of 10 percent would need to shrink its balance sheet by $10 for every $1 in credit losses, the note said.

That means that if lenders end up suffering just half of the $400 billion in potential credit losses, they could be forced to reduce the amount they loan by $2 trillion. Such a drastic credit crunch could have dire consequences for the economy.

"Even if this occurs gradually, and even if there are some offsets from reduced credit demand and increased lending by other sectors, the drag on economic activity could be substantial," Hatzius wrote.

Wall Street banks and brokerages face pain on two fronts. They hold home loans, as well as securities backed by mortgages. Losses on these holdings are expected to deepen as falling housing prices trigger more defaults.

There are a number of factors that could lessen the lending shock, Hatzius noted. Regulators could encourage financial institutions to keep lending, even in times of stress. Some players could raise additional capital by selling stakes in themselves.

But the overall outlook is bleak, as pressure on lending is likely to raise the risk of "significant weakness" in economic activity, the note said.