Earlier this year, the price of gold hit record highs of more than $5,000 per ounce. Gold is in high demand when investors are worried about the stock market or the economy as a whole. Multiple headwinds could derail stocks this yearThings can change quickly in the market, as investors have seen in recent years. Investing in a gold fund may be a solid move for investorsRather than physically buying gold, investors can invest in the SPDR Gold Shares (GLD -0.20%) fund. When the price of gold was rallying earlier this year, the ETF was up and trading at a new 52-week high.