Gold futures end with a gain of 0.7% for the week