gold ends higher, but loses 1.2% on week