Indian shares erased gains, tracking a slide in financials as investors booked profits after strong quarterly earnings reports ahead of the federal budget due next week.

The Nifty 50 index closed flat at 18,118.30 on Tuesday, while the S&P BSE Sensex rose 0.06% to 60,978.75. Both benchmarks had risen nearly 0.5% each during the session.

Their intraday trajectory followed the high-weightage financials, which closed 0.01% higher, paring most of the intraday gains after rising as much as 0.62% during the session.

Private lender Axis Bank Ltd fell 2.41% despite posting a stronger-than-expected jump in third-quarter profit on Monday. The stock had logged gains in each of the last five sessions ahead of its results, adding 2.14%.

"The third-quarter earnings from financials have been strong. Fundamentally, there is nothing wrong with the space," said Narendra Solanki, head of fundamental research at Anand Rathi Shares and Stock Brokers.

"The volatility is driven by investors taking profit from financials as the strong earnings have been priced in," Solanki added.

Markets will likely see further consolidation ahead of the Union budget, which could entail a higher allocation for social sector programmes, analysts said.

Twenty-one of the Nifty 50 constituents advanced, with Tata Motors, Maruti Suzuki, Bajaj Auto among the top gainers.

The Nifty 50 would continue to trade in a 450-point range between 17,800 and 18,250 ahead of the Union budget due to high valuations and foreign selling, said Siddhartha Khemka, head of research (retail) at Motilal Oswal Financial Services.

Among the major sectoral indexes, auto rose 1.28% after strong third-quarter numbers from Maruti Suzuki lifted the sector.

IT index gained 0.77% tracking a rise in the technology-linked NASDAQ Composite index(up 8.6% in 2023 so far) on easing global recession concerns and strong quarterly earnings.

The flash PMI data from the U.S. and eurozone coming later in the day is expected to show less severe economic contractions in December than in the previous month. ($1 = 81.4830 Indian rupees) (Reporting by Bharath Rajeswaran and Rama Venkat in Bengaluru; Editing by Nivedita Bhattacharjee and Janane Venkatraman)