The China and Hong Kong markets rallied on Thursday, with the US and Iran appearing to step back from escalating their military conflict, and China inflation accelerating at a slower-than-estimated pace in December. The Shanghai Composite Index added 0.9 per cent to 3,094.88 at the close. The Hang Seng Index advanced 1.7 per cent to 28,561, for the biggest gain in about four weeks, as Alibaba Group Holding rose to a record high. The Shenzhen Composite Index, which tracks the performance of shares on the exchange of “China’s Silicon Valley”, climbed 1.8 per cent after the local government announced that the city’s economy grew 7 per cent last year to 2.6 trillion yuan (US$374 billion), surpassing that of Hong Kong for a second year. Traders stepped up buying of risk assets and dumped safe ones after US President Donald Trump said the Iranian attack on Iraqi airbases where US troops are stationed had caused no casualties, suggesting that further military action against the Middle Eastern country was not necessary. Gold futures slid 0.9 per cent for a second straight day of losses. Easing inflation in China improved sentiment too, increasing optimism about possible policy loosening. Consumer prices rose 4.5 per cent from a year ago in December, matching the rate a month earlier, the National Bureau of Statics said on Thursday. The inflation number trailed an estimate of a 4.7 per cent gain put forward by a Bloomberg survey. “With US President Donald Trump choosing discretion over valour … markets went into business-as-usual mode,” said Jeffery Halley, analyst at Oanda in Singapore. “That all means … getting long on Asian post-trade agreement recovery trade, buying equities anywhere and generally hunting for yield in any form. China inflation should wane in the coming months.” China and the US will sign the phase one trade deal next week, with Vice-Premier Liu He, China’s top trade negotiator, flying to Washington from January 13 to 15, Gao Feng, a spokesman for the commerce ministry, said at a briefing after the market closed. Meanwhile, about 800 billion yuan might flow into Chinese stocks in 2020, according to Citic Securities. Overseas investors might contribute about 300 billion yuan, while buy-backs by industry insiders might increase by 48 billion yuan and flows from wealth management companies, insurance firms and social security funds, might reach as much as 440 billion, the brokerage said in a report on Thursday. Among the biggest gainers, Aier Eye Hospital Group jumped 6.8 per cent to 41.44 yuan for its biggest gain since November 2018. The hospital operator said it plans to spend 1.87 billion yuan buying out 30 clinics with cash and new shares. Property developer Poly Developments and Holdings Group rallied 4.9 per cent to 16.28 yuan after it said in a preliminary earnings statement that its profit increased 41 per cent from a year earlier in 2019. In Hong Kong, Alibaba, which owns the South China Morning Post , rallied 2.3 per cent to a record HK$215.60, taking its gains to 23 per cent since a secondary listing in the city in November.