The Sensex and Nifty ended higher by nearly 0.4 per cent due to short-covering by investors ahead of November derivatives expiry and a firm global trend.

Domestic equities rose for a second straight session on Wednesday, the first back-to-back gains since the government's shock move to withdraw high-value banknotes from circulation.

The 30-share BSE index Sensex ended higher by 91.03 points or 0.35 per cent at 26,051.81 and the 50-share NSE index Nifty closed up 31 points or 0.39 per cent at 8,033.30.

All BSE sectoral indices ended in the green. Among them, realty index gained the most by 3.41 per cent, metal 2.32 per cent, healthcare 2.19 per cent and capital goods 1.3 per cent.

Top five Sensex gainers were Lupin (+5.22%), Asian Paints (+3.87%), Tata Steel (+3.8%), NTPC (+2.63%) and L&T (+2.16%), while the major losers were M&M (-2.02%), HDFC (-1.72%), Bharti Airtel (-1.22%), Power Grid (-1.22%) and HDFC Bank (-1.04%).

Sageraj Bariya, VP-Institutional Sales, East India Securities, said: "Indian markets are seeing relentless unwinding on doomsday prophecies ranging from a 1% - 3.3% decline in GDP growth. We strongly disagree with these prophecies and are reminded of similar sentiment surrounding Brexit & Trump presidency and we all know how those doomsday prophecies ended up. We believe that these negative sentiments will change as soon as new currency comes back into the system. In the first 8 days, new currency equivalent to 10% of the outstanding demonetised currency was pumped into the system and even if we go by the same rate we will have almost 50% + new currency in the system by December end. Also we expect some strong measures from the government / policy makers - Sharp rate cut / Uptick in govt spending / possible cut in fuel prices, in order to boost the sentiment. Additionally the global set up for equities looks quite promising which should further stem the negative sentiments. While we do expect a 1-2 qtr of slowing economy but we also believe that most of it is in price and the current markets offer excellent opportunity for long term investors."

Global markets

Financial markets showed the diverging path of US and euro zone monetary policy on Wednesday with Wall Street breaking new ground and the dollar perched near a 14-year high, as German bond yields plumbed new record lows.

World stocks edged up and the Dow closed above 19,000 for the first time with investors expecting a growth boost under the policies of US President-elect Donald Trump and an imminent rate hike from the Federal Reserve that should be reinforced by minutes released later in the day.