Wells Fargo, the country's biggest mortgage lender, reported record earnings for the fourth quarter on Friday, beating analysts' expectations for both profit and revenue. The bank made more loans, gained deposits and enjoyed above-average returns from the investments made by its private equity business.In a call with analysts, bank officials also sounded a positive note on their crucial mortgage unit. The housing market, said CEO John Stumpf, began "a steady rebound" in 2012. "There is no doubt," he added, "that a corner was turned."But investors found the results underwhelming and sent Wells Fargo's stock lower. Although the bank is still funding more mortgages than at any time in 2011, investors were disappointed that the numbers had slipped compared to the previous quarter. Wells Fargo's stock was down 50 cents at $34.90 in midday trading.As the first major bank to report earnings, San Francisco-based Wells Fargo sets the tone for the rest of the industry. And as the biggest mortgage lender by far - it makes about 30 percent of U.S. mortgage loans, according to the trade publication Inside Mortgage Finance - it's a bellwether for the overall housing market.Wells Fargo said it funded $125 billion in mortgages in the fourth quarter, up from $120 billion in the same period a year ago. However, that was down from the record $139 billion it did in the third quarter. Mortgage applications were down over both the year and the quarter."The absolute levels of each of these data points remains relatively healthy," Stifel Nicolaus analyst Christopher Mutascio wrote in a note to clients, "but they are showing indications that the refinance boom is losing steam."Seventy-two percent of the fourth-quarter mortgage applications came from customers who wanted to refinance their current mortgages, rather than buy new homes. Refinancing requests have made up at least 70 percent of the bank's mortgage applications in five of the last six quarters.That's because the Federal Reserve is keeping interest rates extremely low, a move that it hopes will boost the economy by encouraging individuals and businesses to borrow money and spend. Mortgage rates continue to creep lower. The average interest rate for a 30-year fixed mortgage in December, the close of the fourth quarter, was 3.35 percent, according to Freddie Mac. In September, the close of the third quarter, it was 3.47 percent.It's difficult to predict how long the low interest rates will last, which makes it difficult to predict how long refinancing can power mortgage results."Could it last a couple more quarters? Sure, it could," chief financial officer Tim Sloan said in a call with analysts. "Could it last through the end of the year? Your guess is as good as mine, but there is a lot of opportunity out there."Wells Fargo's dominance in mortgages has helped it emerge from the financial crisis with a reputation as one of the strongest banks in the country.But the strategy also makes Wells Fargo a target for lawmakers, regulators and customers who blame risky mortgage lending for the 2008 global financial crisis. The latest example came Monday, when Wells Fargo and nine other banks agreed to spend a combined $8.5 billion to settle the government's charges that they had wrongfully foreclosed on some homeowners. Wells Fargo said it would pay $766 million and set aside an extra $1.2 billion for "foreclosure prevention actions," such as modifying mortgages for struggling homeowners.No one knows what other regulatory fines could be waiting for the banking industry. For some analysts, that makes the industry's future earnings a wild card.When Jefferies analyst Ken Usdin asked on a conference call how much more the bank might have to spend on buying back soured mortgages from investors, CFO Sloan replied: "The biggest mistake anybody in this industry can make is predict when that is going to end."When Deutsche Bank analyst Matt O'Connor asked if there were "other skeletons in the closet" in the mortgage unit, CEO Stumpf said he couldn't predict what might come up. But, he added: "I can tell you I am pleased that we are this far through the process and we have gotten a lot of big things behind us."In an interview, Sloan acknowledged that legal and regulatory fees are unpredictable. He pointed to the bank's record earnings as proof that it could handle them."What we need to do is say, `Look, we understand there are headwinds, some of them are legal and regulatory, how do we deal with them, how do we grow despite those?'" Sloan told The Associated Press. "Other institutions may not be able to address those as well as we can."For the quarter, revenue rose 7 percent, to $21.9 billion, beating the $21.3 billion expected by analysts polled by FactSet. Wells Fargo increased its business in credit cards, wealth management and other units, and charged more in fees.The bank earned $4.9 billion after paying dividends on preferred stock, up 25 percent from $3.9 billion a year ago. That amounted to 91 cents per share, more than the 87 cents per share analysts were expecting, and up from 73 cents last year. Revenue and earnings were also up for the full year.