The U.S. stock market has left $5 trillion on the table as trade tensions over the past 17 months contributed to an effectively sideways trade, Deutsche Bank estimated on Friday.

“While other factors also arguably played a role, the trade war has been key in preventing a recovery in global growth and keeping U.S. equities range bound. Foregone U.S. equity returns from price appreciation for 17 months are worth $5 trillion,” wrote Binky Chadha, the bank’s chief strategist, in a Friday note, based on an price appreciation at an annual rate 12.5% (see chart below).

Deutsche Bank

Chadha’s calculation is based on the capitalization of the Russell 3000 RUA, +0.21% , a broad measure of equity markets, which had a capitalization of $28.7 trillion at the start of 2018. Foregone returns for the index over 17 months comes out to $5 trillion.

The S&P 500 SPX, +0.29% in the first four months of 2019 bounced back sharply from a steep fourth-quarter selloff nudging to an all-time closing high in April. But the index has retreated more than 6% in May, posting its first monthly decline since December and its worst May performance since 2010. The Dow Jones Industrial Average DJIA, +0.19% , which failed to return to record territory before the May swoon, also fell more than 6% for the month.

Read:Stock market suffers ‘key’ monthly reversal that ‘presages deeper declines,’ technician says

The May retreat was blamed by analysts in large part on an escalation in the U.S.-China trade fight that shows little likelihood of near-term resolution. The battle between the world’s two largest economies has contributed to jitters over the global and U.S. economic growth outlook. Those worries were amplified after President Donald Trump late Thursday announced he would place escalating tariffs on all Mexican imports in an attempt to pressure the country to stem the flow of migrants to the U.S. southern border.

See:President Trump’s top trade official opposed tariffs threat on Mexico

Chadha said the toll is comparable to the impact of the European financial crisis in 2011-12, which was also around the time of the U.S. debt downgrade, as well as to the dollar-and-oil shocks that accompanied the collapse of crude prices in 2014-2016.

“In terms of duration, the current episode is still 5-6 months short of those two episodes. But it is notable that the current episode has occurred in a context of significantly stronger U.S. macro and earnings growth and a lower unemployment rate,” Chadha said.

The foregone returns are already equal to 12 years of the U.S.’s bilateral trade deficit with China, he also noted.

“While we subscribe to the consensus view that U.S. trade deficits reflect macro and not micro factors and trade policy initiatives are unlikely to have any impact on them, the point is that even if one did take the opposite view that the bilateral trade deficits are bad and that trade policy would fix them, the cost in terms of foregone equity returns is already worth 12 years of that bilateral merchandise deficit,” Chadha wrote.