Sensex, Nifty end lower for third day; ONGC, Coal India slide

A broker reacts while trading at his computer terminal at a stock brokerage firm in Mumbai

BENGALURU (Reuters) - Indian shares gave up early gains to end lower for the third straight session on Wednesday, as investors booked profits in volatile trading ahead of the federal budget due next week, dragging down commodities stocks the most.

The Nifty closed 0.52% lower at 12,106.90 and the Sensex ended down 0.50% at 41,115.38.

Oil and Natural Gas Corp and Coal India were the top losers on the Nifty 50.

The Nifty metals index fell 1.54%. With a 5% drop, Coal India Ltd was the top decliner on the index.

Zee Entertainment Enterprises Ltd ended 5.7% higher, erasing early losses following its quarterly results.

Analysts expect Indian markets to remain volatile until the announcement of the budget on Feb. 1, which is expected to include measures aimed at reviving economic growth, even as government finances come under pressure.

Some investors may look to reduce their positions ahead of the federal budget, said Saurabh Jain, assistant vice president at SMC Global Securities Ltd in New Delhi.

"Profit-booking is happening in the market ... It's hard to expect any kind of fireworks from the budget."

(Reporting by Sachin Ravikumar; Editing by Shinjini Ganguli)