Gold rebounds above $5,000 an ounce; silver snaps back after wild swings