Mounting concerns over global growth led to heavy declines in stock indices around the world over the past month, but the bucked the trend.
Faltering global growth lies at the heart of the market rout, with recent data from Europe exacerbating concerns.
Last week, the International Monetary Fund downgraded its global growth forecast for the third time this year. Meanwhile, continued tensions between Russia and the Ukraine, and concerns about an Ebola outbreak dampened risk appetite. On Wednesday, the VIX - a market gauge of volatility - spiked 25% to an intra-day high of 28.53 the highest level since December 2011.
Read MoreMarket poll: Should you stay or go?
"Right now it's all about the pre-Fourth Plenum optimism," said Stephen Sheung, vice president and investment strategist at SHK Private, "that's what's supporting the Shanghai market,"
The China Communist Party's fourth party plenum is set to take place on October 20-23 and authorities have indicated that measures will be taken to improve the legal system and the mechanism for overseeing it. Markets interpret progress on reforms as a step towards China's transition to a 'modern economy.'
Sheung also highlighted attractive valuations in Shanghai and Hong Kong as a key driver for money flows into the region. The Shanghai Composite is currently trading at a price-to-earnings ratio of 10.13 times, compared with 18 times for the S&P 500.
Other analysts highlighted the positive impact of domestic macro factors.
When China's economy shows signs of stabilizing, domestic investors tend to pile in, said Wendy Liu, China equity strategist at Nomura. "And I think the Shanghai-Hong Kong Stock Connect certainly won't hurt," she added.
The Shanghai-Hong Kong Stock Connect will allow international investors to buy stocks in Shanghai, and mainland investors to buy stocks in Hong Kong stocks for the first time. It's expected to launch in the next month.
China growth worries
China is due to report third quarter gross domestic product (GDP) next week. Reuters analysts expect the economy to grow 7.3 percent on year, down from 7.5 percent in the second quarter and marking the smallest expansion in five years.
But SHK's Sheung said investors shouldn't worry about slower growth in the third quarter. He expects growth to pick up to 7.5 percent in the fourth quarter, driven by a surge in investment and looser monetary policy.
"There are signs the Chinese government is trying to accelerate growth again in the fourth quarter and this is something you don't see anywhere else in the world," Sheung added.
Chinese authorities announced plans to speed up investment in major infrastructure projects on Tuesday to maintain economic growth in a reasonable growth range.
Investors tend to read far too much into small fluctuations in China's quarterly GDP figures, Nomura's Liu said.
"Every time there is a 20-basis-point fluctuation people react as if its 200 basis points... in every developed market GDP quarter-on-quarter growth can fluctuate a lot," she said, noting that Nomura recently reinvested its 5.5 percent cash weighting back into the China stock market amid attractive valuations.