Lenders and power companies paced the rally.
ICICI Bank and NTPC rose at least 3.6 per cent, pacing gains in the benchmark gauge.
The Sensex rose 0.6 per cent on Friday, taking its weekly advance to 3.4 per cent, the most since May 2016.
“The return of foreign flows is cheering the markets as local funds, which supported the stocks when overseas investors sold, continue to buy,” said Hemen Kapadia, senior vice-president for institutional equities at K R Choksey Shares & Securities Pvt.
This trend will continue for ‘some time’, he said.
Overseas investors bought $101 million (Rs 687 crore) of local shares in the five days through January 20, the first purchase for the period in six weeks.
They pulled out nearly $4 billion (Rs 26,800 crore) in the last two months amid a selloff in emerging markets after the US presidential election and concern that India’s decision to scrap 86 per cent of its currency bills would slow economic growth.
Local funds purchased nearly Rs 23,000 crore ($3.4 billion) of stocks in the last two months, according to data compiled by Bloomberg.
The Sensex has held its 200 day moving average after breaking above the level on January 10.
The gauge rallied more than 13 per cent in four months the last time it broke and held above its 200 day mean in May 2016.