Think banks and downturns don’t go well together? Think again.

Wall Street analysts and investors are challenging the longstanding view that U.S. bank stocks move in lockstep with economic growth, arguing that high interest rates and regulatory changes over the past decade have set the stage for financial behemoths to withstand or even thrive in a recession.

A rapid rise in interest rates has allowed banks to charge more for loans and invest their piles of cash into higher-yield securities. The Federal Reserve is expected to announce a third steep rate hike this week as it continues an aggressive campaign to rein in high inflation.

“It’s high time the focus shifts from simply fear of recession to an appreciation for the bank’s preparedness to manage through,” Susan Roth Katzke, an analyst at Credit Suisse who covers large-cap banks, said in a recent research note.

Higher interest rates have created a major tailwind for net interest income at banks, which measures the spread between the rates banks pay out to depositors and the rates they take in from loans, according to Wells Fargo Securities managing director and head of U.S. large-cap bank research Mike Mayo.

“So you get this growth in what’s called net interest income or Main Street banking combined with lower losses and you’re going to see bank stocks grow earnings in a recession, as long as it’s not a hard landing,” Mayo said on CNBC last month.

Banks have also lowered their risks since the 2008 financial crisis, which prompted U.S. lawmakers to roll out stricter capital and debt requirements for financial institutions in the Dodd-Frank Wall Street Reform and Consumer Protection Act in 2010.

“We view the idea that banks are bound to underperform until well into the next recession as another example of recency bias,” Chris Kotowski, managing director at Oppenheimer & Co. said in a research note that upgraded the price targets of some of the largest U.S. banks. “Investors are looking back at the 2008-2009 recession and thinking that must be the inevitable pattern for the next one. We don’t think it is.”

Bank behemoths have outperformed the S&P 500, which has shed nearly a fifth of its value this year as concerns mount over slowdowns in the U.S. and other major economies.

Wells Fargo has fallen 9% this year, closing at $43.52 a share on Friday. Morgan Stanley finished at $87.19, an 11% loss for the year. The KBW Nasdaq Bank Index, which covers two dozen national and regional banks, has risen nearly 5% since June.

In June, several of the biggest U.S. banks said they would increase their dividend payments to shareholders. The announcements have helped to keep retail investors like Ryan Bidwell, a 45-year-old retail investor in Portland, Ore, invested in Wall Street banks.

“Commercial banks seem most poised to benefit from rate hikes, but JPMorgan straddles other spaces that benefit on the recovery side,” Bidwell said, referring to dividends and buybacks.

But some analysts remain skeptical. Bank earnings will only rise if interest rates remain high but don’t cause a recession, said Gerard Cassidy, the head of U.S. Bank Equity Strategy at RBC Capital Markets.

“If we go into a bonafide recession in 2023 with rising credit loss, It will be difficult for banks to grow earnings, even in a rising interest rate environment,” he said. “Will the banks suffer greater losses? Absolutely. Will earnings likely be negatively impacted if this happens? Very likely. But this is not going to compare to anything we saw in 2008.”

Major U.S. banks are set to report third-quarter earnings in mid-October.