China just lost its ranking as the world's number two stock market.

After a Thursday slump, Chinese equities were worth $6.09 trillion, according to data compiled by Bloomberg. That compares with $6.17 trillion in Japan. The U.S. has the world's largest stock market at just over $31 trillion.

China's stock market overtook Japan's in late 2014, then soared to an all-time high of more than $10 trillion in June 2015. Chinese equities and the nation's currency have taken a beating this year amid a trade spat with the U.S., a government-led campaign to cut debt and a slowing economy.