Amid trade tensions, Chinese mainland stocks are down almost 30 percent since their peak in January. Despite that fall, the market is still an attractive medium-term buy, according to a top asset management firm.

“We think that on a medium- to long-term horizon, the A-share market looks attractive, and we are looking for entry points,” Amundi Asset Management analysts wrote in a note on Monday, referring to stocks traded on the mainland.

The best opportunities are in domestic and consumption-driven stocks, they said. Bank and property shares are also potential steals, the note added.

“We like home appliances, education, pharma and beverages sectors which are not directly influenced by the risk of an escalating trade war. The Chinese Government has already started to implement some measures to help household consumption and you can expect more of the same. However, we think any further move in that direction will be gradual and targeted,” Angelo Corbetta, Amundi’s head of Asia ex-Japan equity, wrote to CNBC in an email.

China's economic fundamentals also look more solid compared to a few years ago, with systematic risks "under control," the note said.

On July 6, U.S. President administration officially instituted 25 percent duties on $34 billion worth of Chinese goods. China, for its part, swiftly responded by implementing retaliatory tariffs on the U.S. shortly afterward. The following week, the U.S. released a list of Chinese goods with an annual trade value of about $200 billion that may be subjected to 10 percent tariffs.

In a way, the worsening trade tensions are good news for Chinese stocks, according to Amundi, as it is helping to “push China to accelerate its reform agenda” that includes opening up the country’s financial sector to foreign investors.

“The opening-up of China’s financial markets is among the government’s key reforms to facilitate a structural transition towards a high-quality growth model (more focused on domestic demand and higher value added sectors). Overall this should help Chinese equity valuations to remain attractive,” Amundi Deputy Group Chief Investment Officer Vincent Mortier, said in the firm's note.

He added: “It will be favourable to consider China as a new investment asset class in its own right and not just as a part of EM (emerging markets) exposure. This is especially true for long term investors who, in our view, can no longer afford to bypass the Chinese markets for a diversified investment portfolio.”

For now, however, the analysts urged caution in the short term, pointing out that much depends on how the US-China trade relationship unfolds, and how China tweaks its policy in response.

“In the short term, we prefer to remain cautious on both the A-share and H-share markets, at least until we receive more clarity on a near term resolution to negative drivers,” the note said. the term "H-shares" refers to mainland Chinese companies' shares that are traded on Hong Kong's exchange.