Benchmark indices snapped two sessions of losing streak on Wednesday led by a rally in banking, capital goods and pharma stocks. Sensex ended 547.83 points higher at 55,816 and Nifty gained 158 points to 16,641. Market cap of BSE-listed firms rose to Rs 259.71 lakh crore in the previous session. Sun Pharma, SBI, L&T, TCS and Asian Paints were the top Sensex gainers, rising up to 3.39 per cent.