What happened

The S&P 500 fell more than 1% on Friday, but that didn't keep shares of Axos Financial (AX 0.64%) from rallying. That's because Axos reported results for the first quarter of its fiscal 2021 that crushed expectations. The stock is still down about 11% from 52-week highs (it's been a tough year for bank stocks), but it continued regaining ground, closing 4% higher on Friday.

So what

Had the market not fallen, Axos stock probably would have risen more than 4%. That's because this was a record quarter for the company. It reported net income of $53 million, up 30% year over year. This resulted in diluted earnings per share of $0.88, an increase of 33%. For perspective, this was far better than the EPS of $0.68 expected by analysts.

A hand plots an arrow higher on a graph.

Image source: Getty Images.

Competitors of Axos have pulled back on lending over the last few months, which created an opportunity. The company increased its mortgage warehouse lending significantly. At the end of June, it had an outstanding balance of $474 million on its mortgage warehouse portfolio. By the end of Q1 (the end of September), this balance had increased 52.5% to $723 million.

Now what

Part of the reason Axos is able to buck the trends of other bank stocks is because it's one of the best positioned to withstand a potential recession. There are many metrics you could look at, but the one investors should consider is the average loan-to-value (LTV) ratio of Axos' loan portfolio. For example, 38% of the company's loans are for single-family homes, and these have an average LTV ratio of 60% as of the end of Q1.

In a recession, housing prices could fall and people could fall behind on mortgage payments. If Axos was forced to foreclose on some mortgages and take control of the properties, housing prices would have to fall very far before it was a money-losing endeavor. 

Axos had a good first quarter. Investors looking to invest in bank stocks should be sure to include this company in their considerations.