China's economic growth has weakened to the slowest pace in nearly three decades this year, the result of a gradual shift to a new economy and a damaging trade war with the U.S.

Its mainland stock market, made up of largely domestic-facing companies, is having a banner year — in fact, it's been the best performing major stock index in the world.

What's happening: China's onshore stocks, dubbed A shares, have delivered more than 37% total return for investors this year, based on the FTSE A share 200 index, FactSet data show.

The A shares' return has towered over other regional markets and the U.S. in spite of the trade war and continued unrest in neighboring Hong Kong.

By the numbers:

China's benchmark Shanghai Composite Index has risen 19% year to date

Japan's Nikkei has gained 18%

MSCI's index of Asian shares, excluding Japan, has risen 13%

Hong Kong's Hang Seng is up 8%

The S&P 500 has gained 23%

What they're saying: China's A shares have been able to shine in large part because they reflect the growth of the Chinese private sector and middle-class consumers, Asha Mehta, senior portfolio manager at Acadian Asset Management, tells Axios.

"The underlying companies in the A share market are broadly quite different and the investors are very different," Mehta says, noting that 80%-85% of investors in the market are retail, rather than institutional investors.

Acadian was one of the first U.S. asset managers granted a license to trade China's onshore market locally in March 2018 and one of the first to develop a fund dedicated to the onshore market.

What it means: China's A shares also have gotten a big boost from the country's deregulation and market liberalization initiatives, the Chinese government's stimulus measures and particularly from increased weighting in MSCI's emerging markets index.

Yes, but: A major reason Chinese securities had previously been excluded from many global benchmarks, including MSCI, is that they have been prone to speculative activity, alleged government interference and a lack of governance.

The bottom line: China has the second-largest stock market in the world and is growing fast, but mainland Chinese stocks are still owned by very few outside China.

Despite continued tension, and congressional attempts to block American investment in Chinese securities, if A shares continue to perform like they have this year, they will likely see significant inflows.

Expand chart Data: FactSet; Chart: Axios Visuals

What's next: China's A shares may have further to go, as inclusion in MSCI's emerging markets index has been a major driver of inflows and more stocks are set to be added.

MSCI announced Thursday that it would increase the A shares' weight in the EM index to 4.1%, drawing billions of dollars from both passive and active fund managers to the stocks.

After adding Chinese stocks to its global benchmarks in 2018, following years of deliberations, MSCI says it plans to increase A shares’ weighting to 20% of the index soon.

The MSCI EM index is tracked by around $2 trillion of funds.

Why it matters: MSCI inclusion is seen as a stamp of approval from the investment community that equities are safe.

If and when A shares are fully included in MSCI's indexes, a full 40% of the MSCI Emerging Markets Index would be made up of Chinese stocks.

Mehta tells Axios she thinks it could rise to an even higher level, potentially up to 50%.

Go deeper: