Correlation Coefficient (CC)

Definition

Correlation Coefficient (CC) is used in statistics to measure the correlation between two sets of data. In the trading world, the data sets would be stocks, etf's or any other financial instrument. The correlation between two financial instruments, simply put, is the degree in which they are related. Correlation is based on a scale of 1 to -1. The closer the Correlation Coefficient is to 1, the higher their positive correlation. The instruments will move up and down together. The higher the Correlation efficient is to -1, the more they move in opposite directions. A value at 0 indicates that there is no correlation.

High Positive Correlation

History

Correlation Coefficient is used not only in finance, but in statistical analysis spanning many different topics. It has been in use for hundreds of years.

Calculation

The Correlation Coefficient calculation uses Closing Prices. The below example will be made using the Closing Prices over 12 periods for the SPY and JPM:

numbers may vary slightly due to rounding

PERIOD
DATE
SECURITY 1
SECURITY 2





Date
SPYJPM




18/1/2013
170.6656.54
28/2/2013
170.9556.40
38/5/2013
170.7056.10
48/6/2013
169.73
55.49
58/7/2013
169.1855.30
68/8/2013
169.8054.83
78/9/2013
169.3154.52
88/12/2013
169.1154.09
98/13/2013
169.6154.29
108/14/2013
168.7454.15
118/15/2013
166.3853.29
128/16/2013
165.8351.83

All of the necessary data will need to be set up (preferably in a table) which can be done in three steps.

1. First, every period needs to be squared for both securities.

PERIOD
DATE
SECURITY 1
SECURITY 2








Date
SPY
JPM
SPY Squared 
JPM Squared





18/1/2013
170.6656.5429124.84
3196.77
28/2/2013
170.9556.4029223.90
3180.96
38/5/2013
170.7056.1029138.493147.21
48/6/2013
169.73
55.4928808.27
3079.14
58/7/2013
169.1855.3028621.87
3058.09
68/8/2013
169.8054.8328832.04
3006.33
78/9/2013
169.31
54.5228665.88
2972.43
88/12/2013
169.1154.0928598.19
2925.73
98/13/2013
169.6154.2928767.55
2947.40
108/14/2013
168.7454.1528473.19
2932.22
118/15/2013
166.3853.2927682.30
2839.82
128/16/2013
165.8351.8327499.592686.35

2. Multiply the each period value of SPY by each period of JPM. Notice the last column.

PERIOD
DATE
SECURITY 1
SECURITY 2











Date
SPY
JPM
SPY Squared JPM SquaredSPY xJPM







18/1/2013
170.6656.5429124.84
3196.77
9649.12
28/2/2013
170.9556.4029223.90
3180.969641.58
38/5/2013
170.7056.1029138.493147.21
9576.27
48/6/2013
169.73
55.4928808.27
3079.14
9418.32
58/7/2013
169.1855.3028621.87
3058.09
9355.65
68/8/2013
169.8054.8328832.04
3006.33
9310.13
78/9/2013
169.3154.5228665.88
2972.439230.78
88/12/2013
169.1154.0928598.19
2925.73
9147.16
98/13/2013
169.6154.2928767.55
2947.40
9208.13
108/14/2013
168.7454.1528473.19
2932.22
9137.27
118/15/2013
166.3853.2927682.30
2839.82
8866.39
128/16/2013
165.8351.8327499.592686.358594.97

3. Find the Average Value for each column.

PERIOD
DATE
SECURITY 1
SECURITY 2











Date
SPYJPM
SPY Squared JPM SquaredSPY xJPM






18/1/2013
170.6656.5429124.84
3196.77
9649.12
28/2/2013
170.9556.4029223.90
3180.969641.58
38/5/2013
170.7056.1029138.493147.21
9576.27
48/6/2013
169.73
55.4928808.27
3079.14
9418.32
58/7/2013
169.1855.3028621.87
3058.09
9355.65
68/8/2013
169.8054.8328832.04
3006.33
9310.13
78/9/2013
169.3154.5228665.88
2972.439230.78
88/12/2013
169.1154.0928598.19
2925.73
9147.16
98/13/2013
169.6154.2928767.55
2947.40
9208.13
108/14/2013
168.7454.1528473.19
2932.22
9137.27
118/15/2013
166.3853.2927682.30
2839.82
8866.39
128/16/2013
165.8351.8327499.592686.358594.97

Average
169.1667
54.7358
28619.6762
2997.7049
9261.3142

Now that all of the data has been properly arranged in a table, the rest of the formula can be completed. This portion can be done in three steps as well.

  1. Calculate the Variance for both securities. Variance = Squared Average - (Average Value * Average Value)
    SPY Variance: 2.3151
    JPM Variance: 1.697
  2. Calculate the Covariance of the securities. Covariance = (Average Value of Security1 x Security2) - (Security1 Average Value x Security2 Average Value)
    SPY & JPM Covariance = 1.8395
  3. Calculate the Correlation Coefficient.Correlation Coefficient = Covariance / SQRT(Security1 Variance x Security2 Variance)

SPY & JPM Correlation Coefficient = 0.9432

The basics

Even though The Correlation Coefficient (CC) moves within a band of 1 to -1, it is not considered an oscillator. Values fluctuate between positive and negative correlation, indicating how closely their prices move together. A Correlation Coefficient of +1 is perfect positive correlation and they move in perfect synch. A Correlation Coefficient of -1 is perfect negative correlation and they move in exact opposite directions. Both of these extremes are rare and the Correlation Coefficient will often fluctuate somewhere between the two. Correlation Coefficient of 0 is the middle point indicating that there is currently no correlation between the two instruments.

High Negative Correlation

What to look for

As opposed to a lot of technical analysis indicators, The Correlation Coefficient is ideal for longer-term investing. If in an investor is going for a truly diversified portfolio, then the Correlation Coefficient can come in quite useful. It can help you determine for diverse the assets in your portfolio are from one another. In other words, by having instruments with low correlation, unnecessary, duplicated risk can be avoided.

Summary

As previously mentioned, The Correlation Coefficient can be a useful tool in assembling a diverse portfolio. One thing to always keep in mind however, is the correlation between two instruments can and does change from time to time. This indicator will help the trader to be aware of such changes and alter their investments accordingly.

Inputs

Symbol

The second instrument which will then be compared to the original instrument on the chart.

Length

The time period to be used in calculating the correlation. 20 days is the default.

Source

Determines what data from each bar will be used in calculations. Close is the default.

Style

Correlation

Can toggle the visibility of the Correlation Coefficient as well as the visibility of a price line showing the actual current value of the Correlation Coefficient. Can also select the Correlation Coefficient's color, line thickness and visual style (Area is the Default).

Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Cách thức hoạt động Tính năng Biểu đồ Trả phí Giới thiệu bạn Quy tắc Áp dụng Trung tâm Trợ giúp Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Blog & Tin tức Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất