The S&P 500 energy sector bucked the broader market trend to rally on Thursday, bolstered by Transocean Ltd. RIG, -1.95% which reported better-than-projected second-quarter earnings late Wednesday. Several notable energy companies, including Diamond Offshore Drilling Inc. DO, -1.43% Newfield Exploration Co. NFX, -1.55% and Pioneer Natural Resources Co. PXD, -2.95% also turned in results which beat expectations, defying concerns that weak energy earnings will weigh on the S&P 500. "Upside earnings surprises reported by companies in multiple sectors--led by the energy sector--accounted for the decrease in the [earnings] decline this past week," John Butters, senior earnings analyst at FactSet, said in a report. Other big energy gainers include Chesapeake Energy Corp. CHK, +1.59% which announced a lower rig count and cost reductions and Ensco PLC ESV, -2.74% which posted stronger-than expected earnings recently.