gold prices end lower, but finish higher on the week