gold futures end lower for the day, up for the week