JPMorgan Chase (JPM 0.06%) is a well-run bank that displayed incredible foresight in the last few years. In 2021, the bank began stockpiling cash to prepare for a higher interest rate environment. Its fiscal prudence put it in an excellent position to acquire First Republic Bank on favorable terms when federal regulators seized the bank earlier this year.

All that foresight and strong management paid off in the second quarter as JPMorgan's revenue and net income surged thanks to higher interest rates and its acquisition of First Republic.

Here's how the bank positioned itself perfectly to benefit from today's economy.

JPMorgan's big earnings beat

JPMorgan Chase kicked off the latest earnings season for banks by crushing analysts' estimates for the second quarter. The bank's total revenue and adjusted earnings per share were both 9% above Refinitiv's estimates -- a big beat for the largest bank in the U.S. 

Its net interest income in the quarter was $21.8 billion, up 5% from Q1 and up 44% versus the prior year. The bank benefited as the Federal Reserve continued its aggressive interest rate policy in its fight against inflation. 

Since March of last year, the federal funds rate has climbed from near zero to 5.25%. While there are several factors to consider, banks tend to benefit from higher interest rates because it increases their interest rate spread (the difference between the interest it earns on loans and the interest it pays out on deposits), ultimately boosting net interest income.

JPM Net Interest Income (TTM) Chart

JPM Net Interest Income (TTM) data by YCharts

JPMorgan also saw a jump in other income, which was $3.3 billion for the quarter compared to $599 million last year. Included in this amount was a bargain purchase gain (the difference in the price paid and fair value is recorded as a gain) of $2.7 billion stemming from its acquisition of First Republic Bank. It should be noted that the acquisition also added $1.8 billion in provisions for credit losses and other expenses. 

How JPMorgan prepared for today's economy

The first signs of inflation in the U.S. economy began showing up in April 2021. The Consumer Price Index, which measures the change in the price of goods and services for consumers, rose 2.6% year over year that month.

Not long after, Jamie Dimon, JPMorgan Chase's CEO since 2005, began warning investors about a fat tail of inflation and that inflation "could go higher than people think." The bank exercised caution at a time when others thought the good times would keep rolling on. In 2021, it was extremely conservative about putting cash to work. Dimon wanted flexibility and liquid cash at the ready, which he saw as a way to protect the bank against higher interest rates.

Last year, Dimon again issued a warning, saying interest rates could rise "significantly higher than the markets expect." At that time, the Federal Reserve's Summary of Economic Projections showed that policymakers projected 2023's federal funds rate would be around 3%. Today, it's over 5%.

JPMorgan maintained a strong balance sheet with plenty of cash, allowing it to capitalize on higher interest rates. And while high interest rates put pressure on some banks, like First Republic Bank, JPMorgan had the capital to submit a competitive bid and acquire the bank at a great price.

JPMorgan's stock has crushed industry peers

JPM Total Return Level Chart

JPM Total Return Level data by YCharts

JPMorgan's key to success is Dimon's leadership and foresight to make long-term decisions that benefit the bank, even if it means sacrificing near-term performance.

It has maintained a "fortress balance sheet," giving it a big pile of cash to put to work when the time is right. So it should come as no surprise that since the Great Recession in 2008, JPMorgan Chase has crushed its peers and continues to hold onto its spot as the top bank in the U.S. today.