The BSE Sensex retreated from record highs hit earlier in the session to end flat as profit-taking hit blue-chips such as Infosys on caution ahead of the release of quarterly earnings and inflation data next week. Foreign investors have been heavy buyers of Indian shares, buying $173.50 million worth of shares on Wednesday, totalling $4.7 billion so far in 2014. But domestic institutional investors are much less subdued in their buying. Life Insurance Corp was spotted selling information technology and bank shares after a recent rally, said four dealers at brokerages that handle trades on behalf of India's largest state-run insurer. "Indian stock market performance in recent times has been driven by hopes of a favourable election outcome. In my view, India's ability to take control of current account problem has helped the economy," said Atul Kumar, equity fund manager at Quantum's equity funds. The benchmark Sensex rose as much as 0.4 per cent to its life-high of 22,792.49, while the Nifty rose 0.33 per cent to a record 6,819.05. However, both indexes ended flat, with the Nifty ending unchanged and the Sensex ending up 0.06 per cent higher.