Gold prices end at highest level since early June, up 0.5% for the week