What happened

Shares of the residential mortgage company PennyMac Financial Services (PFSI 0.55%) had jumped more than 17% as of 1:09 p.m. ET on Friday after the company reported better-than-expected third-quarter results.

So what

PennyMac reported diluted earnings per share of $2.46 on total revenue of more than $476 million for the third quarter. Both numbers easily beat analyst estimates.

"Meaningful income contributions from both of our production and servicing segments led to an annualized return on equity of 16% and growth in book value per share, despite mortgage rates climbing to their highest levels in more than a decade," CEO David Spector said in the earnings release.

While higher interest rates have significantly slowed mortgage originations and led to much lower net gains on loan sales, some of that pain has been offset by higher net loan servicing fees from PennyMac's mortgage servicing business.

Book value per share increased from $65.38 last quarter to $68.26 in the third quarter, and PennyMac continues to trade under book value. Furthermore, it has been repurchasing shares at attractive prices below book value.

Now what

Any mortgage company is going to be struggling right now because high interest rates cut into mortgage volume. And this dynamic is unlikely to go away in the near future.

But management seems to be doing the right things, including cutting expenses and repurchasing stock while it trades below book value, which is a shareholder-friendly move. So I'm optimistic PennyMac will be able to navigate these difficult conditions.