I'm not sure exactly how they did it, but Midwestern bank company Commerce Bancshares (NASDAQ:CBSH) managed to report a year-over-year improvement in net interest margin for the second quarter. With many banks seeing their growth flattened out by a flatter yield curve, Commerce's accomplishment is interesting at the very least.

Overall, the quarter was solid. Net income grew 1% and, by virtue of ongoing share buybacks, the company was able to post 5% EPS growth for the period. Coming in at $0.80 a share, the company beat the mean estimate of $0.74 and the high estimate of $0.77.

Commerce Bancshares reported a net interest margin of 3.93% for the second quarter -- better than both the year-ago level of 3.85% and last quarter's 3.79%. Given that the math here is pretty straightforward, you can see how the company did this. Simply put, it reaped better rates from its loans and securities, while simultaneously achieving lower borrowing costs. Sounds simple, I know, but most banks are still seeing an ongoing compression in their interest margins.

Other performance metrics were also better for the second quarter. Return on average assets ticked up to 1.55% (from 1.51% a year ago), and return on average equity rose to 15.78% (from 14.91%). The efficiency ratio, though, was more of a mixed bag. While much better on a sequential basis (58.3% vs. 62.2%), that metric did worsen from the year-ago level of 58%.

Elsewhere, loan and deposit growth also looked a bit sluggish to me. Average loan balances grew about 4.6%, whereas average deposit balances only increased by 3%. And while total interest income grew 13.1%, non-interest income was basically flat.

This is something of an odd bank to analyze. If you look at a long-term chart, you will see a very impressive 20-year history of stock price appreciation. Yet the dividend yield isn't that great. Similarly, while the bank's return on equity is on the upper end of average, the P/E is at about a middle-of-the-road point.

Although this bank doesn't do much to attract attention to itself, it's tough to argue with a long history of double-digit profit growth and stock appreciation. True, it appears that income growth is slowing, but that doesn't mean the end of the story is at hand. I'd personally like to see a bit more growth before paying 16 times earnings for these shares, but it's hard to argue with that long-term performance.

You can bank on these other Foolish takes:

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).