They started retooling the bank's assets and operations to get ready for the day when rates started rising, people close to the bank said on Tuesday. Executives looked at the bank from top to bottom, and took steps ranging from adjusting its investment portfolio to finding ways to hang on to deposits when higher rates give customers an incentive to move money elsewhere.

Regulators encouraged them, but it was a massive undertaking entailing huge - and sometimes costly - shifts around the bank.

Then JPMorgan waited. And waited, and waited.

"It costs us a significant amount of current income to be positioned this way," JPMorgan Chief Executive Jamie Dimon wrote in a letter to shareholders in April. "But we believe it is better to be safe than to be sorry."

On Tuesday, in a little-noticed slide in a presentation to investors, JPMorgan said its efforts to position its investment portfolio for higher rates could begin to pay off as soon as the middle of this year, potentially adding hundreds of millions to its interest income in 2014.

The timing could not be better for JPMorgan. As the largest U.S. bank's legal problems start to recede after a year with $20 billion of settlements, investors are increasingly turning their focus to the performance of its main banking business, looking for how it would do in a rising rate environment and tepid U.S. economic recovery.

Yields on longer-term bonds started rising last year, as the U.S. Federal Reserve signaled it was starting to cut back on its massive monetary stimulus program, called quantitative easing. But economic growth has not been strong enough to translate into stronger loan demand and higher revenue for banks. JPMorgan saw fourth-quarter profits fall 7.3 percent, in part due to its legal woes and weak demand for investment banking services.

JPMorgan is hardly the only bank to be getting ready for rising rates.

In 2010, the Federal Deposit Insurance Corp and other regulators warned banks to prepare for the risk of rising interest rates, which can immediately hurt the value of bonds that suddenly pay below-market yields. Higher rates can also increase banks' funding costs, a key expense for lenders and traders.

Jason Goldberg, an analyst at Barclays, said all 25 banks he covers have said that they would benefit from rising rates, up from an average of 66 percent of those banks over the last 38 quarters.

On a conference call on Tuesday, Wells Fargo & Co's Chief Financial Officer Tim Sloan said the bank was ready for rising rates, adding that the most likely scenario is longer-term bond yields rising in the near future, and shorter-term rates rising in the next year or two.

PREPPING THE PORTFOLIO

In 2010, JPMorgan started focusing its investment portfolio, where the bank invests funds that it could not otherwise economically lend out, on shorter-term securities instead of longer-term bonds. Shorter-term notes offer less income, but they also mature sooner, allowing the bank to re-invest money at higher rates once bond yields start rising.

Yields did not start to rise until the summer of 2013, costing the bank hundreds of millions of dollars of income that it could have earned from higher-yielding securities.

With recent increases in longer-term yields, JPMorgan said by the middle of this year it will have invested enough at the new higher yields to be making money from interest.

When shorter-term rates also rise, the benefits to JPMorgan could ultimately prove to be substantial. In the third quarter, JPMorgan said that a 2 percentage point increase in short- and long-term rates would ultimately lift its pretax income by $4.09 billion a year. (The bank posted $25.9 billion in pre-tax profit in 2013.)

Much of those gains would come from rising short-term rates, a change that is not expected until 2015. With rising short-term rates, banks can take deposits and invest them for a month or so with little risk, and earn more income.

JPMorgan has estimated that higher short-term rates would deliver about two-thirds of the additional interest income it would expect from a 3 percentage point rise in both short and long rates.

MAKING DEPOSITS STICK

People close to the bank say JPMorgan has also been preparing for a rise in rates across its myriad businesses, and not just its investment portfolio.

In its retail banking unit, for example, deposits in the fourth-quarter were 10 percent higher than a year earlier, and amounted to about a fifth of total liabilities.

The sources said JPMorgan views deposits with caution, and recognizes that once rates rise even loyal customers will be quicker to shift any extra cash from checking accounts to higher yielding instruments such as money-market accounts.

The bank is hoping it can stem some of the expected deposit erosion by having superior customer service, so that some customers never consider taking money out of their accounts, or consider keeping more at JPMorgan than they would otherwise, the sources said.

It is focusing on customers who value the convenience of its mobile account access and branches that will likely help the bank retain balances, says Stephen Beck, founder and managing director of consulting firm cg42, which tracks customer loyalty.

Beck said he found that JPMorgan's customers were significantly less likely last year to become frustrated and close their Chase accounts than they were two years earlier.

(Reporting by David Henry in New York Editing by Dan Wilchins and Kenneth Maxwell)

By David Henry

Stocks treated in this article : JPMorgan Chase & Co., Wells Fargo & Co