The energy sector is keeping the lights on for investors.