What happened

Online banking pioneer Axos Financial (AX 0.45%) did better than expected in its most recent quarter and says credit quality remains strong. Investors were pleased with the result, sending shares up as much as 14% on Friday.

So what

Axos, which was founded in 1999 as Bank of Internet and was one of the first online banks, earned $1.38 per share in its fiscal second quarter, well ahead of the $1.22 per share analysts had expected. Net income totaled $81.6 million, up 34% from the same three months of 2021, thanks to strong improvements in interest income.

The bank is doing a good job managing through a rising interest rate environment. Net interest margin, the difference between the rate that Axos is paying out to depositors and charging borrowers, was 4.49% for the quarter, up from 4.1% a year ago.

"Our diverse lending and deposit businesses continue to support strong revenue and earnings growth," CEO Greg Garrabrants said in a statement. "Higher loan yields, primarily from monthly adjustable commercial loans and a diverse mix of interest-bearing and noninterest-bearing deposits, allowed us to increase our net interest margin this quarter compared to last quarter despite increased deposit funding costs."

Now what

A rising interest rate environment can be challenging for banks, which have to scramble to make sure the rates they are charging on loans increase at least as fast as what they are forced to pay out on deposits. Axos' results show the company is handling what can be a volatile period well, which is reassuring for investors.

The company is also seeing a boost to its securities and fiduciary services units thanks to the higher rates.

Shares of Axos, like many small-to-midsized banks, have struggled over the past year due to macroeconomic uncertainty. Even after Friday's gains, the stock is still down nearly 20% over the past 365 days. But these results provide much-needed reassurance to investors that the bank remains on course, and investors are rallying into the shares as a result.