Gold tallies a modest gain after worst week of 2017