How to Reduce Portfolio Volatility Using Correlation Analysis
You already know which stocks you want to own. What you don’t know is how much of each to buy. Pick ten names that all sell into the same cycle and the portfolio swings as if it were a single stock. Pick ten names that move for different reasons and the same expected return arrives with a gentler ride. That difference is correlation, and unlike most things in markets it is actually measurable from historic end-of-day prices.
This is a walkthrough of the measurement and the allocation that follows from it. By the end you will have a statistically optimized portfolio built from historic end-of-day prices, with capital allocated to candidates that correlate weakly — or whose downside correlates weakly. The workflow runs in RSJ Portfolio, a Windows desktop application that computes the correlation analysis and performs the allocation using modern portfolio theory, with selectable objectives, risk estimators and weight constraints.
You could also build the covariance matrix and solve the quadratic program yourself. That is the hard way: a data pipeline, a cleaning layer, a solver and a lot of debugging before you see a single weight. The five steps below are the short way.
Prerequisites
- Historic end-of-day prices for your candidates. RSJ Portfolio supports several data providers, and includes a price cleaning pipeline and a local cache, so you are not maintaining a downloader yourself.
- A Windows machine. RSJ Portfolio is a Windows desktop application, licensed per single user. Installation and license coverage are described in the installation chapter of the user guide.
- Enough history to be meaningful. Correlation estimates from a few dozen observations are noise. Think in years, not weeks.
- Working familiarity with correlation and volatility. If you want the statistical background first, read the Concept chapter. For the difference between the two most common objectives, see Minimum Volatility vs Maximum Sharpe Ratio.
- The installer. Download it from the downloads page. The SHA-512 is published there alongside a versioned filename, so verify before you install:
# Run this in the folder where you saved the installer.
# Compare the output to the SHA-512 published on the downloads page.
Get-FileHash .\RSJPortfolio-*.exe -Algorithm SHA512 | Format-List
If the hash does not match, delete the file and download it again.
Step 1: Build Your Candidate List
Open RSJ Portfolio and go to the Selection screen. Search for symbols and add them to a candidate list. This list is the input to the optimizer — nothing downstream can rescue a candidate list that is ten variations of the same trade.
Two practical rules:
- Spread across sectors and geographies. Weak correlation is found, not created. A list of five semiconductor equipment makers will produce a correlation matrix full of values above 0.8, and the optimizer will tell you so.
- Be generous at first. Twenty to forty names is a reasonable starting list. You can trim after you see the first allocation.
You can refine the list iteratively — run the optimizer, look at what got weight, remove the names that only ever get near-zero allocations, add a few more, run again. The Selection chapter covers the search and list mechanics in detail.
Step 2: Configure Data and Cleaning Settings
Before your first run, open the Configuration screen and set five things. Write them down as a checklist so you can reproduce a run later:
# Configuration checklist — your own notes, not a file the app reads.
data_provider: <one of the providers listed on the Data and currencies page>
cache_location: D:\rsj-cache # local disk, included in your backups
local_currency: EUR # or USD, CHF, ...
history_start: 2016-01-01 # long enough for stable correlations
history_end: 2026-09-30
cleaning:
adjust_splits: true
adjust_dividends: true
outliers: review
- Data provider. Choose one of the supported providers. The Data and currencies page lists them.
- Date range. This window determines every correlation you are about to compute. Five years is a common compromise; three years reacts faster to regime change; ten years is more stable but slower to notice that a business has changed.
- Local cache. The cache speeds up repeated runs and keeps the dataset consistent between them. It is also what makes the iteration loop in Step 4 cheap.
- Local currency. RSJ Portfolio handles portfolios quoted in several currencies via a conversion path, so mixed-currency candidate lists work — set the currency you actually think in.
- Cleaning settings. Splits, dividends and outliers are handled by the price cleaning pipeline. Getting this wrong is the classic source of a fake volatility number; the mechanics are covered in Automating End-of-Day Price Cleanup for Portfolio Backtests.
Step 3: Choose an Allocation Objective and Risk Estimator
This is the step that decides what “optimal” means for your portfolio. RSJ Portfolio exposes five allocation methods:
- Minimum volatility — minimize the variance of the resulting portfolio.
- Maximum Sharpe ratio — maximize return per unit of risk.
- Minimum semi variance — penalize downside deviation only.
- Hierarchical risk parity — cluster-based allocation that does not require inverting a covariance matrix. See What Is Hierarchical Risk Parity? for the plain-language version.
- Conditional value at risk — optimize against expected shortfall in the tail.
Then pick a risk estimator from the eight risk models available. This choice matters more than most people expect: the estimator defines how correlation and downside risk are measured, and a minimum-volatility portfolio built on two different estimators can produce two visibly different allocations from the same prices.
Finally, set your weight constraints — for example a cap on the weight of any single stock. Constraints are where you encode investment policy that the statistics do not know about, and they are also your main lever if the optimizer returns something you are not comfortable holding.
If you are torn between the first two methods, the decision framework is here.
Step 4: Run the Optimizer and Review the Allocation
Run the optimizer from the Recommendation screen. It uses modern portfolio theory to allocate capital to candidates that correlate weakly, or whose downside correlates weakly, which is what pulls the portfolio volatility below the average of its parts.
Review three things, in order:
- Weights per stock. A long tail of 0.2% positions is usually a sign your candidate list is too large or your constraints too tight.
- Expected portfolio volatility. Compare it to your gut feeling about the individual names. The whole point is that it is lower than the average.
- Diversification metrics and constraint compliance. No single position should exceed the cap you set unless you deliberately set it that way.
If the allocation is not what you wanted, change one thing — the objective, the risk estimator, or a constraint — and re-run. Do not change all three at once; you will not learn anything. The local cache means each re-run takes seconds, not minutes.
The parameter reference for this screen lives in the Recommendation chapter.
Step 5: Verify the Result and Troubleshoot Common Issues
Verification is not optional, and it is not complicated. Two checks:
Check 1 — volatility versus a naive baseline. Compare the optimized portfolio against an equal-weighted portfolio over the same historic window. If the optimizer did its job, the optimized portfolio is less volatile.
Check 2 — the correlation matrix. Confirm that the holdings which received the largest weights actually have low pairwise correlations. Export the results, then a short script is enough:
import numpy as np, pandas as pd
prices = pd.read_csv("prices.csv", index_col=0, parse_dates=True)
returns = prices.pct_change().dropna()
w = pd.read_csv("weights.csv", index_col=0)["weight"] # from the export
w = w / w.sum()
cov = returns.cov() * 252 # annualized
vol_opt = float(np.sqrt(w.values @ cov.loc[w.index, w.index].values @ w.values))
vol_eq = float(np.sqrt((np.ones(len(w)) / len(w)) @ cov.values @ (np.ones(len(w)) / len(w))))
print(f"optimized: {vol_opt:.2%} equal-weighted: {vol_eq:.2%}")
print(returns[w.index].corr().round(2))
A deeper checklist for sanity-checking optimizer output is in How to Verify Your Portfolio Optimizer’s Output.
Common issues and what to do about them:
- “Insufficient data history” for some symbols. Extend the date range, or drop those symbols from the candidate list. A stock with two years of history cannot be correlated against one with ten.
- The optimizer returns heavily concentrated weights. Tighten the weight constraints, or add more low-correlation candidates. Concentration is often the optimizer’s honest answer to a candidate list that has too few genuinely independent bets.
- Volatility looks wrong — too high or too low. Go back to the cleaning settings and to the currency conversion if your candidates are quoted in more than one currency. Bad adjustments produce fake returns, and fake returns produce fake correlations.
FAQ
What is correlation analysis and how does it help reduce portfolio volatility?
Correlation analysis measures how stocks move together. By allocating capital to stocks that correlate weakly — or whose downside correlates weakly — you reduce the overall volatility of the portfolio, because losses in one holding are less likely to be mirrored by losses in another. RSJ Portfolio uses historic end-of-day prices to compute correlations and then applies modern portfolio theory to find an allocation that minimizes volatility or meets another objective.
Can I use RSJ Portfolio with my own price data or only supported providers?
RSJ Portfolio supports several data providers and includes a price cleaning pipeline and a local cache. The Data and currencies page lists the supported providers. If you have custom data, check whether it can be imported; the user guide covers the configuration options in full.
How often should I re-run the optimization?
There is no fixed schedule. It depends on your investment horizon and on how frequently correlations change. Many users re-run monthly or quarterly, or after significant market events. The local cache makes repeated runs fast, so you can experiment with different date ranges and objectives without waiting.
What if my portfolio includes stocks in different currencies?
RSJ Portfolio handles portfolios quoted in several currencies via a conversion path. You set your local currency in the configuration and the software converts prices accordingly, which keeps correlation and volatility calculations consistent across holdings.
Conclusion and Next Steps
The workflow is short: build a candidate list, configure data and cleaning, choose an objective and a risk model, run the optimizer, then verify against a naive baseline. The step that actually reduces volatility is the allocation — spreading capital across holdings whose returns (or whose downturns) do not arrive together.
RSJ Portfolio automates that statistical optimization end to end, which means correlation-based allocation is available without writing a solver yourself. It is licensed per single user; details and checkout are on the pricing page, and the installer — with its SHA-512 published next to a versioned filename — is on the downloads page. For the parameters you will want to tune after your first run, the user guide is the authoritative reference.
Related posts
- Automating End-of-Day Price Cleanup for Portfolio Backtests
- What Is Hierarchical Risk Parity? A Plain-Language Explainer
- Best Portfolio Optimization Tools in 2026: A Buyer’s Guide