* Banks drive Vietnam stock market up nearly 9% this year

* Possible index upgrade lures investors despite likely delays

* Vietnam's trade with China less affected by slowdown - analyst

HANOI, Feb 21 (Reuters) - Vietnam's stock market is running ahead of its neighbours and pulling a trickle of foreign investment for the first time in months as its banks bounce back from a credit crunch and the economy charts a path through China's slowdown.

The benchmark index is up almost 9% this year and nearly as much in dollar terms to put it ahead of regional peers such as Malaysia or the Philippines as well as the S&P 500.

Perennial speculation that the market, which dominates "frontier" indexes, could be upgraded to "emerging" status is also gathering steam with J.P. Morgan noting a preliminary decision by index provider FTSE may come as soon as September, in line with an earlier Reuters report.

That would draw further flows to the $200 billion market by opening it to more and larger funds, said South Korea's broker Mirae Asset Securities in a report that noted the return of foreign investors to the market.

Foreigners bought, on a net basis, around $48 million in Vietnamese stocks in January, according to exchange data, the first positive month since March last year.

The Vietnam index lost a third of its value in 2022 as a crackdown on property lending hammered confidence in a market dominated by banks and real estate firms.

It rose 12% in 2023 and lenders have been the main drivers of gains as profits surge and investors bet the worst is over.

Some of the largest banks saw a double-digit rise in their share value, including state-owned VietinBank and private lender Techcombank which have recorded increases of 31% and 22.8%, respectively, so far this year.

Net profit at VietinBank leapt nearly 45% in the fourth quarter of 2023, while Techcombank reported a 25% rise in the same period.

Analysts said banks' good performance was also linked to new regulations approved by parliament in January, including one on land valuations that could reduce banking risks, although the impact of the complex texts is still not fully clear.

CHINA'S WOES, VIETNAM'S GAINS

The performance contrasts with sliding Chinese markets and gloom enveloping the outlook for Vietnam's giant northern neighbour.

The country remains closely interconnected to China which is the source of a large part of components for smartphones or solar panels that manufacturers in Vietnam assemble for export.

But China's economic slowdown is expected to affect Vietnam less than others whose trade with Beijing hinges on exports of raw materials, asset manager Dragon Capital said in a monthly report, such as coal from Indonesia or rubber from Thailand.

Tourism arrivals in January topped pre-pandemic levels and Vietnam continues to attract manufacturers who want to relocate some of their operations from China to reduce trade risks with the United States and cut labour costs.

Foreign investment pledges in January rose 40% from a year earlier to $2.4 billion with more than half of it going to real estate businesses, according to official data.

To be sure, signs of strain remain in the property sector and foreign flows are small. Foreign ownership caps on banks will also be lowered from July, a move that could further restrict investment.

The market upgrade is also likely to face delays, as the government has not yet adopted necessary reforms and the time for FTSE to assess changes may not be sufficient to meet the September deadline, said Trinh Thai, analyst at Vietnam's top broker SSI Securities Corporation.

Even in the best scenario, an announcement by FTSE in September would allow a formal upgrade only in 2025, as six to 12 months are necessary before the actual promotion, according to FTSE procedures.

Still, the index is expected to remain attractive with price-to-earnings ratios far lower than the longer-run average, said Petri Deryng of private equity PYN Fund Management.

($1 = 24,525 dong)

(Reporting by Francesco Guarascio @fraguarascio and Khanh Vu; Additional reporting by Phuong Nguyen; Editing by Tom Westbrook and Jacqueline Wong)