Risk Parity Calculator
Risk parity assigns equal shares of estimated portfolio risk. Compare it with equal capital weights using annual volatilities and one correlation shared by every asset pair. In this model, inverse volatility weighting gives exact equal risk contributions.
Part of the TradingView backtesting research collection.
Estimated annual standard deviation. Long-only, fully invested, without leverage.
Use -1/(2 - 1) < ρ < 1. Both endpoints are excluded; values extremely close to either endpoint are also rejected. The default 0.2 is a hypothetical assumption, not a market estimate.
Assets (annual volatility in %)
Weights sum to 100%. Each asset contributes equally to portfolio risk (risk parity). Displayed values are rounded.
Compare the current inputs
Equal capital volatility: 10.04%. Inverse volatility and equal risk contribution use the same weights in this constant correlation model.
| Asset | Capital weight | Risk share |
|---|---|---|
| Stocks | 50.00% | 85.71% |
| Bonds | 50.00% | 14.29% |
How risk contributions are calculated
For weights w and covariance matrix Σ, portfolio variance is V = wᵀΣw and volatility is √V. The contribution of asset i to volatility is RCᵢ = wᵢ(Σw)ᵢ / √V. Its percentage share is 100 × wᵢ(Σw)ᵢ / V. These contributions sum to portfolio volatility; their percentage shares sum to 100%.
This calculator uses Σᵢᵢ = σᵢ² and Σᵢⱼ = ρσᵢσⱼ for distinct assets. With the same ρ for every pair, wᵢ = (1/σᵢ) / Σⱼ(1/σⱼ) makes every wᵢσᵢ equal. Therefore inverse volatility and equal risk contribution weights coincide for all accepted correlations. Equal capital weighting assigns 1/n to each asset and is a separate comparison. The underlying definition follows Maillard, Roncalli and Teiletche's equal risk contribution paper and Robeco's analysis of uniform correlations. The calculations below are independently reproducible examples.
Worked example: equal capital versus equal risk
Assume annual volatility of 18% for Stocks and 6% for Bonds, with ρ = 0.2. These are illustrative inputs, not historical estimates. In decimal return units, the covariance matrix has diagonal entries 0.0324 and 0.0036 and off-diagonal entries 0.00216.
| Allocation | Stocks / Bonds | Annual volatility | Risk shares |
|---|---|---|---|
| Equal capital | 50% / 50% | 10.04% | 85.71% / 14.29% |
| Inverse volatility | 25% / 75% | 6.97% | 50% / 50% |
| Equal risk contribution | 25% / 75% | 6.97% | 50% / 50% |
Inverse volatilities are 1/18 and 1/6, so normalized weights are 0.25 and 0.75. Variance is 0.25² × 0.18² + 0.75² × 0.06² + 2 × 0.25 × 0.75 × 0.2 × 0.18 × 0.06 = 0.00486. Its square root is 0.0697137. Each volatility contribution is 3.4857 percentage points. Equal capital weights instead produce variance 0.01008 and volatility 10.0399%.
Input quality and invalid correlations
Estimate volatilities from returns using the same dates, sampling frequency, currency and annualization convention. A common annualization is daily standard deviation times the square root of the assumed observations per year; state that assumption. Mixing option-implied volatility with unrelated historical correlations produces a different model, not a consistent historical covariance estimate.
For n assets, the constant correlation matrix has eigenvalues 1 − ρ and 1 + (n − 1)ρ. Positive definiteness requires −1/(n − 1) < ρ < 1. For three assets, ρ = −0.6 is invalid, even though it is between −1 and 1. The lower endpoint can make this model's risk parity variance zero, so percentage risk contributions become undefined. This tool excludes singular endpoints and eigenvalues below 10⁻¹⁰ rather than inventing a risk allocation. Blank, zero, negative or non-finite volatilities also produce an error. One asset has 100% weight and risk share.
Negative contributions in the equal-weight comparison are possible: an asset can offset some of the other assets' modeled risk. Its share is not clamped to zero. Positive weights alone do not guarantee positive contributions for arbitrary correlations and unequal exposures.
Full covariance input is not implemented
This version accepts one common correlation, not a matrix of pairwise values. If your asset pairs have different correlations, use a model that accepts the full covariance matrix. The weights here should not be described as equal risk contributions under that different matrix.
A single average correlation can conceal differences between asset pairs. Changing this field is a sensitivity exercise; it does not fit the covariance matrix to observations. The calculator has no return forecast, short positions, custom risk budgets, leverage target or historical rebalancing engine.
Rebalancing research with TradingView exports
- Choose an estimation window and rebalance schedule before testing. Calculate target weights using only observations available at each decision time.
- Apply target weights to subsequent returns and let weights drift between rebalances. Include transaction costs, slippage and any financing costs.
- Compare equal capital and risk parity over the same period. Check realized volatility, drawdowns, turnover and capital concentration; equal estimated risk does not guarantee equal realized losses.
TradingView exports each Strategy Report tab separately: a List of Trades export contains trades, while a Performance Summary export contains summary metrics. A trade list is not a synchronized return history for several assets. Portfolio covariance research needs returns aligned to common timestamps, including valuation changes while positions remain open. See TradingView's export documentation.
Pineify's Backtest Deep Report analyzes imported trade records and includes profit factor, drawdown and trade statistics. This page calculates risk parity independently; it is not a built-in covariance optimizer in that report. The Pine Script AI Coding Agent can help draft and revise a script for a specified rule. You still need to check the code, data and execution assumptions. Neither workflow here automatically rebalances a live portfolio.
Method and product scope checked October 21, 2026. This tool is for research and education, not investment advice. Estimated volatility does not measure every source of investment risk.
Frequently asked questions
Is inverse volatility weighting the same as risk parity?
It is exact for this calculator: positive volatilities, equal risk budgets, long-only weights and the same correlation for every asset pair. With three or more assets and unequal pairwise correlations, inverse volatility weights generally do not equalize portfolio risk contributions.
Why does changing correlation leave the weights unchanged?
Under constant correlation, each inverse volatility weight makes weight times volatility identical across assets. Correlation changes portfolio volatility, but every asset retains the same share of risk. Equal capital weights usually have unequal risk shares.
Can I enter a full covariance matrix or custom risk budgets?
No. This version accepts one annual volatility per asset and one common pairwise correlation. Full covariance input and unequal risk budgets are not implemented. It does not estimate correlations from prices or automatically rebalance a portfolio.
Why are some negative correlations rejected?
For n assets, a constant correlation matrix is positive definite only when -1/(n - 1) < correlation < 1. For three assets, -0.5 is a singular boundary and -0.6 is invalid. The calculator also rejects values extremely close to a singular boundary to limit numerical error. One asset needs no correlation.
Does equal risk contribution protect against losses?
No. It balances estimated volatility contributions under the selected model. It does not equalize future losses, drawdowns, liquidity risk or crash exposure. Estimates and correlations can change; concentrated capital weights and trading costs still matter.
Related Tools
Asset Allocation Calculator
Find your ideal portfolio mix of stocks, bonds, and cash with a free risk profile quiz. Get a personalized asset allocation strategy and 10-year growth projection instantly.
Portfolio Standard Deviation Calculator
Calculate portfolio standard deviation (volatility) from asset weights and individual volatilities. Measure portfolio risk and diversification instantly.
Covariance Calculator (Stocks)
Calculate covariance and correlation between two stocks from historical returns. Free stock covariance calculator for portfolio analysis and diversification.
Sharpe Ratio Calculator
Measure the risk-adjusted return of an investment portfolio.
Review the trades behind your strategy
Use Backtest Deep Report to inspect exported TradingView trades. Keep the portfolio covariance and rebalancing study separate from trade-level performance metrics.
Explore Backtest Deep Report