Correlation between holdings
Correlation measures how closely two holdings move on the same days, on a scale from -1 to +1. Above 0.70 a pair behaves enough like one position that Clavix's portfolio model treats it as one rather than two. Owning ten names is not the same as owning ten independent bets, and the count never tells you which you have.
What correlation between holdings is
Two holdings are correlated when they tend to move on the same days, in the same direction, by related amounts. That is the whole idea, before any arithmetic. If one of the names you own has a bad Tuesday, and a second name almost always has a bad Tuesday too, then on that Tuesday you did not own two positions. You owned one of them twice.
Measured, it collapses to one number between -1 and +1, conventionally written as rho. At +1 the two move in lockstep. At 0 there is no linear relationship across the window measured. At -1 they mirror each other. Most pairs of US equities sit on the positive side, because they share a market.
This is risk rather than a style preference, because it decides what a bad day costs you. Diversification is owning things whose bad days land on different dates, not owning many things. When they land on the same date, the drawdowns stack instead of offsetting, and the book behaves like one larger position in the shared driver.
So the question about your own book is not how many rows it has, but how many separate bets those rows amount to. That number is usually smaller.
How to measure it
The measure
The input is daily log returns, not prices: for each holding, the natural log of today's close divided by yesterday's. A step across a missing or non-positive close produces no return rather than a zero, because a zero asserts that the price did not move, and a gap in the data is not that assertion.
Line two holdings up on the trading dates they both have, then take the Pearson correlation of the two aligned series. That is the -1 to +1 figure. Clavix does it pair by pair rather than off one shared calendar, because intersecting dates across a whole book lets one recently listed name shorten the window for every other pair.
Two windows are computed and stored separately, 90 trading days and 250: roughly a quarter and roughly a year, one responsive and one stable. They are never blended, because their disagreement is the information. Low over 250 days and high over 90 is a relationship that has recently tightened, and it is live now. High over 250 and low over 90 is one that has loosened, which is much weaker: a single quiet quarter does not undo a year of shared behaviour.
A pair also needs at least 60 overlapping daily bars, roughly a quarter of trading, before any figure is reported. The model calls 60 the shortest window where a correlation estimate is worth putting on a screen next to a dollar figure. Below it the pair carries no correlation and its shared-bar count instead, so the useful sentence survives: not just that the number is missing, but that the two shared only 11 days.
A worked example
Say you own five things and believe you own five bets. Call them A through E: printing a correlation for two named real stocks would be inventing a fact about those securities. Five holdings make ten pairs, 5 times 4 divided by 2. Each pair gets its own rho in each window, and then the ten numbers are clustered.
Take A and B over the 250-day window, about 250 daily moves each. What does a rho of 0.85 look like day to day? The two land on the same side of flat on the large majority of days, and on the biggest days they are close to indistinguishable. There is a clean approximation for that first part, exact if daily moves came from a well-behaved bell curve: the share of days two holdings land on the same side of flat is 0.5 plus arcsin(rho) divided by pi. At rho 0.85 that is about 82% of days. At rho 0.30 it is about 60%, barely better than a coin toss, and the sizes of the moves are mostly unrelated even when the directions agree. That gap is the gap between one bet and two.
Now the cut. The 0.70 line becomes a distance, because clustering works on distances: d = sqrt(2 * (1 - rho)), which puts the cut at 0.7746. Perfect correlation is distance 0, zero correlation is 1.414, a perfect inverse is 2. Average linkage merges the two closest clusters and stops when the closest remaining pair is further apart than 0.7746.
Suppose A, B and C all clear 0.70 with one another while D and E clear it with nothing. Five rows resolve into three clusters: one of three names, two of one. If A, B and C are 20% of the book each, that cluster is 60% of your money behaving as one position. You own five things and carry three bets, and the largest is most of the portfolio.
Run the same five through the 90-day window and the membership can come out differently. That is not the model contradicting itself. It is two questions with two answers.
What counts as high correlation
Every number below is a fixed constant in Clavix's portfolio interaction model, stamped with a version. Fixed is the point: a threshold recalculated per portfolio makes clusters flicker day to day, and the model's own comment names that as the same disease as grade churn. For the per-holding side of the model, the free portfolio grader takes three to twenty holdings and returns a grade in about a minute, with no account.
The correlation constants
- rho 0.70 is the cluster cut, called in the model the conventional line for two names moving together enough to be one bet.
- 0.7746 is that cut as a distance, from d = sqrt(2 * (1 - 0.70)). Clustering consumes the distance; the constant a human can argue about is the correlation.
- 90 and 250 trading days are the two windows, computed and stored separately, never blended.
- 60 overlapping daily bars is the minimum for any pair. Below it, the pair reports no correlation and its shared-bar count instead.
- 252 trading days per year is the annualisation factor for volatility derived from these returns.
- Unknown, never 0.0. A correlation that cannot be computed is reported as missing, and missing is never rendered as zero.
Every figure above is a constant in the interaction layer of the Clavix portfolio model (backend/app/pipeline/portfolio_interaction.py), stamped interaction-v1. Snapshots keep the version they were computed under and are never recomputed under a newer one.
What 0.70 does not mean, in both directions. Below it is not diversified: two holdings at 0.60 still move together on most days, they are just not so close that calling them one position is the better description. There is no correlation at which two US equities become unrelated. Above it is not identical either: 0.72 and 0.96 land in the same cluster and are not the same situation, which is why each cluster reports the mean correlation among its members.
The asymmetry people miss is when the number was taken. Correlations tend to rise when the market falls, so a pair measured across a calm quarter is measured in exactly the conditions where it looks most independent. The reading you want is the one from the bad period, and by construction it is the one you have the least data for.
Why a correlation that cannot be computed is unknown, never zero
This is the rule the whole layer is built around, and it deserves to be stated as bluntly as the code states it. If two holdings cannot be lined up on 60 shared trading days, the answer is unknown. It is not 0.0.
A 0.0 correlation is not a missing value wearing a number. It is a claim, and the claim is independence: these two do not move together, so owning both is safer than owning either alone. That is the single most flattering thing a risk model can say about a pair, and it is not something to say by accident because two tickers failed to overlap. The same covers a name that did not move at all across the window: its correlation with anything is a division by zero, and the standard numerical answer compares false against any threshold you test it with, which reads downstream as uncorrelated and therefore diversifying. So it is dropped, and the exclusion is reported.
The binding rule is one sentence: missing data lowers confidence and never improves a risk score. Each portfolio-level output carries its own coverage figure, so many pairs computed of so many possible, and names which holdings were left out and why: no price history, insufficient history, insufficient overlap, no price movement. A dashboard fills a gap with a default, because a blank cell looks broken. A risk model refuses, because a default that flatters you is worse than a blank.
Why correlation hides in a portfolio that looks diversified
Correlation is not a property of a stock. It is a property of a pair, so it has nowhere to appear on a per-holding screen. Your brokerage shows you rows, and every risk figure on a row (a grade, a volatility number, a sector label) describes that one security alone. There is no column for how a holding behaves next to the one above it, because the answer changes with which row is above it.
So the row count fills the gap. Twenty rows feel diversified in a way four rows do not, and the arithmetic disagrees: four holdings make six pairs, twenty make 190, and each of those 190 is a place independence can fail. Rows grow one at a time. Pairs grow much faster, and only the pairs decide whether the bets are separate.
The shared driver is usually invisible in the names. Different companies, different sector labels, one force underneath: the path of interest rates, the level of the dollar, one end market such as data-centre capital spending, sometimes one customer common to several of them. A software firm, an industrial property owner and a regional bank look like three sectors. If the market prices all three off the front end of the rate curve, it treats them as one story on the days that matter.
And the way this gets built is careful, not sloppy. You research a theme, find it convincing, and end up owning the two or three best expressions of it, sitting in different sectors, which reads as diversification everywhere you look. Each name was chosen on its own merits. The bet was chosen once.
How Clavix reads this
Everything above is Clavix's published measurement approach for interaction risk: fixed thresholds, a stamped model version, a minimum bar count, an explicit coverage figure, and an explicit unavailable state in place of a zero. It sits alongside the per-security work in the grading methodology, which produces the letter grades on 1,000 US stocks and ETFs every trading day.
What you can reach today is narrower than this page, and saying so is worth more than implying otherwise. The free grader returns one A+ to F grade for the whole book, built from three layers: asset quality, which is each holding's own grade weighted by how much of the book it is, less a penalty for how much of the money sits in the largest names, less a penalty for how much those names move together. That third layer does measure co-movement, over a rolling year of daily closes, which is a change from what this page used to say. What it does not do is show the working. There is no correlation matrix and no cluster map, and the grader will not name the pair.
That gap is why this page is arithmetic rather than a product tour. Every step here runs on a closing-price download and a spreadsheet: daily log returns, one Pearson correlation per pair, a 0.70 line, a bar count you refuse to go below, and a blank cell you refuse to fill with a zero. More on what the product does and does not do in what Clavix is.
Check your own portfolio
The grader will not tell you which of your names are one bet, and this page has been direct about that. What it will tell you is how much of a single bet the book is overall, as one independence score, and which of its four layers is dragging your grade down hardest. Which pair is doing it stays with the model below.
The free Clavix grader
- Takes three to twenty holdings, entered by ticker and either a share count or a dollar amount. Below three it declines to grade rather than grading thinly, because two of the four things it measures describe how holdings behave together.
- Returns one A+ to F grade for the whole book, built from three layers: asset quality, less a penalty for how much of the money sits in the largest names, less a penalty for how much those names move together.
- Measures a fourth, stability, from how the book has actually behaved, and reports it beside the grade rather than inside it.
- Names the weakest of those four layers. It does not break the grade back out into the five per-ticker dimensions; for those, open a name in the stock risk directory.
- Weights by position value when you give share counts or amounts, and equally when you give neither. It tells you which it used.
- Names any ticker it does not cover and leaves it out, rather than dropping it quietly.
- No account, no email, no brokerage connection. Your tickers are sent to be scored and are never stored: no record of your holdings is kept.
Frequently asked questions
What is a good correlation between stocks in a portfolio?
There is no single good number, but there is a working line. Clavix cuts at a correlation of 0.70, described in its portfolio model as the conventional point where two names move together enough to be one bet. Below that they are partly independent, not fully independent. Correlation is a spectrum, and 0.69 and 0.71 are not different worlds.
How do you calculate correlation between two stocks?
Take each stock's daily closing prices, turn them into daily log returns, line the two series up on the trading dates they share, and run a Pearson correlation across that window. Clavix uses two windows, 90 trading days and 250 trading days, and requires at least 60 shared daily bars before it will report a figure at all.
What does a correlation of 0.7 mean?
It means two holdings moved in the same direction on most days of the window measured, and by roughly proportional amounts. It does not mean they are the same security, and it does not mean they will keep moving together. Clavix converts 0.70 into a clustering distance of 0.7746, using d equals the square root of 2 times 1 minus rho.
How many stocks do I need to be diversified?
The count is not the measure. Five holdings make ten pairs and twenty make 190, and diversification lives in those pairs rather than in the number of rows on a screen. A portfolio of twenty names all driven by one interest-rate story is closer to one bet than a portfolio of four names with four unrelated drivers.
Do stock correlations rise in a market crash?
They tend to. In a falling market, prices across very different companies start responding to the same news on the same days, and pairs that looked partly independent in a calm quarter converge. That is why a correlation measured in a quiet window is the optimistic reading, and why Clavix stores a 90-day and a 250-day figure separately rather than blending them.
Does Clavix show me the correlation between my holdings?
Partly, and this changed. The free grader at getclavix.com/grade returns one grade for the whole book, and one of the three layers behind it is independence, which compares how your holdings actually moved against each other over the past year and marks the grade down when they move as one. So co-movement does reach the number. What the grader will not show you is which pair: there is no correlation matrix and no cluster map, only the single independence score. The model on this page is the published measurement behind that idea, written out so you can run it yourself.
For educational purposes only. This page explains how a risk measure is calculated; it is not investment advice, not a recommendation about any security, and not a prediction of return. Clavix is not a broker-dealer or a registered investment adviser. Consider consulting a licensed professional before making investment decisions.