How to Screen Stocks for Low Correlation Automatically
Every low-correlation screen starts the same way: you pull end-of-day prices for the names you care about, compute a pairwise correlation matrix, sort the pairs, and keep the ones that move independently. Then the next batch of prices arrives, and you do it again — by hand, in the same spreadsheet, hoping you remembered to add the new ticker.
The repetitive part isn’t the statistics. It’s the maintenance: re-downloading prices, re-aligning date ranges, re-computing a matrix that has grown quadratically, and re-ranking it by hand. This article is about turning that loop into a configured pipeline that runs against cleaned end-of-day prices and hands the surviving candidates straight to the optimizer.
Why Manual Correlation Screening Doesn’t Scale
The task itself is trivial. Doing it reliably, repeatedly, is not.
- The matrix grows faster than your patience. Pairwise correlations grow quadratically with the candidate list. Twenty names is 190 pairs; sixty names is 1,770. At some point you stop reading the grid and start eyeballing the top row.
- Every new price invalidates the ranking. A correlation estimate built on last quarter’s data is not the estimate you want this quarter. Manually, the refresh happens only when you remember to do it.
- Date ranges drift silently. One symbol pulled from a provider with a different history start date, and the correlation you computed is quietly not comparing the same period for every pair.
- The spreadsheet only covers what you remembered to add. Missed candidates are invisible by construction — you can’t notice the absence of a name that was never in the list.
What automation changes is not the math, it’s the freshness and the consistency. The screen runs against cleaned end-of-day prices on your cadence, with the same date range and the same cleaning rules applied to every candidate, so the candidate list reflects the latest data without you rebuilding anything.
Scope note: this article is about the workflow. For the statistics — why weakly correlated returns, and weakly correlated downside, produce a lower-volatility portfolio — see Why Low Correlation Stocks Reduce Portfolio Volatility.
One-Time Setup: Configure the Data Pipeline
Everything below is configured once. This is the part people skip and then blame the tool for.
RSJ Portfolio is a Windows desktop application that builds a statistically optimized portfolio from historic end-of-day prices. It analyses return correlation between stocks and allocates capital to candidates that correlate weakly — or whose downside correlates weakly — using modern portfolio theory. The setup is four decisions:
- Data provider and local currency. Pick a supported provider in the configuration and set the local currency. Every candidate is then quoted on a comparable basis before correlation is computed, which matters as soon as your list stops being single-currency.
- Date range and cleaning settings. Set these once and the price cleaning pipeline applies them consistently to every screening run — gaps and outliers are handled the same way each time, instead of being patched per spreadsheet.
- Candidate list. Build it in the Selection view by searching symbols. This list is the input the automated screen runs against, so it doubles as your definition of the universe.
- Correlation window and measure. Decide up front whether you care about return correlation, downside correlation, or both. If the window changes between runs, the output isn’t comparable between runs.
Record those decisions in version control next to your notes. It costs nothing and saves you from arguing with yourself in three months:
# screens/manifest.yaml — your record of the setup, not a file the app reads
screen: low-correlation-core
data:
provider: <selected in-configuration>
local_currency: EUR
date_range:
start: 2019-01-01
end: 2026-10-23
cleaning: default
correlation:
measure: [return, downside]
window: full_range
candidate_list:
source: selection-view
symbols_count: 42
The count matters. When a run produces a different result than the last one, the first thing you want to know is whether the universe changed — and that number answers it in one glance.
The Automated Screening Pipeline
Once configured, a screen is four stages. You drive them from the app; the work is in the sequence, not the clicking.
Step 1 — Ingest
RSJ Portfolio pulls historic end-of-day prices from the configured provider into the local cache. Because the cache persists, repeated screens don’t re-download the same history. This is what makes a weekly or monthly cadence practical rather than a coffee break.
Step 2 — Clean and align
The price cleaning pipeline handles gaps and outliers, and the configured date range is applied uniformly across the candidate list. This is the stage that removes the “one symbol has a different history window” failure mode — but only if you kept the date range stable between runs.
Step 3 — Correlate
The tool analyses the return correlation between the candidates — and their downside correlation — and identifies the names that correlate weakly. That’s the actual screen: instead of you reading a 42×42 grid, you get the subset worth allocating to.
Step 4 — Allocate
The surviving candidates feed the optimizer, where you select:
- Objective — minimum volatility for pure risk reduction, maximum Sharpe ratio, minimum semi variance, hierarchical risk parity, or conditional value at risk.
- Risk estimator — one of eight risk models. Which one you pick changes the weights, so pick it deliberately and keep it fixed across runs you intend to compare. A side-by-side comparison lives in Portfolio Optimizer with Selectable Risk Models: A Comparison.
- Weight constraints — the limits you want applied to individual positions.
Then export the result and store it next to the manifest.
The hard way, for contrast: you’d own a script that loops over providers, normalises currencies, forward-fills gaps, and rebuilds a correlation matrix on every run — and you’d own the bugs in it too.
# background only: the shape of the script the configured workflow replaces
import pandas as pd
prices = load_eod(candidates) # per-provider quirks live here
returns = prices.pct_change().dropna()
corr = returns.corr() # rebuild on every new price row
pairs = corr.where(~np.eye(len(corr), dtype=bool)).unstack().sort_values()
Every line above has an edge case: load_eod for a provider that doesn’t return the full history, dropna() silently shortening the window for one symbol, corr() on a matrix nobody validates.
Monitoring Runs and Handling Failures
An automated screen still needs a two-minute post-run review. Check three things:
- Did the candidate list change materially? Symbols added, removed, or a count that drifted from the manifest.
- Does the correlation window still match your intent? A date range edited for one experiment and never reverted is the most common source of confusing output.
- Are the objective, risk estimator and constraints the ones you configured? Compare against the manifest rather than memory.
Common failure modes, and where to look:
- Incomplete history for a symbol. The provider returned a shorter series than the configured date range. Diagnose at the cache and cleaning settings; the symptom is a candidate that silently drops out of the correlation set.
- A missing conversion path for a currency. Relevant the moment a candidate is quoted in something other than your local currency — see Portfolio Optimization for Multi-Currency Portfolios: A Guide.
- A date range that excludes too much data. The screen runs, returns a thin matrix, and the optimizer allocates on very little evidence.
Re-run discipline: when a single symbol fails, remove or replace it in the candidate list. Do not loosen the cleaning settings for the whole run to accommodate one bad series — you’ll change the treatment of every other candidate to fix one.
And before you act on any output, run the checks in How to Validate Portfolio Optimizer Output Before You Trade.
Archiving each run is a two-command habit:
mkdir -p screens/2026-10-27
cp manifest.yaml screens/2026-10-27/
git add screens/2026-10-27 && git commit -m "screen: 2026-10-27, 42 candidates, min-vol, downside corr"
Best Practices for Automated Correlation Screens
- Keep the candidate list curated. A screen is only as good as the universe you feed it. Review the list periodically instead of letting it grow unchecked — a name added “just to see” changes every correlation in the matrix.
- Match the objective to the question. Minimum volatility when you want pure risk reduction, minimum semi variance when downside correlation is the concern, hierarchical risk parity when you want a different allocation logic entirely. The trade-offs between the last two are covered in Modern Portfolio Theory vs Hierarchical Risk Parity.
- Use the local cache deliberately. It makes repeated runs fast, which is the point — but confirm the date range still covers the period you intend to analyse, rather than assuming the cache is current.
- Freeze one variable at a time. Changing the correlation window and the risk model in the same run tells you nothing about which one moved the weights.
- Document the configuration with every screen: provider, currency, date range, cleaning settings, objective, risk model, constraints. Reproducibility is the whole payoff of automating the screen in the first place.
FAQ
Can I screen for low correlation without writing code?
Yes. RSJ Portfolio is a Windows desktop application: you configure the data provider, currency, date range, and cleaning settings once, build a candidate list by searching symbols, and the tool computes return and downside correlations and feeds the result into the optimizer. No scripting is required.
How often should the automated screen run?
That depends on your rebalancing cadence and how quickly your candidate list changes. Because the tool works from historic end-of-day prices and a local cache, you can re-run the screen whenever new end-of-day data is available without re-downloading the full history each time.
What data does the screen need, and where does it come from?
The screen uses historic end-of-day prices from a supported data provider, which you select in the configuration. The price cleaning pipeline handles gaps and outliers, and the local cache stores the history so repeated runs are faster.
How does the screen handle portfolios quoted in several currencies?
RSJ Portfolio has a conversion path for portfolios quoted in several currencies. You set the local currency in the configuration, and the tool converts prices before computing correlations, so candidates are compared on a consistent basis.
Conclusion
Manual correlation screening fails quietly: the matrix is stale, the date ranges have drifted, and the candidate you forgot to add is the one that would have done the job. Automating it doesn’t require infrastructure — it requires deciding the provider, currency, date range, cleaning rules, and correlation measure once, then re-running the same configured workflow and reviewing the delta.
That’s the workflow RSJ Portfolio packages: configure the data pipeline, build the candidate list in the Selection view, let the cleaning and correlation steps run against the local cache, and pass the weakly correlated names to an optimizer whose objective, risk estimator and constraints you select. Start with the getting-started guide to set the configuration before your first run, then keep the manifest in version control so every screen is reproducible.
Related posts
- How to Calculate Minimum Variance Portfolio Weights
- Modern Portfolio Theory vs Hierarchical Risk Parity
- Portfolio Optimization for Multi-Currency Portfolios: A Guide