Oil and gas stocks shine in miserable year for US equities