As Narendra Modi was storming to victory in the election of 2014, he said that “acchhe din aane waale hain” — good times are coming.

Now as Mr. Modi stands set to secure another term as prime minister in elections starting on April 19, the value of India’s stock market has grown threefold since he first took office. India’s economy is almost twice as big as it was.

Stocks have risen so much because the number of Indians with enough wealth and appetite for investment risk has jumped — to nearly 5 percent of the population from barely 2 percent.

But the economic gains have been widely unequal. The bulk of India’s growth depends on those at the top of the income ladder, including a coterie of huge and tightly controlled businesses.

Ninety percent of India’s population of 1.4 billion is estimated to subsist on less than $3,500 a year. Yet in the poorest rural districts, life has been made more bearable by welfare programs that have expanded under Mr. Modi. Many of the benefits are solid and visible: sacks of free grain, toilets, gas cylinders and housing materials. Purely commercial developments have transformed village life: LED lights, cheap smartphones and nearly free mobile data have changed the nature of idle time.

While America was experiencing a “vibecession,” feeling glum despite upbeat economic news, India has been doing the opposite. Here many of the signals are mixed — but the vibes are fantastic. International surveys show India’s consumers have become the most upbeat anywhere.