Gold prices closed up for the week at $1,283 per ounce. U.S. stocks fell sharply, with the largest losses occurring in the Technology and Energy sectors.

The majority of this movement was the result of the market digesting a potentially long trade war with China, whereas a fairly quick resolution had previously been expected. While it’s still possible for a quick resolution to be reached, the window is rapidly closing, and the probability of such an event is decreasing.

As would be expected in such times, there was a flight of capital to “safe haven” assets such as Treasurys and gold, while the riskiest stock sectors fell, along with those that are most closely tied to world economic growth (such as Energy).

While it’s impossible to predict when geopolitical events will shake equity markets, a diversifying position in gold can take some of the “bite” out of equity market losses and preserve capital in a portfolio. Last week, gold showed exactly why it is an essential part of any investment portfolio.

While last week’s sell-off was likely overdone, a protracted period without resolution between the U.S. and China will undoubtedly mean further market volatility, and low correlation between equities and gold, further improving gold’s diversifying abilities.