Gold futures finish nearly flat for the week