The mortgage application numbers this week just put an exclamation point on an already positive trend for mortgage lenders. Consumer demand for mortgages, both to purchase a home and to refinance, is way up, thanks to falling interest rates.

Now lender expectations are up as well.

The net profit margin outlook for mortgage lenders moved into positive territory in the second quarter for the first time in three years, according to Fannie Mae's quarterly Mortgage Lender Sentiment Survey.

"Lenders are signaling strong demand-driven mortgage market dynamics, with optimism for both their consumer demand and profitability outlooks reaching multi-year highs," said Doug Duncan, Fannie Mae senior vice president and chief economist. "For the first time in more than two years, lenders who are reporting or expecting growing refinance demand became the majority."

Mortgage rates are down dramatically from the November highs. The average rate on the 30-year fixed for conforming loan balances was just over 5% last fall but has now fallen to just below 4%.

A sharp drop in the last few weeks has already created a mini refinance boom. Mortgage applications to refinance jumped nearly 27% last week from the previous week and were 97% higher compared than a year earlier, according to the Mortgage Bankers Association's seasonally adjusted index.

Lenders expect the surge in refinances to continue. The net share expecting demand growth is now positive for the first time since the third quarter of 2016 for loans eligible to be sold to Fannie Mae and Freddie Mac (known as the GSE's), according to the Fannie Mae survey.

On the purchase loan side, demand growth expectations for the next three months also improved to the highest level for any second quarter over the past three years for GSE-eligible loans and over the survey's history for non-GSE-eligible loans.

While consumer demand is surging, lenders are also reporting a shift in their credit standards. After the foreclosure crisis, lending tightened dramatically, with new regulations imposed on lenders and some types of mortgages banned outright.

Those standards had been easing in recent years, but now appear to be tightening again. Lenders report that for all government-backed loans (Fannie Mae, Freddie Mac, FHA and VA), the pace of easing is slowing. Expectations for further easing have fallen to the lowest level since 2014.

"A lift in lender sentiment from depressed levels is an encouraging sign; however, many challenges remain, including the continued shortage of entry-level housing. In addition, it appears that the meaningful easing of lending standards is a thing of the past," Duncan said.