Sensex, Nifty post longest gaining streak in a year; Cap goods, PSU stocks lead