Wells Fargo (WFC) revealed on Friday a 19% increase in its second-quarter net income, as credit quality strengthened but revenue stayed flat.

The bank beat Wall Street projections with a profit that rose to $5.52 billion from the $4.62 billion logged in the year-ago period. Per-share earnings were 98 cents compared to 82 cents.

Revenue was roughly level with year-ago results, checking in at $21.38 billion. Noninterest expense narrowed 1% to $12.26 billion.

Analysts were looking for per-share earnings of 93 cents and revenue of $21.22 billion.

Wells Fargo, the largest mortgage lender in the U.S., is considered to be a bellwether for the housing market. It is estimated to have a 22% share of mortgage originations in the U.S., and in the latest period, total mortgage applications were down nearly 30% from the year-ago quarter. The bank also said it expects originations to decline further.

Last month, long-term interest rates quickly shot higher on comments from Fed Chairman Ben Bernanke, creating challenges for banks facing weak loan demand.

The rate spike could also boost bank profits since lenders would be charging more for loans. For the second quarter, Wells Fargo had a net interest margin, or the profit margin between lending and investing, of 3.46% compared to the 3.91% a year ago and 3.48% in the previous quarter.

Both Wells Fargo and rival J.P. Morgan Chase (JPM), which also reported its second-quarter earnings Friday, were aided by stronger credit quality. Credit loss provisions were $652 million, well below the prior year’s $1.8 billion and the first quarter’s $1.22 billion.

Net charge-offs, the loans that lenders believe aren’t collectible, fell to 0.58% of average loans from 1.15% last year and 0.72% in the first quarter.

Total loans rose by $2 billion sequentially to $802 billion, after Wells Fargo saw flat results in the last period.

Wells Fargo’s community banking segment saw its profit climb 28% year-over-year to $3.25 billion, up 11% from the first quarter.

The wholesale banking division, which lends to corporations and includes a small investment banking business, logged 6.5% profit growth from the prior year with earnings of $2 billion, which is down 2% sequentially.

Mortgage banking non-interest income was $2.8 billion, down 3% year-over-year.

Shares jumped 1.9% to $42.69 in early morning trading.

Follow Matthew Rocco on Twitter @MatthewRocco