Calculating correlation between assets for a portfolio

A rise in the price of one asset doesn't always mean another asset will move in the same direction. That's exactly why calculating correlation between assets is a practical part of portfolio analysis: it helps you see how genuinely different your positions actually are, and whether you're taking on the same risk under different tickers.
If your portfolio holds tech stocks, crypto assets, and a dollar-linked currency position, this might look like diversification on the surface. However, in a stressed market several of these could drop simultaneously. Correlation doesn't promise protection, but it gives you a data-driven language for understanding where risk is concentrated.
What correlation shows you
Correlation measures how consistently the returns of two assets move relative to each other. Its coefficient ranges from -1 to +1. The key word here is returns, not price: the analysis is typically done using daily, weekly, or monthly percentage changes.
A reading close to +1 means a strong positive relationship. For example, if two assets frequently rise and fall together, their correlation might be 0.80 or 0.90. This doesn't mean their prices are identical or move at the same speed. It only means that the direction tends to match in most cases.
A value near 0 indicates that no clear linear relationship is visible over the given period. A result close to -1 means movement in opposite directions: a rise in one asset is often accompanied by a decline in the other. A perfect -1 or +1 is rare in real markets, especially over longer periods.
The following working framework is useful for reading a correlation result:
- 0.70 to 1.00 or -0.70 to -1.00 - strong relationship;
- 0.30 to 0.69 or -0.30 to -0.69 - moderate relationship;
- -0.29 to 0.29 - weak or unstable relationship.
These thresholds aren't a universal law. A 0.50 correlation between stocks and gold might be significant in one context, while for two similar index funds it could be unexpectedly low.
Calculating correlation between assets step by step
To calculate correlation, you first need to properly define your question. Do you want to assess how two assets interact for short-term trading, or how a portfolio behaves over a long investment horizon? These two tasks require different data frequencies and periods.
1. Select the assets and one type of data
Use closing prices from the same time period for comparison. For example, if you're comparing the S&P 500 index with Bitcoin, take daily closing data for both series. Mixing data of different frequencies will distort the result.
Also account for the trading calendar. The stock market doesn't operate every calendar day, while crypto trades 24/7. A practical solution is to keep only common dates or limit crypto data to the same business days. Mechanically filling in missing values can create an artificial relationship.
2. Convert prices into returns
Comparing prices directly often gives a misleading picture, since different assets have different starting prices and long-term trends. Use percentage returns instead:
`Return = (Today's price / Yesterday's price - 1) × 100`
If an asset rose from 100 to 103, its one-day return is 3%. If another asset fell from 50 to 49, the result is -2%. These two columns of daily changes become the basis for correlation.
More advanced analysis also uses logarithmic returns, especially when aggregating periods or building statistical models. For beginner-level portfolio analysis, ordinary percentage returns are clear and practical enough, as long as you apply the method consistently.
3. Calculate the coefficient
After selecting the two return columns in a spreadsheet, you can use the `CORREL` function. For example, if the first asset's returns are in cells B2:B252, and the second's are in C2:C252, the formula would be:
`=CORREL(B2:B252;C2:C252)`
Some programs separate arguments with a comma, others with a semicolon. The function's logic remains the same. It calculates the Pearson correlation coefficient, which measures the linear relationship between two variables.
The formula is only the final step. It's far more important to verify that both columns have the same dates, the same number of entries, and correct data. Even a single missing row can misalign the series and give you a useless result.
4. Compare several periods
Don't treat a coefficient obtained from one year as a fixed fact. Calculate correlation for, say, the last 30, 90, and 252 trading days. A 30-day window reacts quickly to the current regime, 90 days reduces the impact of random movement, and 252 days shows a picture of roughly one trading year.
If the 252-day correlation is 0.25, but it rose to 0.85 over the last 30 days, that's a significant shift. There may be a macroeconomic shock, reduced liquidity, or a single common factor at play in the market. For a trader, this means that positions previously considered independent have temporarily turned into a single risk.
When correlation is most useful
Correlation is especially useful when determining position size. Suppose you hold several tech stocks plus an instrument linked to a semiconductor index. By name these are five separate positions, but with high correlation you're effectively doubling down on one sector idea.
The same logic applies to currencies and commodities. A currency sensitive to oil prices, an energy company stock, and an oil futures contract may all depend on a single macro factor. Knowing this doesn't mean such positions are forbidden. If your analysis is built precisely around this scenario, concentration can be a deliberate choice. The key is not to take on risk unintentionally.
Correlation can also help you evaluate a hedging idea. If two assets are historically negatively related, a second position might offset some of the volatility of the first. However, you shouldn't open a hedge just because an old table shows a negative number. Assess position size, volatility, spread, commission, and what economic reason actually drives the relationship.
The most common mistakes
The first mistake is treating correlation as causation. If Bitcoin and a tech index rise together over a certain period, this doesn't prove that one is driving the other. Both may be simultaneously influenced by interest rate expectations, dollar dynamics, or investor risk appetite.
The second mistake is making decisions based on a single historical coefficient. Market regimes change. During periods of low inflation, tight monetary policy, crisis, or rapid economic growth, the relationship between the same assets can differ substantially. That's exactly why a rolling correlation is more informative than a single number.
The third mistake is ignoring volatility. Two assets might have a correlation of 0.20, but if one moves 1% daily while the other moves 6%, their weight in the portfolio shouldn't be distributed equally. Correlation shows co-direction, while actual position risk is determined by volatility and the share of capital allocated to it.
The fourth mistake is ignoring the context of the analysis instead of just the prices. Bonds and stocks sometimes have negative correlation, but during a period of rising inflation, both asset classes can come under pressure. A historical relationship is a useful hint, not a guarantee.
A practical workflow for your portfolio
Build a simple correlation matrix for your core positions. List asset names in both rows and columns, calculate pairwise coefficients, and highlight positive relationships above 0.70. After that, look not just at the numbers but also at position weights: two small positions with 0.85 correlation might be less alarming than two large positions with 0.55 correlation.
Update the data weekly or monthly, depending on your style. An active trader will pay more attention to short windows, while a long-term investor will focus on 90- and 252-day figures. In Traders' Hub's practical teaching, such a table works especially well as an exercise, as it shows you how statistics translate into position sizing, stop-level planning, and portfolio discipline.
Ultimately, the best question isn't: are these two assets correlated or not? It's more useful to ask yourself: if market risk appetite changes sharply tomorrow, how many of my positions could be hurt at the same time? A regular, data-backed answer to this question makes your portfolio far more well-considered.


