MUMBAI—India’s stocks and currency have outperformed most large economies in the past six months as renewed confidence in the country’s relative economic and political stability have made it an emerging-market haven in uncertain times.

The firm standing of the ruling Bharatiya Janata Party, good economic fundamentals, a prime minister with an appetite for reform and a potential demographic dividend from a young population make the country an attractive bet, bullish investors say.

It is a turnaround from four years ago, when Morgan Stanley bundled India together with Brazil, Indonesia, South Africa and Turkey as one of the “fragile five,” because of its weak currency and economic fundamentals.

“India seems to be standing out from the emerging-market peer group from a political perspective and to some extent from a developed-market perspective,” said David Cornell, chief investment officer of Ocean Dial, which manages $550 million in India.

The Indian rupee has gained close to 6% this year against the dollar, and the benchmark index is up 20%. Only China’s currency is outperforming the Indian rupee and Hong Kong’s Hang Seng Index is outdoing the Sensex.