Chinese equities’ terrible, no good, very bad year has been a boost to India. But with energy prices rising and India’s market already very richly valued, buying in now might be a mistake.

The country’s red-hot stock market contrasts sharply with its languishing Chinese counterpart. Regulatory concerns and a property market slowdown have punished the MSCI China in 2021—the index is down 11%. That compares with a 30% gain for MSCI India. The Indian market has probably benefited from investors fleeing Chinese and Hong Kong stocks...

Chinese equities’ terrible, no good, very bad year has been a boost to India. But with energy prices rising and India’s market already very richly valued, buying in now might be a mistake.

The country’s red-hot stock market contrasts sharply with its languishing Chinese counterpart. Regulatory concerns and a property market slowdown have punished the MSCI China in 2021—the index is down 11%. That compares with a 30% gain for MSCI India. The Indian market has probably benefited from investors fleeing Chinese and Hong Kong stocks for a big Asian emerging market that still offers strong growth potential. Indeed, according to Goldman Sachs, India is one of the most overweighted markets for funds invested in emerging markets. Allocations to India for Asia-focused funds are 4.1 percentage points higher than India’s weight in the benchmark MSCI Asia ex-Japan.

Domestic investors are also jumping in. The National Stock Exchange of India said it has more than 50 million unique investors, and has added 10 million in the past half year or so. Inflows into regular mutual-fund investment plans hit a record $1.4 billion in September, according to the Association of Mutual Funds in India.

An Indian tech stock boom has also boosted sentiment, even though many tech stocks have yet to list. Several Indian unicorns—startups valued at more than $1 billion—are coming to market soon, which will change the landscape of the Indian market and boost its weighting in global indexes. At the moment, however, the stock market is still concentrated in financials, energy and IT outsourcers.

Corporate profits are also expected to rebound strongly in coming quarters as the situation surrounding Covid-19 has improved. But much of that growth is already priced in. Almost 77% of the stocks in the Indian index are trading at higher than their pre-pandemic average valuation, compared with 41% for Asia ex-Japan, according to Nomura, which downgraded Indian equities over the weekend. The MSCI India is trading at nearly 24 times next 12 months’ expected earnings—a record premium over other Asian markets, according to Goldman Sachs.

One potential risk is that rising inflation forces the central bank away from its dovish stance. High energy prices may also hurt corporate margins. India has long been heavily dependent on imported fossil fuels.

Given the troubles in China and rising worries over the memory-chip price cycle in Asia, it makes sense to diversify into other Asian markets. But India’s market is already at a strong simmer—particularly given the threat from rising energy prices.

Investors might be wise to take some money off the stovetop before it boils over.

Write to Jacky Wong at jacky.wong@wsj.com