Mainland China stocks ended higher on Thursday and Hong Kong closed at a five-month high, as sentiment improved after strategists from global investment houses upgraded their views on Chinese shares.

** HSBC said earlier in the day that its funds have built significant exposure to mainland China equities.

"Global emerging market (GEM) funds have rolled back on their underweight on mainland China and turned neutral, while Asia's funds exposure on the market is now at a seven-month high," strategists at HSBC said in a note.

** Earlier this week, UBS analysts forecast foreign investors would gradually return to China's market via the Stock Connect as market sentiment and the macro environment improve. The bank's strategists upgraded MSCI China equities to "overweight".

** "The largest stocks in the China index have been generally fine on earnings/fundamentals," Sunil Tirumalai, chief GEM equity strategist at UBS, said in a note. "So China underperformance is purely due to valuation collapse." ** At the close, the Shanghai Composite index was up 0.27% at 3,052.90. ** The blue-chip CSI300 index was up 0.25%, with its financial sector sub-index higher by 0.95%, the consumer staples sector down 0.1%, the real estate index up 0.76% and the healthcare sub-index up 0.36%. ** The smaller Shenzhen index ended up 0.21% and the start-up board ChiNext Composite index was unchanged. ** At the close of trade, the Hang Seng index was up 83.27 points or 0.48% at 17,284.54, its highest closing price since Nov. 28, 2023. The Hang Seng China Enterprises index rose 0.33% to 6,120.37. ** The sub-index of the Hang Seng tracking energy shares rose 1.5%, while the IT sector dipped 0.8%, the financial sector ended 1.33% higher and the property sector rose 1.53%. (Reporting by Shanghai Newsroom; Editing by Mrigank Dhaniwala and Rashmi Aich)