Gold edges lower, palladium hits record high