From wealth-management
Builds diversified portfolios using correlation analysis, efficient frontier construction, and factor-based diversification. Covers portfolio variance, risk contributions, minimum variance portfolios, and correlation effects.
npx claudepluginhub joellewis/finance_skills --plugin wealth-managementThis skill uses the workspace's default tool permissions.
Provides the mathematical foundations and practical frameworks for building diversified portfolios. Covers portfolio variance, correlation effects, the efficient frontier, minimum variance portfolios, risk contributions, and factor-based diversification. Explains why diversification reduces risk and where it fails.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Provides the mathematical foundations and practical frameworks for building diversified portfolios. Covers portfolio variance, correlation effects, the efficient frontier, minimum variance portfolios, risk contributions, and factor-based diversification. Explains why diversification reduces risk and where it fails.
4 — Portfolio Construction
both
For a portfolio of two assets with weights w_1 and w_2, volatilities sigma_1 and sigma_2, and correlation rho_12:
sigma^2_p = w_1^2 * sigma_1^2 + w_2^2 * sigma_2^2 + 2 * w_1 * w_2 * sigma_1 * sigma_2 * rho_12
Diversification benefit arises whenever rho_12 < 1, because the portfolio volatility will be less than the weighted average of individual volatilities.
In matrix notation for n assets with weight vector w and covariance matrix Sigma:
sigma^2_p = w' * Sigma * w
This generalizes to any number of assets and captures all pairwise correlations.
Portfolio volatility is strictly less than the weighted average of individual volatilities whenever any pairwise correlation is below 1:
sigma_p < Sigma(w_i * sigma_i) when rho_ij < 1 for some i,j
The lower the average correlation, the greater the diversification benefit.
The efficient frontier is the set of portfolios that offer the highest expected return for each level of risk (or equivalently, the lowest risk for each level of return). Portfolios below the frontier are suboptimal — they can be improved by reallocating weights.
The portfolio with the lowest possible volatility, regardless of expected returns:
w_mv = Sigma^(-1) * 1 / (1' * Sigma^(-1) * 1)
where 1 is a vector of ones. This portfolio depends only on the covariance matrix, not on expected returns, making it more robust to estimation error.
Correlations are not constant. In market crises, correlations between risky assets tend to increase sharply ("correlation breakdown" or "correlation tightening"), reducing the diversification benefit precisely when it is needed most. Key implications:
A measure of how much diversification a portfolio achieves:
DR = (Sigma(w_i * sigma_i)) / sigma_p
A portfolio of perfectly correlated assets has DR = 1. Higher DR indicates more effective diversification. A fully diversified equal-volatility portfolio with zero correlations has DR = sqrt(n).
The portfolio that maximizes the diversification ratio. This is an alternative to mean-variance optimization that does not require expected return inputs — it relies only on volatilities and correlations.
True diversification means exposure to multiple independent risk factors, not merely holding many assets. Assets that share the same factor exposures (e.g., multiple tech stocks all driven by growth factor) provide less diversification than their number suggests. Key factors:
The risk contribution of asset i to portfolio volatility:
RC_i = w_i * (Sigma * w)_i / sigma_p
where (Sigma * w)_i is the i-th element of the vector Sigma * w. The sum of all risk contributions equals the portfolio volatility. This decomposition reveals which assets truly drive portfolio risk.
The rate of change of portfolio volatility with respect to the weight of asset i:
MRC_i = (Sigma * w)_i / sigma_p
Risk contribution = weight * marginal risk contribution: RC_i = w_i * MRC_i
The diversification benefit of adding assets decreases rapidly. Empirically:
| Formula | Expression | Use Case |
|---|---|---|
| 2-Asset Portfolio Variance | sigma^2_p = w_1^2sigma_1^2 + w_2^2sigma_2^2 + 2w_1w_2sigma_1sigma_2*rho_12 | Two-asset risk calculation |
| n-Asset Portfolio Variance | sigma^2_p = w' * Sigma * w | General portfolio risk |
| Minimum Variance Weights | w_mv = Sigma^(-1)*1 / (1'*Sigma^(-1)*1) | Lowest-risk portfolio |
| Diversification Ratio | DR = Sigma(w_i*sigma_i) / sigma_p | Measure of diversification |
| Risk Contribution | RC_i = w_i * (Sigma*w)_i / sigma_p | Asset-level risk attribution |
| Marginal Risk Contribution | MRC_i = (Sigma*w)_i / sigma_p | Sensitivity of risk to weight |
| Asymptotic Variance | sigma^2_p → avg(cov_ij) as n → infinity | Diversification limit |
Given:
Calculate: Portfolio volatility
Solution:
sigma^2_p = (0.60)^2 * (0.20)^2 + (0.40)^2 * (0.05)^2 + 2 * (0.60) * (0.40) * (0.20) * (0.05) * (0.20)
sigma^2_p = 0.36 * 0.04 + 0.16 * 0.0025 + 2 * 0.60 * 0.40 * 0.20 * 0.05 * 0.20
sigma^2_p = 0.0144 + 0.0004 + 0.00096
sigma^2_p = 0.01576
sigma_p = sqrt(0.01576) = 0.1255 = 12.55%
Weighted average volatility = 0.60 * 20% + 0.40 * 5% = 14.0%
Diversification benefit = 14.0% - 12.55% = 1.45 percentage points of risk reduction.
Given:
Calculate: Diversification ratio
Solution:
Weighted average volatility = 0.2515% + 0.2520% + 0.2510% + 0.2518% = 3.75% + 5.0% + 2.5% + 4.5% = 15.75%
Diversification Ratio = 15.75% / 10.5% = 1.50
Interpretation: The portfolio achieves significant diversification — the weighted average volatility is 50% higher than the actual portfolio volatility. A DR of 1.50 indicates meaningful correlation benefits. For comparison, a portfolio of perfectly correlated assets would have DR = 1.0.
See scripts/diversification.py for computational helpers.