The market capitalization of all listed companies in India hit a record 161 trillion ($2.11 trillion) on Thursday, as the rebound in several macro indicators and earnings optimism fired up stocks.

On a global level, though, India remains the last among top 10 countries by market cap. Also, India’s share in world market cap is just 2.3%, even below its historical average of 2.5%.

Even as the aggregate market value has hit a new record, benchmark indices, which represent the top stocks by market cap, are still around 5% below their all-time highs recorded in January, though they are gradually inching closer.

The 30-share Sensex hit the 40,000 mark on Thursday, the first time since February. The Sensex gained 303.72 points, or 0.76%, to 40,182.67. The Nifty index rose 0.82% to 11,834.60.

A good start to the quarterly earnings season led by the IT sector bellwether Tata Consultancy Services Ltd, and expectations of another government stimulus ahead of the festive season have also contributed to the optimism, analysts said.

The surge in global liquidity, balance sheet expansion by central banks, and stimulus measures by governments have contributed to the overall rally in Indian equities for the past few months, said Prasanna Pathak, head-equity and fund manager, Taurus Mutual Fund.

“Since the markets tend to discount the future, it can be argued that markets are expecting a quick earnings revival, speedy approvals for vaccines, and strong global liquidity. So, it will be interesting to see how things pan out in the next 3-6 months. The markets are ignoring many negative news and risks recently," he said.

The rally in equities has been broad-based and supported by non-index stocks too. From March lows, BSE Midcap advanced 53%, BSE SmallCap 71% and BSE 500 rose 57%. Both BSE Sensex and Nifty are up over 55% in the period.

Contribution of Sensex, BSE Midcap and BSE Smallcap to aggregate market cap now stands at 49.06%, 13.70% and 14.25% respectively, against 48.39%, 13.30% and 13.71% in January.

“The broad-basing of markets after almost three years of polarization augurs well as recovery in the underlying economy takes shape," analysts at Motilal Oswal Financial Services Ltd said.

They said management commentaries suggest a temporary halt in premiumization trends across categories, continued cost rationalization initiatives and deferment of capex plans.