gold fails to hold gains as stocks trade higher