Japan’s economy and currency weakened somewhat more than expected in 2023, causing it to slide behind Germany to become the world’s fourth-largest economy.

According to current projections, India will pass both countries by 2030 to become the number three economy, behind the United States and China.

Barron’s on Wednesday quoted analysts who said the big problem for Japan was a “sharp fall in the yen against the dollar.” Japan’s economy grew 1.9 percent in 2023 while Germany’s contracted by 0.3 percent, but the yen took a 20-percent nosedive against the U.S. dollar over the past two years.

The weaker yen may have helped Japan with some key exports, such as automobiles, but it left the total value of Japan’s GDP at $4.2 trillion, losing third place in the world rankings to Germany’s $4.5 trillion.

Both Germany and Japan are suffering from worker shortages due to collapsing demographics, but Japan has a much worse problem with birth rates and analysts said Germany’s pro-business policies were better at keeping production high.

Japanese bank officials on Wednesday warned against “rapid moves” in currency speculation that were harming the national economy.

“Recent currency moves are rapid. The yen has weakened by nearly 10 yen over the period of one month or so, such a rapid move is not good for the economy,” said Kanda Masato, Japan’s vice finance minister for international affairs.

Kanda was evasive about whether the government would intervene to protect the value of the yen or not, while Finance Minister Suzuki Shunichi left the press conference without another word when asked the same question.

The Japanese economy may have lost its spot as the third-largest economy — a melancholy coda to predictions in the 1980s that it would soon become the world’s dominant economic force — but as a consolation, the Japanese stock market is on fire right now.

The weak yen is a factor in Japan’s stock market boom, along with Tokyo Stock Exchange reforms, companies taking steps to increase shareholder returns, and Japanese corporate profits soaring. China’s economic troubles are also driving investors to seek alternative Asian markets.

Al Jazeera News reported last week that the 28-percent gain in Tokyo’s benchmark index has all but erased memories of the 1990s market bubble and ensuing decades of market doldrums. The Nikkei 225 index climbed eight percent in January as foreign investors bought $6.5 billion worth of Japanese stocks in just one week.

The apparent end of deflation in Japan is pushing wages up and the government of Prime Minister Kishida Fumio has been canny about encouraging investment over savings.

The stock market news has been so good lately that Japan’s dip into a recession in the last half of 2023 took many analysts by surprise. Some of those analysts expect upward revisions to return the last quarter of 2023 to modest positive growth, and if the yen recovers any significant portion of its value, recession fears should be dispelled.

Meanwhile, India’s GDP is expected to hit $5 trillion within the next three years and $7 trillion by 2030, easily displacing Germany for the number three worldwide position. India was ranked fifth at the close of 2023.

The Indian Finance Ministry in January credited strong domestic demand for the high GDP growth rate, which could reach seven percent in the next fiscal year. The ministry said business-friendly reforms and infrastructure development would be in the policy mix to reach a $7 trillion economy by 2030.