The Federal Reserve's plan to methodically raise short-term interest rates over the next couple years may not boost bank shares, contrary to popular belief, and could instead hurt the group's profitability as it flattens the so-called yield curve, Deutsche Bank said.

Analyst Matt O'Connor downgraded shares of JPMorgan and regional bank PNC Financial late Monday to hold from buy for this reason. The yield curve is the difference between short term and long-term rates in the Treasury market and often runs parallel to the margin banks make on their loans.

"We continue to believe the yield curve will flatten as the Fed continues to boost short term rates, the unwind of the Fed's bond book isn't likely to meaningfully impact the demand/supply of those assets, and economic growth seems unlikely to significantly accelerate (for a sustained period)," wrote O'Connor. "In this environment, net interest income growth is likely to slow and credit costs may begin to inch up."

JPMorgan shares rose more than 40 percent the last 12 months, more than the 33 percent gain for the Financial Select SPDR, as CEO Jamie Dimon guided the bank through a difficult trading environment on Wall Street. Bank shares have perked up again recently as the Fed indicated a December hike was likely and traders bet the move would boost both short term and long term rates, making the industry's lending portfolios more profitable. Deutsche Bank disagrees, apparently.

JPMorgan fell slightly in premarket trading following the Deutsche call.

"Increased competition in investment banking/trading may erode some of JPM's recent gains," wrote the analyst. "Post crisis (including in recent years), JPM has gained large market share across its investment bank (IB fees, FICC and EQ trading). However, the competitive landscape seems to have increased and even JPM mgmt (at its 2017 investor day) has acknowledged it will be difficult to maintain share."

PNC has done even better than JPMorgan, up 52 percent in one year. But that run has made the Pittsburgh-based bank too expensive.

"PNC shares now trade at 14.4 times 2018 consensus or a 10% premium to the Large Regional peer group. This compares to a 5% discount on average over both the historical 25-year and 5-year time horizon. Some premium is warranted in our view given the positives noted above, but further multiple expansion seems harder to argue for and we're less positive on Large Regional banks in general given concerns surrounding a flatter yield curve," stated the note.

Deutsche still thinks factors such as loosening regulation and M&A activity can help the financial sector, but it favors "turnaround" stories such as Goldman Sachs and Wells Fargo than the sector leaders. O'Connor also has a buy rating on Morgan Stanley.