China stocks closed up on Wednesday and tracked global peers higher as market sentiment was buoyed by upbeat earnings from U.S. companies and rate-cut relief after data showed U.S. business activity cooled in April.

Lifting sentiment, UBS analysts forecast foreign investors to 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" on Tuesday.

Asian stocks tracked Wall Street higher as an after-hours surge in U.S.-listed shares of electric vehicle maker Tesla and upbeat earnings from some U.S. companies lifted risk sentiment.

Traders also found comfort in data that signalled U.S. business activity cooled in April to a four-month low due to weaker demand, while rates of inflation eased slightly, suggesting some possible relief for the Federal Reserve.

** At the close, the Shanghai Composite index was up 0.76% at 3,044.82.

** The blue-chip CSI300 index was up 0.44%, with its financial sector sub-index higher by 0.15%, the consumer staples sector up 0.11%, the real estate index down 0.3% and the healthcare sub-index down 0.75%.

** The smaller Shenzhen index ended up 1.18% and the start-up board ChiNext Composite index was higher by 0.699%.

** The Hang Seng index closed up 372.34 points or 2.21% at 17,201.27. The Hang Seng China Enterprises index rose 2.45% to 6,100.22.

** The sub-index of the Hang Seng tracking energy shares rose 0.7%, while the IT sector rose 3.97%, the financial sector ended 1.68% higher and the property sector rose 1.81%.

** Chinese artificial intelligence (AI) software developer SenseTime Group Inc were halted from trading, after soaring as much as 36.1%, their biggest one-day gain since January 2022.

** Around the region, MSCI's Asia ex-Japan stock index was firmer by 1.69%, while Japan's Nikkei index closed up 2.42%. (Reporting by Shanghai Newsroom; Editing by Sherry Jacob-Phillips and Ros Russell)