Zhang bought 20 tickets outside the Jingan Temple that day. "I was lucky," he says now. "I was able to buy 1000 shares in a textile machinery company and with the money I made on those, I bought more shares."

Within three years his 20,000 yuan investment had increased tenfold and he has been in and out of the market ever since.

Zhang is just one of China's more than 90 million retail investors; they now outnumber Communist Party members. Unlike in other countries, investors like Zhang dominate trade on China's tightly controlled exchanges, accounting for as much as 90 per cent of daily turnover.

But not everyone has been at it as long as the retired tour guide. About 40 million of China's retail investors only started trading this year, and they have been on a wild ride.

Between 2010 and 2014, when China was the fastest-growing major economy in the world, its stock markets were among the worst-performing. This year, just as the economy was on track to grow at its slowest pace in a quarter of a century, the market started to rally.

The army of new traders, an expectation of rate cuts and government policy support, and a massive expansion of margin finance, helped fuel a bull market that in the 12 months to June 12 saw the benchmark Shanghai Composite Index surge 152 per cent to its highest level in seven years. The Shenzhen market was up by a similar amount, and the ChiNext, a board for high-tech firms and start-ups, almost tripled. Valuations on some stocks reached dizzying levels – the average price-to-earnings ratio of companies on the ChiNext board rose to more than 100 times – as people rushed to find the next hot stock.

But three weeks ago, the mood changed, and China's markets suddenly moved from bull to bear territory.

Over the past month, they have produced bigger swings than any other market apart from Greece, according to Bloomberg.


China in 2015 finds itself in a similar situation to 22 years ago, when Zhang stumbled across his lottery tickets outside Jingan Temple.

Despite gradual steps toward a market economy, its stock exchanges are still tightly controlled by the ruling Communist Party. Market listings involve a rigorous government approval process and mainland investors have restricted access to foreign stock exchanges. As people started to look around for investments outside the troubled real estate sector this year, there was not enough supply to meet the surge in demand, which led to irrational trading. Now investors are panicking that the party is over and rushing to cover their margin positions.

It's unclear whether the correction will turn into a crash but the recent moves have certainly served to highlight the market's flaws.

"The reason why we have irrational trading on the Chinese market is because supply is tightly controlled," says Chen Heng, an assistant professor at the Hong Kong University's school of economics and finance. "Each stock becomes something you can gamble on."

Chen points out there are fewer than 3000 stocks on domestic markets for mainland investors to focus on. "If you have 7000 or 8000 stocks then maybe the money goes to the best companies," he says. "Right now, the money is going to some bad companies."

What started out as a lottery is now perceived by many as the best casino you will find outside Macau. "I tell people investing is very dangerous," says Zhang. "Do it for fun, but don't do it to make money."

The 59-year old cashed out most of his money from the market in April to buy a two-million-yuan apartment closer to where his daughter lives. He still trades almost every day, in between caring for his young granddaughter, and is unperturbed by the latest falls.

"If I and my friends didn't have the stock market, we would be so bored."


But others have been less fortunate. A bartender in Shanghai, who prefers not to be named, told the AFR Weekend he started investing 10 years ago, when he put 100,000 yuan into the market, but he lost almost all of his money in the 2008 sharemarket crash.

Shanghai's 2008 sell-off 72pc

That sell-off at the height of the global financial crisis wiped 72 per cent off the market from its peak in 2007 – more than $4.5 billion. Many people lost their savings and opted from then on to keep their money in the bank or under the mattress.

However, this year, the Shanghai bartender started to hear about his trading friends making money again.

They said the rally, which came despite a slew of negative economic news, was state-sanctioned.

The government did appear to be encouraging new investors by changing the rules in April, allowing people to open up to 20 trading accounts rather than just one. At the same time, state-run media outlets published a series of positive editorials.

China's bull market "has just begun", a website run by the Communist Party mouthpiece, The People's Daily, trumpeted in April.

Government news agency Xinhua, meanwhile, offered its own explanation of the rally, after critics claimed it was divorced from economic fundamentals.


"The market, while bewildering some traders, stands as a natural reflection of the great expectations for the world's second-largest economy, which is undergoing transformation and restructuring," Xinhua concluded.

The logic appeared to be "buy now and the profits will come later". Proponents of the bull market argued that after four years of underperformance, the market had some catching up to do. Investors began basing their buying decisions on where supportive government policies would be directed next rather than on corporate earnings or business strategies.

The Nasdaq-style ChiNext outperformed because of the government's focus on innovation and the high-tech sector.

They were also anticipating more interest rate cuts and monetary policy easing was likely to boost the market. That resulted in bad economic news being cheered as it meant the government was more likely to intervene.

The Shanghai bartender joined the throng of trading enthusiasts, making an ill-timed return to the market in May with an investment of 40,000 yuan. For a month it looked like a good decision.

But since then, he and China's legion of new traders, most of whom were born after 1980, watched the markets plunge. The falls were not enough to wipe out the previous 12 months' gains but they put a large dent in investment portfolios and hit consumer confidence. Shanghai is down 24 per cent since its June 12 high, Shenzhen has shed 29 per cent and ChiNext is off by almost a third.

Last Friday, as the Shanghai Composite Index dropped by more than 7 per cent, among its worst-ever one-day performances, Guotai Junan Securities vice-president Liu Xin stood up to address a packed room at the Shangri La Hotel in Shanghai's financial district.

He immediately thanked the man sitting in an overstuffed armchair on his left. On the very same day Liu's brokerage was listing on the local market he found himself sharing a panel with one of the most senior officials at the Shanghai Stock Exchange. It was a remarkable debut – Guotai finished up by the maximum 44 per cent – and so his bow of thanks to Xu Ming, the exchange's executive vice president, was unsurprising.


Unfortunately, the rest of the market was in free-fall. The falls could have been much worse but for China's rules that halt trading in a stock when it drops by 10 per cent.

And some analysts say the market's recent declines were triggered by the Guotai IPO, which raised 30 billion yuan, making it the biggest domestic float in China for five years. That meant investor funds were diverted away from existing shares.

"It was heavily oversubscribed; and why not?" wrote J Capital's Anne Stevenson-Yang in a report. "The average return on IPOs in June has been 136 per cent, with some companies' prices rising 20 to 40 times in a matter of weeks.

"Underpriced IPOs assure an exciting launch, and the reports of instant wealth thus provided are a powerful draw for retail investors."

China has promised to change the way it manages IPOs, and that will be key to whether its markets can function rationally. The market has been hit with a flood of IPOs, around 40 a month, since the start of the year. There is speculation the government will suspend IPOs to take the pressure off.

"The Chinese administration doesn't want to see a crash in the stock market," says Hong Kong University's Heng. "They will do whatever it takes to prevent the bubble from bursting."

The government has already reduced market transaction fees and announced rules to allow its pension fund to invest in equities. In a dramatic response to last Friday's market falls, the central bank cut interest rates for a fourth time since November to a record low and reduced banks' reserve requirements.

This week, the government has even flagged that it will ease up on regulation for margin finance despite concerns the correction may be amplified because of the increasing numbers of people borrowing to buy shares. Official margin lending through securities brokerages increased 123 per cent this year to a high of 2.3 trillion yuan on June 18, according to Macquarie Research. That's equal to more than 3 per cent of China's gross domestic product, and margin lending through the "grey channel" is estimated to be at least another 500 billion yuan on top of that.


Finance companies, which don't require minimum trading balances or credit checks, have sprung up, promising to advance investors money "within seconds".

Hong Kong University's Chen believes the market will fall further. "The fundamental force driving the correction is that people are scared."

Zhang is not so sure. He reckons the Shanghai Composite Index will trade up and down within a range of 3800 to 5200 – Thursday's close was 3912.77. And then in 2018, he predicts it will go up to 10,000.

Right now, though, he concedes "it's a vegetable market". In China, stocks flash green – not red – on trading screens when they're falling.