gains in gold stocks pull benchmark out of the red