### Who is this for?

Regular readers of this site will note that each article usually targets a specific platform. However, in order to be as flexible as possible in our direction, this series will not target a specific platform. Instead, we will work within the platform that is best suited to the task at hand. For example, we might explore quick strategy ideas in Tradingview. Alternatively, we might use QuantConnect’s excellent research tools to perform some statistical analysis. Or maybe we will head over to Backtrader when we want to use some funky python packages. Finally, we might even just play around in Pandas. You get the idea… This mini-series is for everyone.### What is Correlation?

This is not the first article on the site that covers correlation. However, for some beginners, it might be their first encounter with the term. As such a brief introduction follows taken from the original article. The term correlation is used to describe a relationship between two variables, items, objects or things. Correlated things move in a proportional manner to one and another and as such, we infer/assume that they have some sort of a relationship. This relationship could be a “cause and effect” type relationship where one variable is driving the other or it could be that they are both affected by the same external factor. When talking about correlation, the following terms are used to describe the relationship between the two items/data points we are looking at:**Positive Correlation:**Is used when`variable A`

increases and`variable B`

also increases at the same (or similar time). For example, one could say that there is a correlation between the number of Big Mac’s a person eats per week and their body fat.**Negative****Correlation:**Also known as an inverse correlation, describes the relationship where`variable A`

increases whilst`variable B`

decreases. Taking the Big Mac example a step further, one might say that there is an inverse correlation between Big Mac’s eaten and life expectancy.**Spurious Correlation:**This is the dangerous one. It is a term given to two items or datasets that appear to have a high correlation but are not actually related. This can easily happen with data sets which are both rising or falling by a proportional amount over a given measurement period. There is a great website that lists some amusing spurious correlations and will allow you to quickly realize that not all correlated items have a valid relationship with each other. You can find that here: http://www.tylervigen.com/spurious-correlations. I particularly enjoyed the correlation between the US cheese consumption per capita and the number of people who died by becoming tangled in their bed-sheets. Stay away from cheese supper folks!

#### Correlation Coefficient

Now we know how to describe correlations, we need some way to measure it. This is where a**correlation coefficient**comes into play. It is a mathematical formula that results in a numerical measure of the correlation between

`-1`

and`1`

where:
- Exactly –1. A perfect downhill (negative) linear relationship
- –0.70. A strong downhill (negative) linear relationship
- –0.50. A moderate downhill (negative) relationship
- –0.30. A weak downhill (negative) linear relationship
- 0. No linear relationship
- +0.30. A weak uphill (positive) linear relationship
- +0.50. A moderate uphill (positive) relationship
- +0.70. A strong uphill (positive) linear relationship
- Exactly +1. A perfect uphill (positive) linear relationship

**Reference:**http://www.dummies.com/education/math/statistics/how-to-interpret-a-correlation-coefficient-r/

## Gold Correlations

Returning to gold, you may sometimes hear that the price of gold is primarily driven by (correlated with) two key factors. First, is the strength of the US dollar and secondly, the US central bank interest rate. The reasons for this are:**Gold is priced in USD.**As such, when the dollar strengthens, gold becomes more expensive to the rest of the world where buyers must convert their local currency into USD before they can pick up the yellow metal.**Opportunity cost.**Gold is considered a safe haven asset. It is something we gravitate to when times are tough as it holds its value over the long term. However, US Government bonds are also considered a safe-haven, risk-free asset (although the risk-free part is debatable!) and they have one important advantage… They pay interest. So as the interests rate rises, the opportunity cost increases. In other words, you are missing out on the opportunity of receiving interest.

**References:**

- https://www.gold.org/what-we-do/investing-gold/golds-drivers-and-price-performance
- https://gbtimes.com/china-tops-gold-consumption-table-for-fifth-consecutive-year

**References:**

- https://www.americanbullion.com/seasonal-demand-why-is-september-important-for-gold/
- https://asia.nikkei.com/Business/Business-Trends/India-s-high-gold-prices-dim-Diwali-consumption

### Preliminary Analysis

Without going into too much detail for an introductory post, let’s at least take a little look at the general correlation between Gold, the US Dollar and Interest Rates. This will form the starting point in our journey and is not too out of place for an introduction. The first chart we compare Gold, the US Dollar Index and the effective federal reserve interest rate over the past 5 year period. (The lines on the chart appear in that order) We can see that the dollar index and gold charts appear to be almost a mirror image of each other. On the other side of the table, it is hard to see any excess declines in gold prices as the federal fund rate begins to increase. So what about if we actually look at a US 10 year bond yield instead? Now it becomes much easier to eyeball a more negative correlation. Finally, let’s remove the prices for the US Dollar index / 10-year bond yield and replace them with correlation coefficient indicators.This slideshow requires JavaScript.

Once we do that, the results become even easier to read. Even with a short look-back period of 4-weeks, the majority of bars show long periods of significant negative correlation. When we increase this to 52-weeks, the longer term trend becomes even more apparent. At the time of writing the US Dollar index correllation coefficient is sitting at levels consistently below -0.8. If we review the breakdown of coefficients above we will note that means there is “strong downhill (negative) linear relationship”. Having said that, the longer term trend does show lengthy periods in the US10Y and even US Dollar in 2014/15 where the correlation decouples. This could suggest a there is a cyclical nature to the key drivers of price.### More to come

To avoid this introduction becoming too long and unwieldy, we will leave it here. In the next article will dive deeper into the topic and provide some actual code to tinker with. Promise!

## Find This Post Useful?

Brave

**Backtest Rookies is a registered with Brave publisher!**

Brave users can drop us a tip.

Alternatively, support us by switching to Brave using this referral link and we will receive some BAT!

Tradingview

**Referral Link**

Enjoying the content and thinking of subscribing to Tradingview? Support this site by clicking the referral link before you sign up!

PayPal

BTC

3HxNVyh5729ieTfPnTybrtK7J7QxJD9gjD

ETH

0x9a2f88198224d59e5749bacfc23d79507da3d431

LTC

M8iUBnb8KamHR18gpgi2sSG7jopddFJi8S