Equity benchmark indices shaved off early gains but closed in the positive terrain on Thursday ahead of the expiry of August series derivative contracts.