The price for a troy ounce of the precious metal has gained 14 percent this year. Gold is often viewed as a safe-harbor investment, but it can also be a volatile bet.