China overtook Japan as the world's second-largest stock market by value for the first time in 18 months, after government stimulus spending and record bank lending boosted share prices this year.

The Shanghai Composite Index rose 1.4 percent Wednesday, sending the value of China's domestic stock market to $3.21 trillion, compared with Japan's $3.20 trillion, according to data compiled by Bloomberg. The Shanghai index has gained 75 percent this year, the best-performing major market, against a 7 percent advance in the Nikkei 225 stock average. The U.S. has the biggest equities market, worth $10.8 trillion.

"China is just entering its stride and is still very much in a growth phase, while Japan is already a developed economy," said Daphne Roth, Singapore-based head of Asian equity research at ABN Amro Private Banking, which oversees about $14 billion.