To appreciate JPMorgan's (JPM - Get Report) second-quarter results , one must take a step back.

Certainly, parts of the business did not perform nearly as well as most shareholders would have hoped, particularly in the company's corporate and investment bank division. In addition, a trimmed 2019 outlook on net interest income, down $500 million for the remainder of the year, seems to have spooked investors beyond the results of the most recent period.

But as analysts had anticipated, the second quarter was shaping up to be anything but a walk in the park for JPMorgan and its peers. Mixed macroeconomic data, a swift reversal in monetary policy and lingering trade policy concerns suggested challenges that ranged from subdued business sentiment to narrowing net interest margin.

Faced with these headwinds, JPMorgan still managed to deliver an all-around beat ahead of the opening bell on Tuesday. The large consumer and community banking business continued to thrive, helping the company to deliver impressive return on tangible common equity of 20% that is about as good as it gets in the diversified banking space. And despite sizable investments in technology, the company's overhead expenses continued to drop, this time to a ratio of 55% that is also among the sector best.

A Closer Look at the Results

Once again, the most encouraging news in the quarter came from the consumer business, supported by what seems to be healthy U.S. consumer activity. In particular, credit card and auto revenues looked robust, having increased an adjusted 11% year-over-year and aided by what may have been unexpected margin expansion. Any concern over a slowing global economy does not seem to be reflected in the performance of JPMorgan's consumer portfolio.

It was reassuring to witness asset balances that, after adjusting for the impact of loan sale, increased 4% over year-ago levels. The increase happened alongside robust credit metrics, a desirable combination that suggests diligent growth. Delinquencies fell across home and credit card, while net charge-off remained largely flat sequentially.

Much less uplifting were investment banking revenues, down 9% even after shaking off early 2019 worries over Brexit, the government shutdown and last year's market volatility. Not even JPMorgan's arguably best-in-class banking pipeline was able to endure slower activity that was probably impacted by trade policy uncertainties. Markets and securities services, representing more than one-fifth of total company revenues, also took a hit that seems to have been largely driven by unfavorable macro forces.

Still the Best and Most Defensive Play

While far from spotless, JPMorgan delivered second-quarter results that support my convictions on this company and bullishness towards the stock. The New York City-based bank appears to have the best franchise in the diversified financial services sector, as reflected in the robust consumer banking results -- both in terms of growth and credit quality.

The lower interest rate environment is likely to impact JPMorgan in the short term, as it should the industry as a whole. But amid the macro-level challenges, I find it hard to make an argument against a bank that seems to have its house in order, arguably more so than peers like Citigroup (C - Get Report) and Wells Fargo (WFC - Get Report) .

JPMorgan and Citigroup are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells these stocks? Learn more now.

The author has no positions in any stocks mentioned in this article.