) -- The bank stock rally has taken a breather, as investors consider how many loans have yet to go bad, and how long it will take until lending starts getting good again.

While residential real-estate pain hasn't ended, it appears to have peaked. Even credit-card write-offs may be topping out soon. On the other hand, losses from commercial and industrial, or C&I, lending, and commercial real estate still appear to have a ways to go.

Moody's estimates that U.S. banks will post another $336 billion in write-downs through the end of 2010. The largest portion of losses will come from residential real estate, which is spread across many banks throughout the country. But roughly 23% of the losses will come from commercial real estate, which is segregated to fewer banks that loaded up on such loans. They haven't recognized losses to the same degree as their residential-weighted peers, because commercial pain tends to come later in the cycle.

For instance, a recent report by Citigroup equity analysts found that "consumer-heavy" banks and those that underwent large acquisitions are far past the worst of their credit cycles.

For instance,

Wells Fargo

(WFC) - Get Wells Fargo & Company Report

, which posted large writedowns on Wachovia's bad assets through the quick-and-dirty purchase-accounting method, is roughly 68% of the way through its writedowns, according to Citi's research.


(PNC) - Get PNC Financial Services Group, Inc. Report

, which did the same for its National City assets, is estimated to be 67% through. Others that were heavily weighted in residential real estate and other consumer debt are even closer to the light, with

First Horizon

(FHN) - Get First Horizon National Corporation Report

approximately 81% through the cycle.

The largest and most diverse banks are thought to be just past the midway point. Citi estimates that

Bank of America

(BAC) - Get Bank of America Corp Report

has posted 52% of the write-downs it will see through 2010, and and

JPMorgan Chase

(JPM) - Get JPMorgan Chase & Co. (JPM) Report

has posted 55%.

By contrast, banks that are heavily weighted in C&I lending, or commercial real estate, are at the weak end of the spectrum.

M&T Bank

(MTB) - Get M&T Bank Corporation (MTB) Report

has the furthest to go, having posted just 38% of its estimated total write-downs, according to Citi's analysis.


(CMA) - Get Comerica Incorporated Report

has written down just 42%,

TheStreet Recommends


(BBT) - Get BB&T Corporation Report


New York Community Bank


just 44% and

Regions Financial

(RF) - Get Regions Financial Corporation Report

45%, according to Citi.

"C&I and CRE players have way to go," says analyst Keith Horowitz.

As a result, regional banks have taken a beating, with the KBW Regional Bank Index down nearly 30% this year, vs. break-even performance for the overall KBW Bank Index, a 5% decline for the broader S&P 500 Bank Index, and a 19% improvement for the

Dow Jones Industrial Average


But it might not be quite as bad as it seems.

When the residential real-estate market started to take a nose-dive in 2007, it caught banks, homeowners and investors off guard. Even as it became clear that there were big subprime problems, few initially expected the destruction to last so long or bleed so far into more creditworthy borrowers. In the market, it's all about expectations, and investors should be well-prepared for the long-anticipated commercial fallout.

Additionally, if the economy continues to improve, commercial losses may not end up being so terrible.

Prices for commercial real-estate debt have continued to decline in the market, and spreads between bidders and sellers have widened, according to MIT's Center for Real Estate. However, banks haven't been posting losses quite as rapidly or severely, because cash flows on the actual properties haven't been declining at the same pace. In fact, the National Association of Realtors' leading index for the commercial real estate market, actually improved last quarter for the first time since mid-2007.

How should bank investors view these mixed data? It all depends on the level of economic optimism, and the investment time horizon.

Some investors may want to wait for fourth-quarter results to provide additional clarity before diving into regional bank stocks. But others are already looking toward sunnier days ahead.

Citi upgraded BB&T


Fifth Third

(FITB) - Get Fifth Third Bancorp Report

to buy in its report on Tuesday, while

Credit Suisse similarly upgraded BB&T



(STI) - Get SunTrust Banks, Inc. Report

on Wednesday. All three are up significantly from last Friday's close.

-- Written by Lauren Tara LaCapra in New York