The Nifty closed up 0.31% at 11,971.05, while the Sensex closed 0.42% higher at 40,794.74. Both indexes have now risen for ten straight sessions.

The Nifty Bank index, which slid as much as 1.5% earlier in the day, erased losses to end 1.63% higher ahead of a hearing at India's top court on waiving interest on loans under moratorium.

Banks are hoping that borrowers will not be given further respite beyond the waiver on compound interest for loans up to 20 million rupees for six months, which the government has agreed to pay.

Top private lender HDFC Bank ended 1.26% higher, while IndusInd Bank rose 2.4%.

Meanwhile, the International Monetary Fund cut its forecast for India's gross domestic product growth, which fell at its steepest pace of 23.9% in the June-quarter. It now expects Asia's third-largest economy to contract 10.3% for the fiscal year.

India's wholesale price index inflation rose to 1.32% in September against 0.16% in August, according to government data.

Wipro Ltd's shares fell as much as 6.9%, the top percentage loser on the Nifty 50, after the company reported a quarterly profit that missed market estimates.

Shares of IT heavyweight Infosys Ltd ended 1.8% lower ahead of its quarterly results later in the day.

The Nifty IT index which has risen 43.7% this year as of Tuesday's close, ended 1.28% lower on Wednesday.

"To justify their valuations, they (IT companies) will have to show good top-line growth," said Anita Gandhi, director at Arihant Capital Markets.

(Reporting by Philip George in Bengaluru; Editing by Ramakrishnan M.)