gold advances, oil posts losses after u.s. outlook