China has advised college students to shun share investments amid a nationwide craze for stock markets, where many prices have nearly quadrupled in the past 18 months and experts say a dangerous bubble may lurk.

Students have joined pensioners, housewives and people from all walks of life in moving into shares, with a record 300,000 new stock accounts opened daily five days in a row earlier this month.

The Education Ministry has noticed the enthusiasm on campuses, where students have even founded stock-themed "associations," the official Xinhua news agency said on Friday.

"It's not desirable for college students to invest in stocks because their main task is to study and make solid career foundations," Xinhua quoted spokesman Wang Xuming as saying.

"It costs them precious time and energy," Wang said.

"Most students have no stable income other than allowances from their parents... They lack the ability to withstand risks and cannot bear the consequences in case of losses."

In commercial capital Shanghai, home to China's main stock market, the business school of one university plans to hold a stock trading contest to pick a "god of stocks," said one official on condition of anonymity.

Chinese financial officials have expressed concerns the market may be overheating and cautioned the public to be "rational" in investment.

Former U.S. central bank chief Alan Greenspan said on Wednesday the Chinese stock market was heading for a "dramatic contraction."