Investors should respect the market, manage risks and pursue rational investments, Chinese state-run media warned in commentary on Thursday, after Chinese stocks accelerated a recent rally and hit multi-year highs.

Shares in mainland China extended their winning streak into a seventh session on Wednesday, supported by hopes of an economic recovery, a conducive regulatory environment and retail investor enthusiasm.

The commentary said experience suggested that economic fundamentals were always the basis for changes in valuation, and only a long-term bull market could yield sustained profits.

"The tragic lesson of abnormal stock market volatility in 2015 remains vivid, warning that we must promote a healthy and prosperous stock market in a correct posture," the paper said.

The recent stellar performance of China's share market has prompted comparisons to a boom and bust in 2015-2016, fuelled by illegal margin lending, that saw the benchmark Shanghai index fall more than 40% from its peak in just a few weeks.

China's securities regulator published a list of 258 illegal margin lending platforms and their operators on Wednesday to try to tame the bull run and avoid a similar crash.

On Monday, a commentary published by official media said China needs further share market gains to fund a rapidly developing digital economy and strengthen its hand in intensifying power rivalries.

(Reporting by Winni Zhou and Andrew Galbraith. Editing by Gerry Doyle)