The broader NSE index ended up 0.68% at 11,023.25, while the benchmark BSE index closed 0.71% higher at 37,332.79. For the week, the NSE index gained 1.79% and the BSE index added 1.72%.
Pharma and fast-moving consumer goods stocks led the gains, with their indexes closing 2.02% and 1.76% higher, respectively.
Yes Bank ended 1.11% higher, while Sun Pharma closed up 3.62%. They finished the day as the top gainers among the blue-chip stocks.
Among losers, Bharti Infratel ended 3.1% lower.
Domestic investors awaited GDP data for the April-June quarter due later in the day.
Metal and mining stocks were the top gainers on the NSE index, with the Nifty metals index rising as much as 1.61%. Of the 15 constituents on the metal index, 14 stocks were trading in the positive territory.
The Nifty PSU bank index that tracks state-owned lenders rose as much as 0.98%, with a 1% rise in State Bank of India.
Among the losers, shares of rating agency ICRA Ltd slipped as much as 4.68%. The Indian unit of Moody's Investors Service on Thursday said it had removed Chief Executive Officer Naresh Takkar.