{
 "site": "quants.wiki",
 "section": "Portfolio construction",
 "url": "https://quants.wiki/portfolio/",
 "reviewed": "2026-08-27",
 "license": "CC BY 4.0",
 "changes": "https://quants.wiki/changes.json",
 "tables": [
  {
   "title": "The three-asset covariance matrix used throughout this section",
   "intro": "Annualised volatilities of 16, 20 and 25 percent with correlations rho12 = 0.60, rho13 = 0.30, rho23 = 0.85. Expected excess returns m = (5, 6, 7) percent. Eigenvalues of the covariance matrix are 0.10122125, 0.02324793 and 0.00363082, giving a condition number of 27.8783.",
   "columns": [
    "",
    "Asset 1",
    "Asset 2",
    "Asset 3"
   ],
   "rows": [
    [
     "Volatility",
     "16.00 percent",
     "20.00 percent",
     "25.00 percent"
    ],
    [
     "Expected excess return m",
     "5.00 percent",
     "6.00 percent",
     "7.00 percent"
    ],
    [
     "Sigma row 1",
     "0.025600",
     "0.019200",
     "0.012000"
    ],
    [
     "Sigma row 2",
     "0.019200",
     "0.040000",
     "0.042500"
    ],
    [
     "Sigma row 3",
     "0.012000",
     "0.042500",
     "0.062500"
    ],
    [
     "Sigma inverse row 1",
     "81.1973",
     "-80.7584",
     "39.3258"
    ],
    [
     "Sigma inverse row 2",
     "-80.7584",
     "170.4120",
     "-100.3745"
    ],
    [
     "Sigma inverse row 3",
     "39.3258",
     "-100.3745",
     "76.7041"
    ]
   ]
  },
  {
   "title": "Six allocations on the same covariance matrix",
   "intro": "All weights sum to 1. Sigma inverse times the vector of ones sums to 44.6992; Sigma inverse times m sums to 2.4409; m transpose Sigma inverse m = 0.139911.",
   "columns": [
    "Rule",
    "w1",
    "w2",
    "w3",
    "Portfolio volatility",
    "Sharpe ratio at the stated m"
   ],
   "rows": [
    [
     "Equal weight",
     "0.333333",
     "0.333333",
     "0.333333",
     "17.4960 percent",
     "0.342935"
    ],
    [
     "Inverse volatility",
     "0.409836",
     "0.327869",
     "0.262295",
     "16.7181 percent",
     "0.350067"
    ],
    [
     "Equal risk contribution",
     "0.447675",
     "0.287907",
     "0.264418",
     "16.4551 percent",
     "0.353491"
    ],
    [
     "Hierarchical risk parity",
     "0.635412",
     "0.222310",
     "0.142278",
     "15.4469 percent",
     "0.356504"
    ],
    [
     "Minimum variance",
     "0.889607",
     "-0.239847",
     "0.350240",
     "14.9572 percent",
     "0.365084"
    ],
    [
     "Tangency, maximum Sharpe",
     "0.805933",
     "-0.343903",
     "0.537970",
     "15.3244 percent",
     "0.374047"
    ]
   ]
  },
  {
   "title": "Closed-form solutions",
   "intro": "Sigma is the covariance matrix, m the vector of expected excess returns, 1 a vector of ones, and lambda a risk-aversion coefficient. All three unconstrained solutions require Sigma to be invertible.",
   "columns": [
    "Portfolio",
    "Closed form",
    "Worked value on the three-asset matrix"
   ],
   "rows": [
    [
     "Unconstrained mean-variance",
     "w = (1/lambda) * Sigma^-1 * m",
     "direction (0.805933, -0.343903, 0.537970) scaled by 2.4409/lambda"
    ],
    [
     "Minimum variance",
     "w = Sigma^-1 * 1 / (1' Sigma^-1 1)",
     "(0.889607, -0.239847, 0.350240)"
    ],
    [
     "Minimum variance, achieved sd",
     "1 / sqrt(1' Sigma^-1 1)",
     "1/sqrt(44.6992) = 0.149572"
    ],
    [
     "Tangency",
     "w = Sigma^-1 * m / (1' Sigma^-1 m)",
     "(0.805933, -0.343903, 0.537970)"
    ],
    [
     "Maximum attainable Sharpe",
     "sqrt(m' Sigma^-1 m)",
     "sqrt(0.139911) = 0.374047"
    ],
    [
     "Two-asset minimum variance",
     "w1 = (s2^2 - rho*s1*s2)/(s1^2 + s2^2 - 2*rho*s1*s2)",
     "0.764706 for assets 1 and 2"
    ],
    [
     "Two-asset tangency",
     "w1 = (m1*s2^2 - m2*rho*s1*s2)/(m1*s2^2 + m2*s1^2 - (m1+m2)*rho*s1*s2)",
     "0.595506 for assets 1 and 2"
    ],
    [
     "Marginal risk contribution",
     "MRC_i = (Sigma w)_i / sigma_p",
     "see the risk contribution entry"
    ],
    [
     "Full Kelly leverage",
     "f* = (mu - rf)/sigma^2 = SR/sigma",
     "see the Kelly entry"
    ]
   ]
  }
 ],
 "entries": [
  {
   "id": "mean-variance-solution",
   "term": "The unconstrained mean-variance solution",
   "definition": "Maximising expected return less a risk penalty proportional to variance gives a solution in one line. Its direction is independent of risk aversion; only its scale depends on it. That is the separation result, and it is why the tangency portfolio matters.",
   "formula": "max_w w'm - (lambda/2) w'Sigma w gives w = (1/lambda) Sigma^-1 m. The risky-asset proportions are Sigma^-1 m normalised, independent of lambda",
   "fields": [
    {
     "label": "Worked direction",
     "value": "Sigma^-1 m = (1.9672, -0.8394, 1.3131); normalising by its sum of 2.4409 gives (0.805933, -0.343903, 0.537970), which is exactly the tangency portfolio",
     "mono": true
    },
    {
     "label": "Scale",
     "value": "At lambda = 5 the total risky exposure is 2.4409/5 = 0.488180 of capital, with the remainder at the risk-free rate. At lambda = 2 it is 1.220450 - a levered position in the same portfolio",
     "mono": true
    },
    {
     "label": "Achieved statistics at full allocation",
     "value": "Expected excess return 5.7320 percent, volatility 15.3244 percent, Sharpe 0.374047",
     "mono": true
    },
    {
     "label": "Shorting",
     "value": "The solution shorts asset 2 at -0.343903. Nothing in the objective prevents this; the short arises because asset 2 is 0.85 correlated with asset 3 and offers less return per unit of volatility",
     "mono": true
    }
   ],
   "notes": [
    "The separation of direction from scale means the hard part of the problem - which assets, in what proportion - does not depend on the investor's risk aversion at all. Risk aversion only sets the mix between the tangency portfolio and cash. Disagreements about risk tolerance are therefore not disagreements about the portfolio.",
    "The solution is exactly as good as m and Sigma. It has no mechanism for expressing uncertainty about either, and it responds to a change in m as if that change were certain. That is the substance of the estimation-error problem rather than a separate criticism.",
    "The unconstrained solution is a closed form and takes microseconds. Any constrained version - long only, position limits, turnover limits - requires a quadratic programme and loses the closed form, which is why constrained solutions cannot be sanity-checked by hand and are much more often wrong."
   ],
   "source": "Markowitz 1952; the separation result is Tobin 1958"
  },
  {
   "id": "tangency-portfolio",
   "term": "Tangency portfolio and the maximum attainable Sharpe ratio",
   "definition": "The fully invested portfolio with the highest Sharpe ratio. Its weights and its Sharpe ratio both have closed forms, and the Sharpe ratio's closed form is the single most useful diagnostic on a set of return forecasts: it says what the forecasts imply is achievable.",
   "formula": "w = Sigma^-1 m / (1' Sigma^-1 m). Maximum Sharpe = sqrt(m' Sigma^-1 m)",
   "fields": [
    {
     "label": "Worked weights",
     "value": "1' Sigma^-1 m = 2.4409, giving w = (0.805933, -0.343903, 0.537970)",
     "mono": true
    },
    {
     "label": "Worked Sharpe",
     "value": "m' Sigma^-1 m = 0.139911, so the maximum attainable Sharpe is sqrt(0.139911) = 0.374047",
     "mono": true
    },
    {
     "label": "Cross-check",
     "value": "Portfolio excess return w'm = 5.7320 percent, volatility 15.3244 percent, ratio 0.374047 - identical to the closed form, as it must be",
     "mono": true
    },
    {
     "label": "Comparison",
     "value": "Equal weight achieves 0.342935 on the same inputs, 92 percent of the attainable Sharpe with none of the estimation risk and no short position",
     "mono": true
    }
   ],
   "notes": [
    "sqrt(m' Sigma^-1 m) is the reality check on a forecast set. If a set of expected returns implies a maximum attainable Sharpe ratio that is implausible, the forecasts are wrong and no amount of constraint tuning downstream will fix it. This is a one-line test and it is almost never run.",
    "The tangency portfolio is undefined if 1' Sigma^-1 m is zero and flips sign as it passes through zero, producing a wholesale reversal of every weight from an arbitrarily small change in m. That is not a numerical artefact; it is the geometry of the problem.",
    "On this matrix the tangency portfolio beats equal weight by 0.031 Sharpe points, achieved via a 34 percent short. Whether that is worth the estimation risk is the entire practical question of portfolio optimisation, and it is a question about the precision of m, not about the optimiser."
   ]
  },
  {
   "id": "minimum-variance-portfolio",
   "term": "Minimum-variance portfolio",
   "definition": "The fully invested portfolio with the lowest variance. It uses no expected returns at all, which makes it the most robust of the optimised solutions and the one most often used in practice for exactly that reason.",
   "formula": "w = Sigma^-1 1 / (1' Sigma^-1 1). Achieved variance = 1/(1' Sigma^-1 1); achieved standard deviation = 1/sqrt(1' Sigma^-1 1)",
   "fields": [
    {
     "label": "Worked",
     "value": "1' Sigma^-1 1 = 44.6992, so w = (0.889607, -0.239847, 0.350240) and the achieved variance is 1/44.6992 = 0.02237176, standard deviation 14.9572 percent",
     "mono": true
    },
    {
     "label": "Cross-check",
     "value": "Computing w'Sigma w directly from the weights gives 0.02237176, identical to 1/(1' Sigma^-1 1)",
     "mono": true
    },
    {
     "label": "Comparison",
     "value": "14.9572 percent against equal weight's 17.4960 percent, inverse volatility's 16.7181 percent and equal risk contribution's 16.4551 percent. It is the lowest by construction",
     "mono": true
    },
    {
     "label": "Concentration",
     "value": "88.96 percent in one asset and a 23.98 percent short in another. Minimum-variance solutions on realistic covariance matrices are highly concentrated, which is a property of the solution and not a defect of the data",
     "mono": true
    }
   ],
   "notes": [
    "Not using expected returns removes the largest source of estimation error and does not remove the covariance error. The minimum-variance portfolio still inverts Sigma and still loads on its smallest eigenvalue, so it is robust relative to mean-variance and fragile in absolute terms.",
    "The concentration is systematic. Any pair of highly correlated assets with different volatilities will produce a long-short pair in the minimum-variance solution, because the optimiser uses one to hedge the other. Adding a long-only constraint typically halves the number of nonzero positions.",
    "The minimum-variance portfolio is not the minimum-risk portfolio for a holder who cares about drawdown, tail loss or liquidity. It minimises variance, which is the only thing Sigma describes."
   ]
  },
  {
   "id": "two-asset-closed-forms",
   "term": "Two-asset closed forms, and what they show",
   "definition": "With two assets the minimum-variance and tangency weights are explicit fractions in the volatilities, the correlation and the expected returns. They are worth knowing because they make the sensitivity of the solution to each input visible without a matrix inverse.",
   "formula": "Minimum variance: w1 = (s2^2 - rho*s1*s2)/(s1^2 + s2^2 - 2*rho*s1*s2). Tangency: w1 = (m1*s2^2 - m2*rho*s1*s2)/(m1*s2^2 + m2*s1^2 - (m1+m2)*rho*s1*s2)",
   "fields": [
    {
     "label": "Worked, minimum variance",
     "value": "s1 = 0.16, s2 = 0.20, rho = 0.60, so cov = 0.019200. w1 = (0.040000 - 0.019200)/(0.025600 + 0.040000 - 0.038400) = 0.020800/0.027200 = 0.764706, w2 = 0.235294. Achieved sd 15.5223 percent",
     "mono": true
    },
    {
     "label": "Worked, tangency",
     "value": "m1 = 0.05, m2 = 0.06. Numerator 0.05*0.040000 - 0.06*0.019200 = 0.002000 - 0.001152 = 0.000848. Denominator 0.002000 + 0.06*0.025600 - 0.11*0.019200 = 0.002000 + 0.001536 - 0.002112 = 0.001424. w1 = 0.595506",
     "mono": true
    },
    {
     "label": "Achieved tangency statistics",
     "value": "Excess return 5.404494 percent, volatility 15.771119 percent, Sharpe 0.342683",
     "mono": true
    },
    {
     "label": "Sensitivity of the tangency weight to m1",
     "value": "m1 = 0.045 gives w1 = 0.490909. m1 = 0.050 gives 0.595506. m1 = 0.055 gives 0.685864. m1 = 0.060 gives 0.764706. A 50 basis point change in one expected return moves the weight by 10 percentage points",
     "mono": true
    }
   ],
   "notes": [
    "The sensitivity table is the whole argument against naive optimisation, in numbers. A half-point revision to one expected return - well inside the standard error of any realistic forecast - moves the allocation by ten points. Nothing about the covariance matrix is responsible for that.",
    "When m1/s1 = m2/s2, meaning the two assets have equal Sharpe ratios, the tangency weight becomes independent of the correlation only in the equal-volatility case; in general the correlation still matters. The tempting shortcut is wrong.",
    "The minimum-variance weight goes above 1 - implying a short in asset 2 - whenever rho > s1/s2. Here s1/s2 = 0.80, so any correlation above 0.80 produces a short even in a two-asset problem. On the three-asset matrix rho23 = 0.85 exceeds 0.20/0.25 = 0.80, which is precisely why the three-asset minimum-variance solution shorts."
   ]
  },
  {
   "id": "estimation-error-maximisation",
   "term": "Why optimisers maximise estimation error",
   "definition": "The mean-variance optimiser has no representation of the uncertainty in its inputs, so it treats a high estimated return as a high true return. Assets whose returns are overestimated are systematically overweighted and those underestimated are systematically underweighted, which means the optimiser reliably selects for estimation error.",
   "formula": "The solution w = (1/lambda) Sigma^-1 m is linear in m, so an error vector e in m produces a weight error (1/lambda) Sigma^-1 e - amplified by the condition number of Sigma in the worst case",
   "fields": [
    {
     "label": "Worked, amplification",
     "value": "Condition number of the three-asset matrix is 27.8783. A relative error of 1 percent in m can produce a relative error of up to 27.88 percent in w",
     "mono": true
    },
    {
     "label": "Observed sensitivity",
     "value": "On the two-asset case, a 50 basis point change in m1 - from 5.00 to 5.50 percent - moves w1 from 0.595506 to 0.685864, a 9.04 percentage point shift from a change well inside any forecast's standard error",
     "mono": true
    },
    {
     "label": "Relative sensitivity to inputs",
     "value": "The solution is linear in m and involves the inverse of Sigma. Errors in m pass through directly; errors in Sigma pass through the inverse, which is why a badly conditioned Sigma converts small covariance errors into large weight errors too",
     "mono": true
    },
    {
     "label": "Direction of the bias",
     "value": "Systematic, not random. Across many assets the optimiser concentrates in whichever ones happened to have the most favourable estimation error, so the realised portfolio is worse than the average asset even when every estimate is unbiased",
     "mono": true
    }
   ],
   "notes": [
    "The standard responses are all forms of not trusting the inputs: shrink the expected returns toward a common mean, shrink the covariance matrix, add constraints, resample the inputs and average the resulting portfolios, or discard expected returns entirely and use a risk-only rule. They differ in how much structure they impose, not in kind.",
    "Constraints work by making the optimiser unable to act on its error. That is a real improvement in out-of-sample performance and it is not a statistical fix: the estimates are just as wrong, they simply do less damage.",
    "Equal weight achieves 92 percent of the attainable Sharpe ratio on the three-asset matrix with no forecasts at all. That ratio is the benchmark an optimised portfolio has to beat out of sample, not in sample, and it is a high bar."
   ],
   "source": "Michaud 1989"
  },
  {
   "id": "marginal-risk-contribution",
   "term": "Marginal and total risk contribution, and the Euler identity",
   "definition": "Volatility is homogeneous of degree one in the weights, so by Euler's theorem it decomposes exactly into additive per-asset contributions. This is the only exact additive risk decomposition available for volatility, and it is what makes risk budgeting arithmetic rather than approximation.",
   "formula": "MRC_i = d sigma_p / d w_i = (Sigma w)_i / sigma_p. RC_i = w_i * MRC_i. Euler identity: sum_i RC_i = sigma_p exactly. Percentage contribution = RC_i / sigma_p",
   "fields": [
    {
     "label": "Worked, at the equal-risk weights",
     "value": "w = (0.447675, 0.287907, 0.264418), sigma_p = 16.455134 percent. MRC = (0.122523, 0.190514, 0.207438). RC = (0.05485045, 0.05485045, 0.05485045)",
     "mono": true
    },
    {
     "label": "Identity check",
     "value": "Sum of the three RC values = 0.16455134, exactly equal to sigma_p = 0.16455134. The decomposition is exact, not approximate",
     "mono": true
    },
    {
     "label": "Percentage contributions",
     "value": "33.3333, 33.3333, 33.3333 percent - equal by construction at these weights",
     "mono": true
    },
    {
     "label": "Contrast with weight",
     "value": "Asset 1 holds 44.77 percent of the capital and contributes 33.33 percent of the risk. Capital share and risk share are different numbers and coincide only when every asset has the same marginal contribution",
     "mono": true
    }
   ],
   "notes": [
    "The identity holds for volatility because volatility is homogeneous of degree one. It does not hold for variance, which is degree two: variance contributions defined the same way sum to twice the variance. Mixing the two is a common and silent error.",
    "Marginal risk contribution is a derivative, so it is the right quantity for a small trade and the wrong one for a large one. Adding 10 percent to a position does not raise portfolio volatility by 10 percent of that position's MRC; the MRC itself moves.",
    "Risk contributions can be negative. An asset with a negative marginal contribution - a genuine hedge - reduces portfolio volatility, and the identity still holds with a negative term. Any risk-budgeting scheme that assumes non-negative contributions will silently fail on such a portfolio."
   ],
   "source": "Euler's theorem applied to volatility; the financial interpretation is Qian 2006"
  },
  {
   "id": "equal-risk-contribution",
   "term": "Equal risk contribution, or risk parity",
   "definition": "Weights chosen so that every asset contributes the same amount to portfolio volatility. There is no closed form for more than two assets or for unequal correlations, but the fixed-point condition is exact and the solution is unique for a positive-definite covariance matrix with long-only weights.",
   "formula": "Choose w > 0 with sum 1 such that w_i * (Sigma w)_i is equal for all i. Equivalently w_i proportional to 1/(Sigma w)_i, solved as a fixed point",
   "fields": [
    {
     "label": "Worked weights",
     "value": "On the three-asset matrix: w = (0.447675, 0.287907, 0.264418). Portfolio volatility 16.455134 percent",
     "mono": true
    },
    {
     "label": "Verification",
     "value": "Risk contributions (0.05485045, 0.05485045, 0.05485045), identical to eight decimal places, summing to sigma_p. Percentage contributions 33.3333 each",
     "mono": true
    },
    {
     "label": "Two-asset closed form",
     "value": "With two assets, w1 = sigma2/(sigma1 + sigma2) regardless of the correlation. The correlation drops out only in the two-asset case",
     "mono": true
    },
    {
     "label": "Position in the family",
     "value": "Volatility 16.4551 percent sits between inverse volatility at 16.7181 and hierarchical risk parity at 15.4469; the minimum-variance portfolio at 14.9572 is lower still but shorts asset 2",
     "mono": true
    }
   ],
   "notes": [
    "Equal risk contribution uses no expected returns, so it inherits none of the mean-variance estimation-error problem. It does use the full covariance matrix, and it is therefore exposed to correlation estimation error - less violently than an optimiser, because it does not invert the matrix.",
    "It is optimal in a specific and narrow sense: it is the maximum-Sharpe portfolio when all assets have equal Sharpe ratios and equal pairwise correlations. Outside those conditions it is a heuristic with a clean definition, not an optimum.",
    "The long-only fixed point is unique and the iteration converges, but the solver matters: a naive iteration w_i proportional to 1/(Sigma w)_i can oscillate, and damping or a Newton step is needed. The converged answer must always be verified against the equal-contribution condition rather than trusted.",
    "Risk parity at the asset level and risk parity at the factor level are different portfolios. Three assets loading on one common factor can have equal risk contributions and still be a single concentrated factor bet."
   ],
   "source": "Maillard, Roncalli and Teiletche 2010"
  },
  {
   "id": "inverse-vol-is-not-erc",
   "term": "Inverse-volatility weighting is not equal risk contribution",
   "definition": "Weighting each asset by the reciprocal of its volatility equalises risk contributions only when all pairwise correlations are equal. With a dispersed correlation matrix the two rules give different weights and different risk contributions, and inverse volatility is routinely mislabelled as risk parity.",
   "formula": "Inverse volatility: w_i proportional to 1/sigma_i. This coincides with equal risk contribution if and only if all off-diagonal correlations are identical",
   "fields": [
    {
     "label": "Worked, inverse volatility",
     "value": "Volatilities 16, 20, 25 percent give reciprocals 6.25, 5.00, 4.00 summing to 15.25, so w = (0.409836, 0.327869, 0.262295). Portfolio volatility 16.7181 percent",
     "mono": true
    },
    {
     "label": "Its actual risk contributions",
     "value": "29.2308, 37.6923, 33.0769 percent - not equal. Asset 2 contributes 8.5 percentage points more risk than asset 1 despite the weights being set to equalise them",
     "mono": true
    },
    {
     "label": "Comparison with true ERC",
     "value": "True equal risk contribution weights are (0.447675, 0.287907, 0.264418) with contributions of exactly 33.3333 each and a lower portfolio volatility of 16.4551 percent",
     "mono": true
    },
    {
     "label": "Why",
     "value": "Asset 2 has correlations of 0.60 and 0.85 with the others, so its marginal contribution is higher than its standalone volatility implies. Inverse volatility cannot see this because it never looks at the correlations",
     "mono": true
    }
   ],
   "notes": [
    "The gap is largest exactly where it matters: when one asset is highly correlated with several others, which is when the portfolio is most concentrated in a hidden common factor. Inverse volatility overweights that asset relative to true risk parity.",
    "Inverse volatility has one real advantage: it needs only N volatility estimates rather than N(N+1)/2 covariance estimates, so it is far less exposed to estimation error. On a large universe with a short history that can outweigh its conceptual error.",
    "The two rules coincide in the equal-correlation case, which is why the confusion survives: on a stylised example with a single correlation they are identical, and the example is the one usually shown."
   ]
  },
  {
   "id": "hierarchical-risk-parity",
   "term": "Hierarchical risk parity",
   "definition": "An allocation built by clustering assets on a correlation-derived distance, reordering the covariance matrix so that similar assets sit adjacent, and then splitting capital recursively between clusters in inverse proportion to their variance. It never inverts the covariance matrix, which is the point.",
   "formula": "Cluster on the distance d_ij = sqrt(0.5*(1 - rho_ij)). Quasi-diagonalise by the dendrogram order. Then bisect recursively: allocate alpha = 1 - V1/(V1 + V2) to the first cluster and 1 - alpha to the second, where V is the inverse-variance-weighted variance of the cluster",
   "fields": [
    {
     "label": "Worked, clustering",
     "value": "Highest correlation is rho23 = 0.85, so assets 2 and 3 cluster first. The tree is {1} against {2,3}",
     "mono": true
    },
    {
     "label": "Worked, within-cluster",
     "value": "Inverse-variance weights within {2,3}: 1/0.040000 = 25 and 1/0.062500 = 16, normalised to 0.609756 and 0.390244. Cluster variance V({2,3}) = 0.04461630. V({1}) = 0.02560000",
     "mono": true
    },
    {
     "label": "Worked, bisection",
     "value": "alpha to {1} = 1 - 0.02560000/(0.02560000 + 0.04461630) = 1 - 0.364588 = 0.635412. Final weights (0.635412, 0.222310, 0.142278)",
     "mono": true
    },
    {
     "label": "Result",
     "value": "Portfolio volatility 15.4469 percent, below equal risk contribution's 16.4551 and above minimum variance's 14.9572, with no short position and no matrix inversion",
     "mono": true
    }
   ],
   "notes": [
    "The claimed advantage is out-of-sample stability, not in-sample optimality. In sample it is dominated by the minimum-variance portfolio by construction, since minimum variance is the in-sample minimum. The case for it rests on avoiding the matrix inverse, and on a simulation study rather than a theorem.",
    "The output depends on the clustering choices - the linkage method, the distance metric, the tree order - and none of them is determined by the data. Two implementations of hierarchical risk parity on the same covariance matrix can return different portfolios, and the difference is a modelling choice that is rarely reported.",
    "With three assets the tree is trivial and the method is nearly determined. The clustering decisions only start to matter at a universe size where the covariance matrix is also badly conditioned, which is the case the method exists for and the case where it is hardest to validate."
   ],
   "source": "Lopez de Prado 2016"
  },
  {
   "id": "black-litterman",
   "term": "Black-Litterman posterior",
   "definition": "A precision-weighted average of an equilibrium expected-return vector and a set of stated views. It solves the problem that mean-variance has no way to express partial confidence in a forecast, by making the confidence an explicit input.",
   "formula": "E[R] = [ (tau*Sigma)^-1 + P'*Omega^-1*P ]^-1 * [ (tau*Sigma)^-1*Pi + P'*Omega^-1*Q ], with Pi the equilibrium excess returns, P the view-loading matrix, Q the view values, Omega the view covariance, and tau a scalar scaling the prior covariance",
   "fields": [
    {
     "label": "Worked, scalar case",
     "value": "One asset, one view. Pi = 5.00 percent, tau = 0.05, sigma^2 = 0.04 so tau*sigma^2 = 0.002000. View Q = 8.00 percent with omega = 0.004000. Prior precision 500.0000, view precision 250.0000",
     "mono": true
    },
    {
     "label": "Posterior",
     "value": "(0.05/0.002 + 0.08/0.004)/(500 + 250) = (25 + 20)/750 = 45/750 = 6.0000 percent. Posterior variance 1/750 = 0.00133333",
     "mono": true
    },
    {
     "label": "Weight on the view",
     "value": "250/750 = 0.333333. Cross-check: Pi + 0.333333*(Q - Pi) = 0.05 + 0.333333*0.03 = 6.0000 percent, identical",
     "mono": true
    },
    {
     "label": "Structure",
     "value": "The posterior is always between Pi and Q for a single view, and the position between them is set entirely by the ratio omega/(tau*sigma^2). Nothing else in the model affects it",
     "mono": true
    }
   ],
   "notes": [
    "The formula is a Bayesian update and does exactly what one does: it moves the prior toward the view in proportion to relative precision. The difficulty is not the algebra, it is that tau and Omega are unobservable and the answer is entirely determined by their ratio.",
    "Setting Omega proportional to P*(tau*Sigma)*P' - a common convention - makes the weight on each view a fixed constant independent of the view's own uncertainty, which discards the one thing the framework was built to express. If every view gets the same confidence, the model reduces to blending Pi with Q at a fixed ratio.",
    "The output is an expected-return vector, not a portfolio. It still has to be run through an optimiser, and every sensitivity in that optimiser still applies. Black-Litterman reduces the magnitude of the forecast errors it feeds forward; it does not change how they propagate.",
    "The posterior covariance is smaller than the prior, which makes the subsequent optimisation more confident than the prior alone would justify. Implementations differ on whether to use the posterior covariance or the original Sigma in the optimiser, and the choice changes the leverage materially."
   ],
   "source": "Black and Litterman 1992; the calibration of tau and Omega is discussed in He and Litterman 1999"
  },
  {
   "id": "reverse-optimisation",
   "term": "Reverse optimisation for the equilibrium returns",
   "definition": "Given a set of market-capitalisation weights and a covariance matrix, the expected returns that would make those weights optimal can be recovered directly. This is where the Black-Litterman prior comes from, and it is a useful diagnostic on any portfolio: it says what the holder must believe.",
   "formula": "Pi = delta * Sigma * w_mkt, where delta is the implied risk-aversion coefficient. delta = (mu_mkt - rf)/sigma_mkt^2",
   "fields": [
    {
     "label": "Worked",
     "value": "w_mkt = (0.50, 0.30, 0.20) on the three-asset matrix, delta = 2.5. Pi = 2.5 * Sigma * w_mkt = (5.2400, 7.5250, 7.8125) percent",
     "mono": true
    },
    {
     "label": "Implied market statistics",
     "value": "w_mkt' Sigma w_mkt = 0.02576000, so the market volatility is 16.0499 percent. Pi' w_mkt = 6.4400 percent",
     "mono": true
    },
    {
     "label": "Consistency",
     "value": "delta * sigma_mkt^2 = 2.5 * 0.02576000 = 0.064400, which equals Pi' w_mkt. The implied risk aversion and the implied market excess return are the same statement",
     "mono": true
    },
    {
     "label": "Diagnostic use",
     "value": "Applied to any held portfolio rather than the market, Pi = delta*Sigma*w gives the expected returns the holder is implicitly forecasting. If those are implausible, the portfolio is not a considered position",
     "mono": true
    }
   ],
   "notes": [
    "Reverse optimisation is the cheapest audit available on a portfolio. It is one matrix multiply and it converts a weight vector into a statement about beliefs that can be argued with.",
    "The implied returns depend on Sigma, so a badly estimated covariance matrix produces implausible implied returns for a perfectly reasonable portfolio. Run the diagnostic with a shrunk or factor-based Sigma before concluding that the portfolio is irrational.",
    "delta is a free scalar and only sets the overall level of Pi, not its cross-sectional pattern. Arguments about the level of implied returns are arguments about delta and are usually beside the point; the pattern is the informative part."
   ],
   "source": "Sharpe 1974 reverse optimisation, as used in Black and Litterman 1992"
  },
  {
   "id": "kelly-continuous",
   "term": "Kelly leverage in continuous form",
   "definition": "The leverage that maximises the expected logarithm of wealth for a continuously rebalanced position. For a single risky asset it is the excess return divided by the variance, which is also the Sharpe ratio divided by the volatility.",
   "formula": "f* = (mu - rf)/sigma^2 = SR/sigma. Growth rate at leverage f: g(f) = rf + f*(mu - rf) - f^2*sigma^2/2. At f = f* the excess growth rate is SR^2/2",
   "fields": [
    {
     "label": "Worked, clean inputs",
     "value": "mu - rf = 6.00 percent, sigma = 20.00 percent. SR = 0.300000, f* = 0.06/0.04 = 1.500000. Excess growth at full Kelly = 0.06*1.5 - 0.02*2.25 = 0.09 - 0.045 = 4.5000 percent = SR^2/2",
     "mono": true
    },
    {
     "label": "Worked, the base series",
     "value": "Annual excess 6.8000 percent, sigma 7.2063 percent, SR 0.943622. f* = 0.068/0.00519304 = 13.094441 - leverage of thirteen times, with an implied portfolio volatility of 94.36 percent",
     "mono": true
    },
    {
     "label": "Zero-growth leverage",
     "value": "g(f) = 0 at f = 2*f*. Doubling Kelly leverage gives exactly zero excess growth: 0.06*3.0 - 0.02*9.0 = 0.18 - 0.18 = 0. Beyond that, growth is negative while expected return is still positive",
     "mono": true
    },
    {
     "label": "Relationship to Sharpe",
     "value": "f* = SR/sigma, so full-Kelly volatility is exactly SR. A strategy with a Sharpe ratio of 0.94 run at full Kelly has 94 percent annualised volatility, whatever its unlevered volatility was",
     "mono": true
    }
   ],
   "notes": [
    "The base series result is the point of the entry. A 24-month track record with a Sharpe ratio under 1 implies thirteen times leverage under full Kelly. The criterion is not wrong; it is being fed a parameter with a standard error of 0.72 as if it were known.",
    "Full-Kelly volatility equals the Sharpe ratio, always. That identity makes the criterion self-limiting for realistic Sharpe ratios and explosive for estimated ones, and it explains why nobody runs it: no institution tolerates volatility equal to its Sharpe ratio.",
    "The zero-growth point at twice Kelly is the important asymmetry. Overbetting by a factor of two eliminates all growth while doubling volatility, so errors in f* are heavily punished on the high side and mildly on the low side. That asymmetry, not caution, is the argument for fractional Kelly.",
    "The continuous formula assumes continuous rebalancing, no transaction costs, log utility and a known mu and sigma. Discrete rebalancing lowers the optimal fraction; transaction costs lower it further; parameter uncertainty lowers it most."
   ],
   "source": "Kelly 1956; the continuous-time form is Merton 1969, with the investment treatment in Thorp 2006"
  },
  {
   "id": "fractional-kelly",
   "term": "Fractional Kelly, and why half is the common choice",
   "definition": "Betting a fixed fraction c of the Kelly leverage. The growth rate as a function of c is a parabola peaking at c = 1, and its shape is why fractional Kelly gives up little growth for a large reduction in volatility.",
   "formula": "At leverage c*f*, the excess growth rate is c*(1 - c/2) * SR^2, a fraction c*(2-c) of the full-Kelly growth of SR^2/2. Volatility is c times the full-Kelly volatility",
   "fields": [
    {
     "label": "Worked, mu - rf = 6 percent, sigma = 20 percent",
     "value": "f* = 1.500000, full-Kelly growth 4.5000 percent at 30.00 percent volatility. c = 0.5: f = 0.750000, growth 3.3750 percent (75.0 percent of full) at 15.00 percent volatility (50 percent of full)",
     "mono": true
    },
    {
     "label": "The whole curve",
     "value": "c = 0.25 gives 43.75 percent of full-Kelly growth at 25 percent of the volatility. c = 0.50 gives 75.00 percent at 50 percent. c = 1.00 gives 100 percent at 100 percent. c = 1.50 gives 75.00 percent at 150 percent. c = 2.00 gives 0 percent at 200 percent",
     "mono": true
    },
    {
     "label": "Symmetry",
     "value": "c and 2 - c give identical growth rates: half Kelly and one-and-a-half Kelly both deliver 75 percent of the maximum, at 50 and 150 percent of the volatility respectively. Underbetting strictly dominates overbetting by the same margin",
     "mono": true
    },
    {
     "label": "Applied to the base series",
     "value": "f* = 13.094441. At c = 0.25 the leverage is still 3.273610 with 23.59 percent volatility. Fractional Kelly reduces an absurd number to a merely aggressive one; it does not fix the estimation problem",
     "mono": true
    }
   ],
   "notes": [
    "The c-versus-2-minus-c symmetry is the entire argument. For any level of growth below the maximum there are two leverages that achieve it, and the lower one has strictly lower volatility. Since f* is estimated, an estimate that is too high is far more costly than one that is too low, and deliberately choosing c below 1 is a hedge against exactly that.",
    "Half Kelly is a convention, not a result. Nothing in the mathematics identifies 0.5; it is chosen because 75 percent of the growth at half the volatility is a trade most holders accept. A different utility function gives a different c.",
    "Fractional Kelly on an estimated f* is not equivalent to full Kelly on a shrunk estimate of the Sharpe ratio, although they can coincide numerically. The first is a preference statement; the second is an estimation statement, and only the second has a defensible calibration."
   ]
  },
  {
   "id": "turnover-penalty-no-trade-band",
   "term": "Transaction costs create a no-trade band",
   "definition": "Adding a proportional cost on trading to a mean-variance objective does not shift the optimal portfolio; it creates a region around the current holding inside which no trade is worthwhile. The width of that region has a closed form.",
   "formula": "max_w w'm - (lambda/2) w'Sigma w - c * sum_i |w_i - w0_i|. The first-order condition gives no trade in asset i whenever |m_i - lambda*(Sigma w0)_i| <= c. For a single asset the no-trade band is w0 in [ (m - c)/(lambda*sigma^2) , (m + c)/(lambda*sigma^2) ]",
   "fields": [
    {
     "label": "Worked, single asset",
     "value": "m = 6.00 percent, lambda = 5, sigma^2 = 0.04, so lambda*sigma^2 = 0.200000 and the costless target is 0.300000. At c = 20 basis points the band is [0.290000, 0.310000], width 0.020000 = 2c/(lambda*sigma^2)",
     "mono": true
    },
    {
     "label": "Band by cost level",
     "value": "c = 5 bps gives [0.297500, 0.302500], width 0.005000. c = 20 bps gives width 0.020000. c = 50 bps gives [0.275000, 0.325000], width 0.050000",
     "mono": true
    },
    {
     "label": "Scaling",
     "value": "Band width = 2c/(lambda*sigma^2). It is linear in the cost, inversely proportional to risk aversion, and inversely proportional to variance. Low-volatility assets get wide bands in weight terms",
     "mono": true
    },
    {
     "label": "What it is not",
     "value": "The band is centred on the costless optimum. Transaction costs do not change where the portfolio should be, only whether it is worth moving there from where it is",
     "mono": true
    }
   ],
   "notes": [
    "The L1 penalty produces a band; a quadratic penalty on turnover produces partial adjustment toward the target instead, with no band at all. The two are not interchangeable and they generate qualitatively different trading behaviour: the L1 version trades rarely and fully, the quadratic version trades constantly and partially.",
    "Real costs are not proportional. Impact grows sublinearly in size, roughly as the square root, which makes the correct penalty concave in trade size rather than linear. The linear penalty overstates the cost of small trades and understates the cost of large ones, so the band it produces is too wide at the margin and too narrow in the tail.",
    "Estimating the band requires lambda, which is a preference, and c, which is a measurement. Getting c wrong by a factor of two doubles the band and can eliminate trading entirely for a low-volatility asset."
   ]
  }
 ]
}