The Nifty ended 1.36 percent higher after marking a lifetime high of 6,591.50, while the Sensex finished 1.38 percent up after touching a record high of 22,074.34.
Banks led the gains on optimism about a recovery in the domestic economy tipped to be growing at its lowest pace in a decade, and bets the Reserve Bank of India would keep interest rates on hold for now at its policy review on April 1.
Foreign investors have been particularly heavy buyers during the rally, with net purchases of $1.6 billion of shares so far this month, sebi report showed.
However, some cautionary voices also are emerging, especially in the near-term when volatility is expected ahead of the expiry of derivative contracts on Thursday.
Inflation risks, high borrowing rates, a weak industrial sector and subdued consumption spending are amongst the main economic challenges facing the next government.
ICICI Bank surged 3.7 percent, State Bank of India gained 1.3 percent while HDFC Bank gained 2.5 percent after marking its record high of 752.90 rupees.
The sector has been one of the top performers this month, with the NSE's bank sub-index gaining about 15 percent so far this month, outperforming the nearly 5 percent gain in the Nifty.Reliance Industries rose 1.9 percent while ITC gained 1.1 percent.Software stocks fell on profit taking and on fears strengthening rupee may hurt margins.Infosys Ltd ended 0.6 percent lower, HCL Technologies was down 1.7 percent while Wipro Ltd fell 1.2 percent.