# quants.wiki - full corpus > A machine-readable reference for quantitative finance estimators: the exact formula, the conditions under which it is valid, and a worked number. Performance statistics with the Lo autocorrelation correction, Sharpe standard errors and small-sample bias; drawdown statistics against the expected maximum drawdown of a random walk; covariance conditioning, Ledoit-Wolf shrinkage, EWMA and GARCH, and the Parkinson, Garman-Klass, Rogers-Satchell and Yang-Zhang volatility estimators; mean-variance, risk parity, hierarchical risk parity, Black-Litterman and Kelly in closed form; deflated Sharpe, probability of backtest overfitting, minimum backtest length and purged cross-validation; implementation shortfall, square-root impact, Almgren-Chriss and Kyle's lambda. Reviewed: 2026-08-27 License: CC BY 4.0 Source: https://quants.wiki Change feed: https://quants.wiki/changes.json ## Performance statistics Reviewed: 2026-08-27 Canonical: https://quants.wiki/performance/ (JSON: https://quants.wiki/performance.json) Every number in this section is computed from the 24-month return series in the first table below, with a constant risk-free rate of 0.20 percent per month. Where a statistic has more than one estimator in general use - and most of them do - each variant is given separately with its own worked value, because the variants do not agree and the disagreement is usually larger than the difference between two managers. The annualisation rule matters as much as the estimator: multiplying a monthly Sharpe ratio by the square root of twelve is correct only for serially uncorrelated returns, and the correction for the general case is given explicitly. ### Arithmetic mean, geometric mean, and volatility drag The arithmetic mean is the average of the periodic returns; the geometric mean is the constant periodic return that reproduces the observed terminal wealth. The geometric mean is always at or below the arithmetic mean, and the gap is approximately half the variance. Only the geometric mean describes what a compounding investor received. Formula: mu = (1/T) sum r_t; g = (prod (1+r_t))^(1/T) - 1; drag = mu - g approx sigma^2/2, where sigma^2 is the population variance m2 The approximation drag = sigma^2/2 uses the population variance with divisor T, not the sample variance with divisor T-1. On the base series the sample variance gives 0.021638 percent against a true drag of 0.020728 percent - a 4 percent error in the drag from choosing the wrong divisor.,The relationship is exact only in the continuous limit. It is a second-order Taylor expansion of ln(1+r) and degrades as returns get large: at monthly returns of 20 percent the third-order term is no longer negligible.,Reporting an arithmetic mean alongside a maximum drawdown is internally inconsistent, because the drawdown is computed on the compounded path and the arithmetic mean is not achievable on it. ### The three annualisations, and why two of them disagree A monthly return can be annualised by multiplying by twelve, by compounding twelve times, or by exponentiating a mean log return. These give three different numbers. Which is correct depends on whether the quantity being annualised is additive in returns, in log returns, or in variance. Formula: simple: P*mu. compounded: (1+g)^P - 1. continuous: exp(P * mean(ln(1+r_t))) - 1. Variance annualises as P*sigma^2 and volatility as sqrt(P)*sigma The often-quoted identity g_annual = mu_annual - sigma_annual^2/2 does not hold across an annualisation boundary. On the base series it gives 9.2000 - 7.2063^2/2 = 8.9403 percent against a true 9.3278 percent, an error of 39 basis points. The identity applies to log returns at a single frequency, not to a simply annualised arithmetic mean.,Volatility scales with sqrt(P) only for serially uncorrelated returns, exactly the same condition that Sharpe annualisation requires. If rho1 is nonzero, the annualised volatility is wrong too and in the opposite direction from the Sharpe error.,A performance table that does not state which of the three rules produced its annual return is not reproducible. On this series the spread between the rules is 39 basis points on a 9 percent return; on a volatile series it is much larger. ### Sharpe ratio Mean excess return divided by the standard deviation of returns, both measured per period. It is a t-statistic in disguise: the same quantity, scaled by sqrt(T), tests the hypothesis that mean excess return is zero. Formula: SR = (mu - rf) / sigma, with sigma the sample standard deviation of returns (divisor T-1). Annualised SR_ann = SR * sqrt(P) only if returns are serially uncorrelated Subtracting rf from the numerator but not adjusting the denominator is correct; subtracting it twice, or comparing a Sharpe ratio computed on total returns with one computed on excess returns, is not. On a series with 5 percent rf and 8 percent volatility the difference is more than half a Sharpe point.,The ratio is undefined as a ranking device across return distributions with different higher moments. Two strategies with identical mu and sigma but skewness of +1 and -1 receive the same Sharpe ratio and are not the same risk.,Selling out-of-the-money options raises the Sharpe ratio of a short sample almost mechanically, because the premium enters the numerator every period and the tail enters the denominator only when it occurs. A high Sharpe ratio over a short sample is evidence about the sample, not the strategy. ### Annualising a Sharpe ratio when returns are autocorrelated Multiplying a per-period Sharpe ratio by sqrt(P) assumes the returns are independently and identically distributed. Under serial correlation the correct factor is Lo's eta(q), which is smaller than sqrt(q) for positive autocorrelation and larger for negative. Positive autocorrelation is the common case in illiquid or marked-to-model portfolios, so the naive factor usually overstates. Formula: SR(q) = eta(q) * SR, with eta(q) = q / sqrt( q + 2 * sum_{k=1}^{q-1} (q-k) * rho_k ). Under AR(1), rho_k = rho1^k. If all rho_k = 0 then eta(q) = sqrt(q) Estimating 11 autocorrelations from 24 observations is not defensible: each rho_k beyond the first few is noise. The AR(1) plug-in, which spends one parameter, is the practical choice at short sample lengths and is what the worked value above uses. On this series the two approaches happen to agree to within 0.003 Sharpe points, which should not be read as evidence that they generally do.,Positive autocorrelation in reported returns is the signature of smoothed or stale marks, not of skill. Getmansky, Lo and Makarov 2004 model exactly this, and the implication is that the correction should be applied before, not after, comparing an illiquid book to a liquid one.,The correction changes the annualised Sharpe ratio and nothing else. The per-period Sharpe ratio is unaffected: the autocorrelation problem is entirely a problem of aggregation across periods.,eta(q) can exceed sqrt(q). Negatively autocorrelated returns - mean-reverting or overhedged books - have their annual Sharpe ratio understated by the naive factor, which is why the correction should be applied symmetrically rather than only when it flatters. ### Standard error of the Sharpe ratio The Sharpe ratio is an estimate with a standard error that depends on the sample length and on the higher moments of the return distribution. Under independent normal returns the standard error has a closed form; under general distributions it picks up skewness and kurtosis terms. Formula: iid normal: SE(SR) = sqrt( (1 + SR^2/2) / T ). General: SE(SR) = sqrt( (1 - gamma3*SR + ((gamma4 - 1)/4)*SR^2) / T ), with gamma3 skewness and gamma4 kurtosis (3 for a normal) The interval on the base series spans nearly three Sharpe points. Two years of monthly data cannot distinguish a Sharpe ratio of 0.9 from one of zero, and no estimator improvement changes that; it is a sample-size limit.,Negative skewness makes the standard error LARGER here because the -gamma3*SR term is positive when gamma3 is negative. That is the opposite of what many summaries claim, and the sign follows directly from the formula.,This standard error assumes serially uncorrelated returns. If it is applied to autocorrelated returns it is too small, in addition to the annualisation error covered separately. Lo 2002 gives the autocorrelation-robust version.,Comparing two Sharpe ratios requires the standard error of their difference, which includes the covariance of the two return series and is not the root sum of squares of the individual standard errors. Jobson and Korkie 1981, with the correction in Memmel 2003, gives the test. ### Small-sample bias in the Sharpe ratio The plug-in Sharpe estimator is biased upward in small samples. The sample standard deviation is a downward-biased estimator of sigma, and dividing by a number that is too small on average makes the ratio too large on average. The bias is a pure function of T and can be removed exactly under normality. Formula: E[SR_hat] = SR * a(T), with a(T) = sqrt((T-1)/2) * Gamma((T-2)/2) / Gamma((T-1)/2). Unbiased estimator: SR_hat / a(T) The bias is small relative to the standard error and is routinely mistaken for the whole small-sample problem. At T = 24 the bias is 3.4 percent of the Sharpe ratio while the standard error is 76 percent of it. Correcting the bias and reporting a point estimate without an interval fixes the smaller error and leaves the larger one.,The bias is always upward, never downward, and it is largest exactly where track records are shortest. A twelve-month track record overstates its Sharpe ratio by 7.5 percent before any selection effect is considered.,The correction assumes normal iid returns. Under fat tails the exact factor differs, and no closed form is available; the direction of the bias is unchanged. ### Sortino ratio, and the divisor that changes the answer Excess return over a minimum acceptable return divided by downside deviation - the root mean square of shortfalls below that target. The ambiguity is the divisor in the downside deviation: the full sample length, or only the count of observations below the target. The two answers differ by a large factor and both appear in commercial reporting. Formula: Sortino = (mu - MAR) / DD, with DD = sqrt( (1/T) * sum_t min(r_t - MAR, 0)^2 ). The alternative uses 1/n_below in place of 1/T, where n_below is the count of periods with r_t < MAR The divisor-T version is the one implied by the original semi-deviation definition and is the more defensible: it treats an upside month as a zero shortfall rather than dropping it, which keeps the statistic a comparable second moment. The divisor-n_below version is not a deviation of the return distribution at all; it is a conditional deviation of the losses.,A strategy with no periods below the MAR has an infinite Sortino ratio under either divisor, and the divisor-n_below version is undefined. Any strategy whose losses are rare and large will therefore look better on Sortino than on Sharpe until the first large loss lands.,Annualising a Sortino ratio by sqrt(P) inherits the same autocorrelation problem as the Sharpe ratio, with no published analogue of Lo's correction. Treat an annualised Sortino ratio on autocorrelated returns as unquantified.,The MAR must be stated. Sortino ratios computed against 0, against the risk-free rate, and against an absolute return target are three different statistics and are not comparable. ### Calmar ratio Compound annual return divided by maximum drawdown over the same window. It is the only common ratio whose denominator is a single realised extreme rather than a moment of the distribution, which makes it the least stable of the family. Formula: Calmar = g_ann / |MaxDD|, both measured over the same window. The original specification uses a 36-month window and a compound annual return Maximum drawdown is non-decreasing in the length of the window, so Calmar mechanically falls as a track record lengthens even if nothing about the strategy changes. Comparing the Calmar ratios of a two-year record and a ten-year record compares window lengths, not strategies.,The denominator is one number from one path. Its sampling variability is enormous and there is no accepted standard error for it, which means Calmar has no interval and cannot support a significance statement.,The original 36-month convention exists precisely to make the statistic comparable across managers. A Calmar ratio computed over whatever window happens to flatter the record is not the same statistic. ### Sterling ratio, and its incompatible definitions A return-over-drawdown ratio whose denominator is the average of the annual maximum drawdowns rather than the single worst drawdown. At least three definitions circulate, differing in whether a fixed offset is added to the denominator and whether the average is over annual maxima or over all drawdowns. Formula: Sterling = g_ann / (average annual maximum drawdown + 0.10) in the form with the offset; g_ann / (average annual maximum drawdown) without it; and g_ann / (average of all drawdowns) in a third variant The 10 percentage-point offset in the original form has no statistical justification; it is a floor that prevents the ratio exploding for strategies with small drawdowns. Its practical effect is to compress differences between low-drawdown strategies almost to nothing, which is either the point or the flaw depending on the use.,A Sterling ratio without a stated definition is uninterpretable. Given the factor of 2.755 spread on this series, comparing two Sterling ratios from two sources is comparing two unrelated numbers.,The averaging over annual maxima makes the statistic depend on where the calendar year boundaries fall. Shifting the year boundary by six months changes the annual maxima and therefore the ratio, on identical returns. ### Omega ratio The ratio of the probability-weighted gains above a threshold to the probability-weighted losses below it. Unlike the Sharpe ratio it uses the entire return distribution rather than its first two moments, and it is a function of the threshold rather than a single number. Formula: Omega(tau) = sum_t max(r_t - tau, 0) / sum_t max(tau - r_t, 0). Equivalently, the ratio of the integral of the survival function above tau to the integral of the cumulative distribution below tau Because Omega equals 1 at the mean and is monotone, Omega at a threshold below the mean carries the same ordinal information as the mean itself for a fixed distribution shape. It only adds information when comparing distributions of different shape at a threshold that matters to the user.,Omega uses every observation, which makes it more stable than a drawdown-based ratio, but it is still a ratio of two sample sums and inherits their sampling error. No standard closed-form standard error exists.,The whole Omega curve, not one point on it, is the statistic. Two strategies can cross: one better below the threshold and worse above it. Reporting Omega at a single threshold hides exactly the case Omega was designed to reveal. ### The benchmark regression, and its standard errors Beta, alpha, R-squared, tracking error and residual volatility all come from a single regression of excess portfolio returns on excess benchmark returns. Quoting any of them without the regression standard errors treats an estimate as a measurement. Formula: r_t - rf = alpha + beta*(b_t - rf) + e_t. beta = Cov(r,b)/Var(b); alpha = mean(r - rf) - beta*mean(b - rf); R^2 = corr(r,b)^2; residual sd s_e = sqrt(SSE/(T-2)) Beta is estimated far more precisely than alpha, always. That is a structural property of the regression, not a feature of this dataset: alpha is the intercept and absorbs all the residual noise. A track record can establish its market exposure long before it can establish its skill.,The regression must be run on excess returns on both sides. Running it on total returns produces an intercept that mixes alpha with (1 - beta) times the risk-free rate, which is not Jensen's alpha and is biased whenever beta is far from 1.,R-squared of 0.73 means 27 percent of the variance is unexplained by the benchmark. It says nothing about whether the residual is skill; it is the same residual that alpha's standard error is computed from, and here it is not significantly nonzero.,Ordinary least squares standard errors assume homoskedastic uncorrelated residuals. On real return data neither holds, and the honest version uses Newey-West or a comparable robust estimator, which widens the alpha interval further. ### Jensen's alpha The intercept of the excess-return regression: the average return not explained by the portfolio's exposure to the benchmark. It is a return, in percent, not a ratio, and it has a standard error. Formula: alpha = (mu - rf) - beta * (mu_b - rf). Annualised as P * alpha Alpha is defined only relative to the specified benchmark and the specified beta. Adding a second factor to the regression changes both, and an alpha that survives one factor and not two was never alpha; it was unmodelled exposure.,The annualisation multiplies alpha by P, not by sqrt(P), because alpha is a mean return rather than a ratio. Applying sqrt(P) to alpha is a common and large error: on this series it would give 0.9238 percent instead of 3.2000 percent.,A positive alpha with an insignificant t-statistic is the normal state of a short track record and is not evidence of skill. Here the point estimate is 3.2 percent per year and the interval includes -2.2 percent. ### Information ratio, and the two things it is called Mean active return divided by tracking error. The ambiguity is what counts as active return: the arithmetic difference from the benchmark, or the regression residual. The first gives the information ratio proper, the second the appraisal ratio. They coincide only when beta equals 1. Formula: IR = mean(r_t - b_t) / sd(r_t - b_t), annualised by sqrt(P). Appraisal ratio = alpha / s_e, also annualised by sqrt(P) A portfolio with beta well away from 1 has a tracking error dominated by the beta mismatch rather than by security selection. Its information ratio is then mostly a statement about its market exposure, which is why the appraisal ratio is the right number for a stock-selection mandate and the information ratio the right one for a tracking mandate.,The two are routinely reported under the same label. When a document quotes an information ratio, check whether the denominator is the standard deviation of r - b or the residual standard deviation of a regression; on this series that choice moves the number by 0.37.,Annualising by sqrt(P) assumes serially uncorrelated active returns. Active returns of a portfolio rebalanced monthly against a benchmark rebalanced quarterly are autocorrelated by construction. ### Treynor ratio Mean excess return divided by beta rather than by volatility. It prices only systematic risk, which makes it the right ratio for a component of a diversified portfolio and the wrong one for a standalone allocation. Formula: Treynor = (mu - rf) / beta, conventionally stated in annualised return units Treynor ignores idiosyncratic risk entirely. A single-stock portfolio and a thousand-stock portfolio with the same beta and the same excess return receive the same Treynor ratio, which is correct if and only if the holder is diversified elsewhere.,The ratio is unstable and sign-flipping for betas near zero, and meaningless for negative betas: a short-biased fund with negative beta and positive excess return gets a negative Treynor ratio that ranks it below a losing long fund.,Beta carries a standard error - 0.09659361 on this series - so Treynor carries one too. The ratio is more precisely estimated than the Sharpe ratio only because beta is estimated more precisely than volatility, not because the numerator is better known. ### M-squared The return the portfolio would have earned if it had been levered or delevered to exactly the benchmark's volatility. It converts a Sharpe ratio into a return, which makes it directly comparable with the benchmark's return in percentage points rather than in ratio units. Formula: M2 = rf_ann + SR_ann * sigma_bench_ann. M2 alpha = M2 - mu_bench_ann. The implied leverage is sigma_bench/sigma_portfolio M-squared assumes leverage is available at the risk-free rate and that levering the strategy scales its return linearly. Neither holds for a strategy whose capacity is limited or whose financing spread widens with size, and the M-squared alpha is overstated by exactly the financing cost that was ignored.,Because M2 is affine in the Sharpe ratio, it inherits the Sharpe ratio's entire standard error. The 2.96 percent M-squared alpha on this series is not distinguishable from zero at 24 observations.,The benchmark volatility must be measured over the same window as the strategy volatility. Using a long-run benchmark volatility against a short-window strategy volatility mixes two sample periods into one number. ### Up and down capture, and the two ways to compute them The fraction of the benchmark's up-period return the portfolio captured, and the fraction of its down-period loss the portfolio suffered. Computed either as a ratio of arithmetic means over the selected periods or as a ratio of compounded returns over them, giving different answers. Formula: Mean-based: UpCapture = mean(r_t | b_t > 0) / mean(b_t | b_t > 0). Compound-based: UpCapture = (prod over up periods of (1+r_t) - 1) / (prod over up periods of (1+b_t) - 1). Down capture uses b_t < 0 Capture ratios are not independent of beta. A portfolio with beta 0.75 and zero alpha has an up capture of about 0.75 and a down capture of about 0.75 mechanically. The informative quantity is the gap between the two, not either level: here 0.910 against 0.612 on a beta of 0.75 is what asymmetry looks like.,The statistic is entirely determined by the sign classification, and the sign of a benchmark return in a period near zero is noise. Reclassifying one marginal month can move a capture ratio by several points on a two-year sample.,Down capture below 1 over a sample containing few down periods is the least reliable number in a performance table. Eight down months is not a sample from which a downside characteristic can be inferred.,Compounding the selected periods, as the compound-based version does, treats non-adjacent months as if they were consecutive. It is internally consistent but it is not a return anyone earned. #### The base return series Twenty-four monthly returns in percent for a strategy and a benchmark, the strategy equity index starting from 1, its running peak, and the drawdown from that peak. Every statistic in this corpus is computed from these columns. The risk-free rate is 0.20 percent per month throughout. Sum of strategy returns 18.40 percent, sum of benchmark returns 14.40 percent. | Month | Strategy return, percent | Benchmark return, percent | Strategy equity | Running peak | Drawdown, percent | |---|---|---|---|---|---| | 1 | +1.60 | +4.00 | 1.016000 | 1.016000 | 0.0000 | | 2 | +4.10 | +3.90 | 1.057656 | 1.057656 | 0.0000 | | 3 | +2.30 | +0.70 | 1.081982 | 1.081982 | 0.0000 | | 4 | +3.40 | +3.00 | 1.118769 | 1.118769 | 0.0000 | | 5 | +1.50 | +0.80 | 1.135551 | 1.135551 | 0.0000 | | 6 | -0.80 | -0.40 | 1.126467 | 1.135551 | 0.8000 | | 7 | +3.20 | +2.30 | 1.162514 | 1.162514 | 0.0000 | | 8 | +2.70 | +3.20 | 1.193901 | 1.193901 | 0.0000 | | 9 | +1.90 | +1.40 | 1.216586 | 1.216586 | 0.0000 | | 10 | -3.60 | -3.90 | 1.172788 | 1.216586 | 3.6000 | | 11 | -0.50 | +1.10 | 1.166925 | 1.216586 | 4.0820 | | 12 | +0.60 | -1.30 | 1.173926 | 1.216586 | 3.5065 | | 13 | +2.10 | +2.80 | 1.198579 | 1.216586 | 1.4801 | | 14 | +1.10 | +3.10 | 1.211763 | 1.216586 | 0.3964 | | 15 | -1.20 | +0.30 | 1.197222 | 1.216586 | 1.5917 | | 16 | +0.90 | +2.30 | 1.207997 | 1.216586 | 0.7060 | | 17 | +0.40 | -1.40 | 1.212829 | 1.216586 | 0.3088 | | 18 | -2.50 | -2.90 | 1.182508 | 1.216586 | 2.8011 | | 19 | -1.80 | -3.00 | 1.161223 | 1.216586 | 4.5507 | | 20 | -0.30 | -1.40 | 1.157739 | 1.216586 | 4.8370 | | 21 | -2.90 | -3.50 | 1.124165 | 1.216586 | 7.5967 | | 22 | +2.00 | +0.40 | 1.146648 | 1.216586 | 5.7487 | | 23 | +1.40 | +1.00 | 1.162701 | 1.216586 | 4.4292 | | 24 | +2.80 | +1.90 | 1.195257 | 1.216586 | 1.7532 | #### Summary statistics of the base series All values recomputed from the table above. Monthly figures use the sample standard deviation with T-1 in the denominator unless stated. Annualised figures state their annualisation rule because the rules are not equivalent. | Statistic | Monthly | Annualised | Rule used | |---|---|---|---| | Arithmetic mean return | 0.766667 percent | 9.2000 percent | P times mu | | Geometric mean return | 0.745939 percent | 9.3278 percent | (1+g)^P - 1 | | Terminal wealth from 1.00 | - | 1.19525673 over 24 months | product of (1+r_t) | | Standard deviation | 2.080273 percent | 7.2063 percent | sigma times sqrt(P) | | Skewness gamma3 | -0.508966 | - | m3/m2^1.5, moment estimator, divisor T | | Kurtosis gamma4 | 2.368633 | - | m4/m2^2, not excess; excess is -0.631367 | | Lag-1 autocorrelation rho1 | 0.297578 | - | sample autocorrelation, divisor = total sum of squares | | Mean excess return over rf | 0.566667 percent | 6.8000 percent | P times (mu - rf) | | Sharpe ratio | 0.272400 | 0.943622 | SR times sqrt(P), iid assumption | | Sharpe ratio, Lo-corrected | 0.272400 | 0.713970 | SR times eta(P), AR(1) plug-in | | Sharpe ratio, bias-corrected | 0.263403 | 0.912456 | divide by a(T)=1.03415598 | | Standard error of the Sharpe ratio | 0.207876 | 0.720104 | iid normal, Lo 2002 | | Standard error, non-normal | 0.220230 | 0.762899 | Mertens 2002, uses gamma3 and gamma4 | | Sortino ratio, MAR 0.20 percent | 0.444302 | 1.539108 | downside deviation divided by T | | Sortino ratio, alternative divisor | 0.256518 | 0.888604 | downside deviation divided by count below MAR | | Omega, threshold 0 | 2.352941 | - | sum of gains above 0 over sum of losses below 0 | | Omega, threshold 0.20 percent | 1.894737 | - | same, threshold at the risk-free rate | | Maximum drawdown | - | 7.5967 percent | peak-to-trough on the equity index | | Calmar ratio | - | 1.227869 | geometric annual return over max drawdown | | Ulcer index | - | 2.9821 percent | root mean square drawdown over all 24 months | | Beta against the benchmark | 0.750000 | - | sample covariance over benchmark variance | | Correlation with the benchmark | 0.855946 | - | R-squared 0.732644 | | Jensen's alpha | 0.266667 percent | 3.2000 percent | alpha times P | | Tracking error | 1.228526 percent | 4.2557 percent | sd of arithmetic active return | | Information ratio | 0.135664 | 0.469954 | active mean over tracking error, times sqrt(P) | | Appraisal ratio | 0.242466 | 0.839927 | alpha over residual sd, times sqrt(P) | | Treynor ratio | - | 0.090667 | annual excess return over beta | | M-squared | - | 10.1606 percent | rf_ann + SR_ann times sigma_bench_ann | | Up capture, mean-based | - | 0.909938 | 16 up-benchmark months | | Down capture, mean-based | - | 0.612360 | 8 down-benchmark months | #### Why sqrt(P) is the wrong annualisation factor when returns are autocorrelated Lo 2002 gives the exact scaling factor eta(q) for aggregating a per-period Sharpe ratio to q periods. Under an AR(1) autocorrelation structure rho_k = rho^k the factor is q divided by the square root of q + 2 times the sum over k of (q-k)rho^k. Values below are for q = 12. The last column is the factor by which naive sqrt(12) annualisation overstates the true annual Sharpe ratio. | rho1 | eta(12) | eta(12) / sqrt(12) | Overstatement factor of sqrt(12) | |---|---|---|---| | -0.20 | 4.170757 | 1.203990 | 0.830569 | | -0.10 | 3.797884 | 1.096353 | 0.912113 | | 0.00 | 3.464102 | 1.000000 | 1.000000 | | 0.10 | 3.160123 | 0.912200 | 1.096250 | | 0.20 | 2.878783 | 0.831003 | 1.203365 | | 0.29757771 (base series) | 2.621035 | 0.756624 | 1.321654 | | 0.30 | 2.614800 | 0.754824 | 1.324805 | | 0.40 | 2.363483 | 0.682257 | 1.465735 | | 0.50 | 2.121320 | 0.612372 | 1.632993 | #### What each ratio divides by The ratios differ almost entirely in the denominator. Numerators and denominators below are stated per period; worked values are annualised from the base series where an annualisation rule exists. | Ratio | Numerator | Denominator | Worked, annualised | |---|---|---|---| | Sharpe | mu - rf | sigma of total returns | 0.943622 | | Sharpe, Lo-corrected | mu - rf | sigma, aggregated with eta(P) | 0.713970 | | Sortino | mu - MAR | downside deviation below MAR | 1.539108 | | Calmar | geometric annual return | maximum drawdown | 1.227869 | | Sterling, with 10-point offset | geometric annual return | average annual max drawdown + 0.10 | 0.594269 | | Sterling, no offset | geometric annual return | average annual max drawdown | 1.637532 | | Martin, or Ulcer Performance Index | geometric annual return - rf | Ulcer index | 2.314199 | | Omega | sum of returns above the threshold | sum of shortfalls below it | 2.352941 at threshold 0 | | Information ratio | mean active return | tracking error | 0.469954 | | Appraisal ratio | Jensen's alpha | residual sd of the benchmark regression | 0.839927 | | Treynor | mu - rf | beta | 0.090667 | | M-squared | - | expressed as a return, not a ratio | 10.1606 percent | ## Drawdown and path statistics Reviewed: 2026-08-27 Canonical: https://quants.wiki/drawdown/ (JSON: https://quants.wiki/drawdown.json) Drawdown statistics are functions of the realised path rather than of the return distribution, which makes them intuitive, non-additive, and badly behaved as estimators. Maximum drawdown in particular is an extreme value: it is non-decreasing in sample length, it has no accepted standard error, and it is a biased measure of risk in a specific and quantifiable direction. The section closes with the expected maximum drawdown of a driftless random walk, which is the null hypothesis a drawdown figure has to beat before it says anything about a strategy. ### Maximum drawdown The largest peak-to-trough decline in the equity curve over the sample, expressed as a fraction of the peak. It is computed on the compounded path, which means it depends on the ordering of returns and not only on their distribution. Formula: E_t = prod_{s<=t} (1 + r_s); P_t = max_{s<=t} E_s; D_t = 1 - E_t/P_t; MaxDD = max_t D_t Maximum drawdown is non-decreasing in the sample length by construction. A longer track record cannot have a smaller maximum drawdown than a subset of itself, so any comparison between records of different lengths is biased toward the shorter one.,The statistic uses exactly two observations out of T - one peak and one trough. Its sampling variability is correspondingly enormous and it has no standard error in general use, so it cannot support a confidence statement.,The frequency at which the equity curve is sampled is part of the definition. A monthly maximum drawdown and a daily maximum drawdown on the same strategy are different numbers, and a report that does not state the frequency is not reproducible.,Maximum drawdown is not subadditive across time or across sub-portfolios. The maximum drawdown of a combination is not bounded by any combination of the components' maximum drawdowns, in either direction, which is why it cannot be used in a risk-budgeting framework the way variance can. ### Average drawdown, and the divisor question again The mean of the drawdown series. As with the Sortino denominator, the divisor is either the full sample length - treating a month at a new high as a zero drawdown - or the count of in-drawdown months. The first is a property of the path; the second is a conditional statistic. Formula: AvgDD over all periods = (1/T) sum_t D_t. AvgDD over in-drawdown periods = (1/n_dd) sum over the n_dd periods with D_t > 0. Sometimes called the pain index in the divisor-T form The divisor-T form is the useful one because it uses every observation and is comparable across strategies with different time-under-water. The conditional form penalises a strategy for spending less time in drawdown, which is the opposite of the intended direction.,Average drawdown is far more stable than maximum drawdown - it averages T observations rather than selecting two - and it is correspondingly less reported, because it is smaller and less dramatic.,The average drawdown says nothing about episode structure. One long shallow episode and many short deep ones can produce the same average, and they are not the same experience for a holder facing redemption. ### Ulcer index The root mean square of the drawdown series. It penalises deep drawdowns more than shallow ones, unlike the average, and it uses every observation, unlike the maximum, which makes it the most statistically stable of the drawdown family. Formula: UI = sqrt( (1/T) sum_t D_t^2 ), with D_t the drawdown at t expressed in percent or as a fraction, stated consistently The Ulcer index is the drawdown analogue of a standard deviation and should be preferred over maximum drawdown wherever a single risk number is needed, precisely because it averages rather than selects. It is still path-dependent and still sensitive to sampling frequency.,Units matter. The Ulcer index computed on drawdowns expressed in percent is 100 times the value computed on fractions, and both conventions appear in published implementations. The Martin ratio changes by a factor of 100 accordingly.,Unlike maximum drawdown, the Ulcer index does not increase mechanically with sample length; adding a long stretch of new highs lowers it. That makes it comparable across records of different lengths in a way maximum drawdown is not. ### Drawdown duration and recovery time Duration is the number of periods from the prior peak to the recovery of that peak; time to trough and time from trough to recovery are its two components. They are separate statistics from depth and are frequently the binding constraint on a real allocation. Formula: For an episode beginning after peak at t0 and ending at t1 when E_t1 >= E_t0: duration = t1 - t0; time to trough = argmin(E) - t0; recovery time = t1 - argmin(E) The final drawdown episode of any sample is almost always unrecovered and therefore censored. Reporting a mean or maximum drawdown duration without saying how the open episode was handled is the single most common error in path statistics.,Recovery time is bounded below by depth divided by the mean return: at 0.766667 percent per month, an 7.5967 percent drawdown needs at least 9.9 months of average performance to recover even with no further losses. That arithmetic is a useful sanity check on any claimed recovery.,Duration is measured in periods, so it inherits the sampling frequency. An episode that is 15 months at monthly resolution is roughly 315 trading days, and neither number is more correct than the other. ### Time under water The fraction of the sample spent below a prior peak. It is the simplest path statistic, it has no divisor ambiguity, and it captures the thing a holder actually experiences, which is duration rather than depth. Formula: TUW = (1/T) * count of periods with D_t > 0. The complement, time at new highs, is 1 - TUW For a positive-drift random walk, time under water is high by default. A strategy at new highs in only a third of its months is not unusual and is not evidence of a problem; the base series makes 9.3 percent a year while spending two thirds of its life below a prior peak.,Because it counts periods rather than averaging magnitudes, time under water is the only statistic in this section that is invariant to the size of the returns. Scaling every return by 2 leaves it unchanged and changes every other drawdown statistic.,It is still sampling-frequency dependent, and in the opposite direction from depth statistics: sampling more finely finds more moments below the running peak, so daily time under water exceeds monthly time under water on the same path. ### Expected maximum drawdown of a random walk A path with no drift and no skill still produces drawdowns, and their expected maximum has a closed form in the zero-drift case. Comparing an observed maximum drawdown with this number is how a reader distinguishes a risk characteristic from an artefact of path length and volatility. Formula: Zero drift: E[MaxDD] = sqrt(pi/2) * sigma * sqrt(Ty) = 1.253314 * sigma * sqrt(Ty), with sigma the annualised volatility and Ty the horizon in years. Nonzero drift mu > 0: E[MaxDD] = (2*sigma^2/mu) * Qp(mu^2*Ty/(2*sigma^2)), where Qp has no elementary closed form The drift-free case is the useful null because it is the case that assumes nothing. With positive drift the expected maximum drawdown is smaller, so a driftless benchmark is conservative: a drawdown that already looks small against the driftless expectation looks smaller still against the correct one.,The nonzero-drift result requires the function Qp, which is given as a series and a numerical approximation in the source paper and has no closed form. Any quoted E[MaxDD] for a drifting process that does not name its approximation should be treated as unverified.,This is an EXPECTED maximum drawdown, not a bound. The distribution of the maximum drawdown of a random walk has a long right tail, so a single observed drawdown above the expectation is not evidence of anything at all.,The result assumes continuous monitoring. A monthly-sampled path realises a smaller maximum drawdown than the continuous path it was sampled from, so comparing a monthly-observed drawdown against the continuous-time expectation is biased toward finding the strategy well-behaved. ### Why maximum drawdown is a biased estimator of risk Maximum drawdown estimates nothing well. It is an extreme order statistic of a path, so its expectation depends on sample length and monitoring frequency as much as on the underlying risk, and it is systematically understated in short samples and by coarse sampling. Formula: E[MaxDD] scales as sigma*sqrt(Ty) under the driftless null, so the ratio MaxDD/sigma is not comparable across samples of different length. The scale-free quantity is MaxDD/(sigma*sqrt(Ty)) The honest use of maximum drawdown is as a scale-free ratio against the driftless expectation for the same volatility and horizon. In raw percent it is not a risk measure; it is a fact about one path.,Because maximum drawdown is non-decreasing in T, it can never revise downward. A strategy's reported maximum drawdown will only ever grow, which means the number in a marketing document is a lower bound on the number a future holder will see.,There is no accepted standard error for maximum drawdown and no simple bootstrap gives one, because resampling returns destroys the path ordering the statistic depends on. Block bootstraps preserve some of it and give wide intervals.,None of this makes drawdown useless. It is the binding operational constraint for a leveraged book and for any mandate with a stop. It is simply not an estimator of the underlying risk, and should not be used as one. ### Sampling frequency changes every drawdown statistic Drawdown statistics are computed on a discretely sampled equity curve, and the sample is a subset of the true path. Coarser sampling misses interior peaks and troughs, so it understates depth and can either overstate or understate duration. Formula: For sampling frequencies f1 finer than f2 on the same path: MaxDD(f1) >= MaxDD(f2) always, since the coarse sample's peak-trough pairs are a subset of the fine sample's. TUW has no such ordering Comparing a hedge fund's monthly maximum drawdown with an index's daily maximum drawdown is a systematic comparison in the fund's favour, of unknown but nonzero size. The fix is to compute both at the coarser frequency.,A fund reporting monthly and holding illiquid marks understates its drawdown twice: once for the sampling frequency, once for the smoothing that shows up as positive autocorrelation. The two effects compound.,Intraday drawdown on a daily-marked strategy is invisible in the same way and matters for the same reason: it is what a margin desk sees. #### Drawdown episodes in the base series An episode begins the first month the equity index sits below its prior peak and ends when it regains that peak. Depths are from the peak that preceded the episode. The second episode had not recovered by the end of the sample, which is the normal case and the reason duration statistics are censored. | Episode | Months | Depth, percent | Months to trough | Months from trough to end of episode | Total months | Recovered | |---|---|---|---|---|---|---| | 1 | 6 to 6 | 0.8000 | 1 | 0 | 1 | yes | | 2 | 10 to 24 | 7.5967 | 12 | 3 | 15 | no, still open at month 24 | #### Path statistics of the base series All computed from the equity and drawdown columns of the base return series table. Where a statistic has two divisor conventions, both are given. | Statistic | Value | Definition used | |---|---|---| | Maximum drawdown | 7.5967 percent | largest 1 - equity/peak, at month 21 | | Average drawdown, all periods | 2.0078 percent | mean of the drawdown series including its 8 zeros | | Average drawdown, in-drawdown periods only | 3.0117 percent | mean over the 16 months with drawdown above zero | | Ulcer index, all periods | 2.9821 percent | sqrt of mean squared drawdown over all 24 months | | Ulcer index, in-drawdown periods only | 3.6523 percent | same over the 16 in-drawdown months | | Time under water | 16 of 24 months, 66.67 percent | count of months with drawdown above zero | | Longest drawdown episode | 15 months, unrecovered | months 10 to 24 | | Months to trough of the worst episode | 12 | month 10 to month 21 | | Number of distinct episodes | 2 | peak-to-peak | | Gain required to recover from the maximum | 8.2213 percent | d/(1-d) with d = 0.07596737 | | Calmar ratio | 1.227869 | geometric annual return over maximum drawdown | | Martin ratio, Ulcer Performance Index | 2.314199 | (g_ann - rf_ann) over Ulcer index | | Year 1 maximum drawdown | 4.0820 percent | months 1 to 12 in isolation | | Year 2 maximum drawdown | 7.3105 percent | months 13 to 24 in isolation | #### Expected maximum drawdown of a driftless random walk For a Brownian motion with zero drift the expected maximum drawdown over a horizon of Ty years is sqrt(pi/2) times sigma times sqrt(Ty), with sqrt(pi/2) = 1.253314. Values below use the base series annualised volatility of 7.2063 percent. This is the drawdown a strategy with no skill and no edge is expected to produce, and it is the number a reported drawdown has to be compared against. | Horizon, years | E[MaxDD], percent | Observed base-series MaxDD, percent | Observed / expected | |---|---|---|---| | 1 | 9.0317 | - | - | | 2 | 12.7728 | 7.5967 | 0.594759 | | 5 | 20.1956 | - | - | | 10 | 28.5608 | - | - | | 20 | 40.3911 | - | - | ## Covariance and volatility estimation Reviewed: 2026-08-27 Canonical: https://quants.wiki/estimation/ (JSON: https://quants.wiki/estimation.json) Portfolio construction consumes a covariance matrix, and the covariance matrix is almost always the weakest input in the chain. Two failure modes dominate. The first is dimensional: as the number of assets approaches the number of observations the sample covariance matrix becomes ill-conditioned and eventually singular, and its inverse - which is what an optimiser actually uses - amplifies estimation error without bound. The second is definitional: there are at least five defensible estimators of a single asset's volatility from the same price data, they disagree, and each one's disagreement is a consequence of a stated assumption. This section gives the estimators, their parameter constraints, and worked values from one set of ten daily bars so the disagreement is visible in numbers. ### Why the sample covariance matrix fails as N approaches T The sample covariance matrix is an unbiased estimator of the true covariance matrix and is nonetheless useless in an optimiser when the number of assets is a material fraction of the number of observations. Unbiasedness of the matrix does not imply usability of its inverse, and it is the inverse the optimiser uses. Formula: S = (1/(T-1)) sum_t (r_t - rbar)(r_t - rbar)'. rank(S) <= min(N, T-1). S is singular whenever N >= T This is not a small-sample problem that goes away with more history. It is a ratio problem: doubling the asset count requires roughly quadrupling the observations to hold the parameter-per-observation ratio fixed, and history is finite and non-stationary.,The commonly stated rule that T should exceed N is far too weak. At N/T = 0.5 - twice as many observations as assets - the condition number of a sample correlation matrix estimated from pure independent noise is already 34, meaning the optimiser sees a factor-of-34 spread in risk where the truth is a factor of 1.,Adding assets to a portfolio makes the estimation problem worse faster than it makes the diversification better, past a point that depends entirely on T. This is the argument for factor models and for shrinkage, and it is quantitative rather than aesthetic. ### The Marchenko-Pastur bounds The limiting spectral distribution of a sample covariance matrix of independent unit-variance series. It gives the exact interval into which the sample eigenvalues spread when the truth is the identity matrix, which turns the question of how much of an eigenvalue spectrum is noise into arithmetic. Formula: With c = N/T fixed as both grow, the sample eigenvalues of the correlation matrix of independent unit-variance series fill [(1 - sqrt(c))^2, (1 + sqrt(c))^2]. Condition number = ((1 + sqrt(c))/(1 - sqrt(c)))^2 The bounds are asymptotic in N and T jointly, so they are a guide rather than a test at small N. They are nonetheless the right null: they say what the eigenvalue spectrum of pure noise looks like, and most of a real equity correlation spectrum lies inside them.,The result assumes the true covariance is the identity - independent series with equal variance. Real returns have a dominant market factor, so the largest empirical eigenvalue is usually far above the upper edge and is not noise. The bulk of the small eigenvalues typically is.,Filtering by discarding eigenvalues inside the bulk and rebuilding the matrix is one form of regularisation. Shrinkage is another, and it is smoother because it does not require a discrete cut. ### Condition number, and what it costs The ratio of the largest to the smallest eigenvalue of a symmetric positive-definite matrix. It bounds how much a relative error in the inputs to a linear solve is amplified in the output, which is exactly the operation a mean-variance optimiser performs. Formula: kappa(Sigma) = lambda_max / lambda_min. Solving Sigma w = b, a relative perturbation of size eps in b produces a relative perturbation of at most kappa * eps in w The condition number is the single most useful diagnostic on a covariance matrix before it is inverted, and it is one line of code. A matrix with a condition number in the thousands should not be handed to an unconstrained optimiser regardless of how it was estimated.,Constraints - long only, position limits, turnover limits - reduce the effective amplification by restricting the feasible set, which is why constrained optimisers are more stable than unconstrained ones even with a badly conditioned matrix. That is a robustness accident, not a solution.,The condition number of the correlation matrix and of the covariance matrix differ, because the volatility scaling itself spreads the spectrum. Both are worth checking; the correlation one isolates the dependence structure. ### Pairwise correlations that cannot all be true at once A correlation matrix must be positive semi-definite. Correlations elicited pairwise - from three separate estimates, three separate desks, or three different sample windows - can be individually plausible and jointly impossible. For three assets the admissible range of the third correlation given the other two has a closed form. Formula: Given rho12 and rho13, positive semi-definiteness requires rho23 in [ rho12*rho13 - sqrt((1-rho12^2)(1-rho13^2)) , rho12*rho13 + sqrt((1-rho12^2)(1-rho13^2)) ]. Equivalently det = 1 + 2*rho12*rho13*rho23 - rho12^2 - rho13^2 - rho23^2 >= 0 An unconstrained optimiser handed a matrix with a negative eigenvalue does not fail loudly. It returns a portfolio with an apparently negative variance and unbounded leverage in one direction, which looks like a spectacular result rather than an error.,Estimating each pairwise correlation on the window where that pair has the most data - a common and reasonable-sounding practice - produces exactly this failure, because the pairs are then not estimated from a common sample. Estimate the whole matrix on a common window, or shrink afterwards.,The three-asset closed form generalises only as the full positive-semi-definiteness condition; for N assets there is no simple per-entry admissible interval. Checking the smallest eigenvalue is the practical test at any N. ### Ledoit-Wolf shrinkage A convex combination of the sample covariance matrix and a structured target, with the weight chosen to minimise expected squared distance from the true matrix. The sample matrix is unbiased but high-variance; the target is biased but low-variance; the optimal blend has lower error than either. Formula: Sigma_hat = delta*F + (1-delta)*S, with F the shrinkage target. The optimal intensity is delta* = max(0, min(1, kappa/T)) with kappa = (pi - rho)/gamma, where pi is the sum of asymptotic variances of the entries of S, rho the sum of asymptotic covariances between the entries of F and of S, and gamma the squared Frobenius distance between F and the true matrix The shrinkage intensity is data-determined, not a tuning parameter, and that is the whole point of the result. Implementations that expose delta as a knob and default it to a round number have discarded the contribution and kept the form.,Shrinkage toward the identity destroys the correlation structure in proportion to delta. Shrinking toward a constant-correlation or single-factor target preserves more of it at the same regularisation, and is preferable when the target is a defensible approximation of the truth.,Shrinkage always biases the estimate. The claim is that it reduces total error, not that it reduces bias, and the claim holds only against the loss function the derivation minimises - expected squared Frobenius distance. If the downstream use is sensitive to a different functional of the matrix, the optimal delta for that use is different.,Shrinkage cannot manufacture rank. It makes a singular matrix invertible by lifting the zero eigenvalues off zero, but the directions those eigenvalues span were never estimated from data and the shrunk matrix simply asserts a value for them. ### Choosing shrinkage to hit a target condition number Because shrinkage toward a scaled identity acts on eigenvalues as an affine map, the intensity required to achieve any target condition number has a closed form. This gives a defensible alternative to a hand-picked delta when the goal is numerical stability rather than minimum Frobenius error. Formula: With eigenvalues lambda_1 >= ... >= lambda_N, target m and desired condition number k: delta = (lambda_1 - k*lambda_N) / ((lambda_1 - k*lambda_N) + m*(k-1)). The minimum delta for positive semi-definiteness is delta > -lambda_N/(m - lambda_N) when lambda_N < 0 This is regularisation for a numerical objective, not for a statistical one. It will produce a well-conditioned matrix from arbitrarily bad inputs, which is exactly the risk: a stable optimiser fed a fabricated matrix returns a stable, fabricated portfolio.,The affine eigenvalue map holds only for the scaled-identity target. For a constant-correlation or factor target the eigenvectors change too and there is no closed form for delta as a function of a target condition number.,Where both are available, prefer the Ledoit-Wolf data-determined delta and check the resulting condition number as a diagnostic. Use the closed form above only when the resulting condition number is unacceptable, and record that the choice was made on numerical grounds. ### EWMA variance An exponentially weighted moving average of squared returns. It has one parameter, no long-run mean, and no estimation step, which makes it the cheapest defensible volatility forecast and also the least informative about mean reversion. Formula: sigma2_t = lambda * sigma2_{t-1} + (1 - lambda) * r_{t-1}^2, with 0 < lambda < 1. Weight on the observation k periods back is (1-lambda)*lambda^(k-1). Half-life = ln(0.5)/ln(lambda). Centre of mass = lambda/(1-lambda) EWMA has no long-run variance to revert to, so its multi-period forecast is flat: the k-step-ahead forecast equals the one-step-ahead forecast for every k. That is a strong and usually false statement about term structure, and it is the main reason to prefer GARCH for anything beyond a one-period horizon.,The recursion needs an initial value, and at lambda = 0.99 the initialisation still carries 82 percent of the weight after 20 periods. A short backtest of an EWMA model is measuring its seed as much as its data.,Because the weights sum to 1 only in the infinite limit, a truncated implementation is biased downward unless the weights are renormalised. At lambda 0.94 and a 20-period truncation the weights sum to 0.709894, understating variance by 29 percent if left unrenormalised.,Using r^2 rather than (r - mu)^2 assumes zero mean. Over daily horizons that is harmless; over monthly horizons with a strong drift it is not, and the estimator then includes the squared mean in the variance. ### GARCH(1,1) Variance as a weighted sum of a long-run level, the last squared return, and the last variance. It is EWMA with a constant added, and the constant is what gives it a long-run mean and a term structure. Formula: sigma2_t = omega + alpha*r_{t-1}^2 + beta*sigma2_{t-1}. Constraints: omega > 0, alpha >= 0, beta >= 0, and alpha + beta < 1 for covariance stationarity. Long-run variance = omega/(1 - alpha - beta). Persistence half-life = ln(0.5)/ln(alpha + beta) alpha + beta must be strictly below 1. At exactly 1 the process is IGARCH: no long-run variance exists, shocks are permanent, and the unconditional variance is infinite. Fitted equity GARCH models routinely return alpha + beta above 0.98, which means the long-run variance implied by the fit is a large extrapolation from a nearly non-stationary process.,omega is the parameter that carries the long-run level and it is the hardest to estimate, because it is identified only by the slow mean reversion in the sample. A fit on two years of data pins alpha and beta and effectively guesses omega, and every long-horizon forecast is a function of omega.,EWMA is the special case omega = 0, alpha = 1 - lambda, beta = lambda, so alpha + beta = 1 exactly. That is why EWMA has a flat term structure: it is a boundary case of GARCH with no mean to revert to.,The one-step forecast of GARCH(1,1) and of a well-chosen EWMA are usually close. The models diverge at longer horizons, which is where the choice between them actually matters and where it is hardest to validate. ### Close-to-close volatility, and its two divisors The standard deviation of log close-to-close returns, annualised. The zero-mean variant divides the sum of squares by n; the sample variant subtracts the mean and divides by n-1. On short windows they differ materially and the zero-mean version is the defensible one, because drift is not estimable over a short window. Formula: Zero mean: sigma = sqrt( (A/n) * sum_t ln(C_t/C_{t-1})^2 ). Sample mean: sigma = sqrt( A * sum_t (x_t - xbar)^2 / (n-1) ), with A the annualisation factor Close-to-close is the only one of the five estimators that captures overnight gaps in full, because a gap is entirely contained in the close-to-close return. That is its one advantage over the range estimators and it is not small for single names around events.,It is also the least efficient: it uses one observation per day where the range estimators use two to four. On short windows the efficiency difference dominates every other consideration.,A close-to-close volatility on a series with a strong trend and the sample-mean divisor removes the trend from the volatility. Whether that is desirable depends on whether the trend is expected to persist. State the choice. ### Parkinson estimator Volatility from the daily high-low range alone. The expected squared range of a driftless Brownian motion over one period is 4*ln(2) times its variance, which gives an unbiased variance estimator with a single constant. Formula: sigma^2 = (A / (4*ln(2)*n)) * sum_t ln(H_t/L_t)^2, with 1/(4*ln(2)) = 0.36067376 The estimator is biased DOWNWARD on real data, always, for a reason that is structural rather than statistical: the true continuous high and low are never observed. A discretely sampled path has a smaller range than the continuous path it came from, so the observed range understates and so does the variance built from it.,It ignores the open and the close entirely, which means it cannot see an overnight gap. On a stock that gaps 5 percent and then trades in a 1 percent range all day, Parkinson reports a quiet day.,It assumes zero drift. A strong trend inflates the range without inflating the variance of the underlying diffusion, and Parkinson attributes all of it to volatility. Rogers-Satchell is the drift-tolerant alternative.,Because the estimator uses only two prices per bar, the choice of what counts as the high and low - consolidated tape, primary exchange, regular hours only - changes the answer, and those definitions differ across data vendors. ### Garman-Klass estimator A combination of the high-low range and the close-open return, weighted to minimise variance among estimators built from those two quantities. More efficient than Parkinson and subject to the same two assumptions. Formula: sigma^2 = (A/n) * sum_t [ 0.5*ln(H_t/L_t)^2 - (2*ln(2) - 1)*ln(C_t/O_t)^2 ], with 2*ln(2) - 1 = 0.38629436 The negative-contribution hazard is real and not rare on daily bars of illiquid names, where a large close-open move with a narrow intraday range is exactly what a gap-then-drift day looks like. Implementations either floor the per-bar contribution at zero, which biases upward, or floor the total, which fails silently. State which.,Like Parkinson it assumes zero drift and no opening jump. The close-open term is measured within the session, so an overnight gap is still invisible to it: the estimator sees the previous close nowhere in its formula.,The efficiency gain is theoretical and conditional on the assumptions. On real data with discrete sampling of the extremes, the realised gain is smaller, and the estimator's downward range bias partially cancels its efficiency advantage. ### Rogers-Satchell estimator A range-based estimator that is unbiased in the presence of a nonzero drift. It replaces the raw squared range with products of the distances from the high and low to both the open and the close, which cancels the drift term exactly. Formula: sigma^2 = (A/n) * sum_t [ ln(H_t/C_t)*ln(H_t/O_t) + ln(L_t/C_t)*ln(L_t/O_t) ] Drift independence is bought with efficiency. Rogers-Satchell is less efficient than Garman-Klass at zero drift, which is the case Garman-Klass was optimised for, and more accurate when a trend is present. Which is preferable depends entirely on the asset and horizon.,It still assumes no opening jump. The previous close does not appear in the formula, so an overnight gap contributes nothing, exactly as with Parkinson and Garman-Klass.,It shares the discrete-sampling downward bias of all range estimators. Every estimator on this list that touches H or L understates volatility for the same reason, and the understatement grows with the sampling interval between ticks. ### Yang-Zhang estimator A minimum-variance combination of the overnight return variance, the intraday close-open variance and the Rogers-Satchell variance. It is the only estimator in this list that handles both a nonzero drift and an opening jump, at the cost of two extra variance terms and a sample-size-dependent weight. Formula: sigma^2 = A * [ V_o + k*V_c + (1-k)*V_rs ], with V_o the sample variance of ln(O_t/C_{t-1}), V_c the sample variance of ln(C_t/O_t), both with divisor n-1, V_rs the per-period Rogers-Satchell mean, and k = 0.34/(1.34 + (n+1)/(n-1)) The weight k depends on n, so the Yang-Zhang estimate of a fixed period changes when the window is extended even if no new bar falls inside the period. That is a property of the minimum-variance derivation, not a bug, but it makes the estimator non-comparable across window lengths.,Two of the three components use a divisor of n-1 and a sample mean, so Yang-Zhang inherits the small-sample instability of the sample-mean close-to-close estimator. At n = 10 the overnight variance is estimated from nine degrees of freedom.,It is the correct default when overnight gaps matter - single names, anything around earnings, anything with a meaningful non-trading period. It is unnecessary for a 24-hour market with no session boundary, where the overnight term is zero by construction.,None of the six estimators is right and the others wrong. Each is unbiased under its own assumptions, and the 1.41-point spread on identical data is what the assumptions cost. Reporting a volatility without naming its estimator and its annualisation factor is not reproducible. ### The bias-variance tradeoff in window length A longer estimation window lowers the sampling error of a volatility estimate and raises its staleness bias when the true volatility varies. The sampling error has a closed form; the staleness bias does not, because it depends on the unobserved dynamics of the true volatility. Formula: For iid normal returns, relative SE of the sample standard deviation is approximately 1/sqrt(2n); exactly, SD(s)/sigma = sqrt(1 - c4(n)^2) with c4(n) = sqrt(2/(n-1))*Gamma(n/2)/Gamma((n-1)/2) There is no window length that is right in general, and reporting one without the horizon it was chosen for is reporting half a decision. An EWMA or GARCH specification replaces the discrete choice with a decay parameter, which is the same decision made continuously.,The closed-form standard error assumes iid normal returns. Under volatility clustering the effective number of independent observations in a window is smaller than n, so the real standard error is larger than the table shows - the table is a lower bound.,The two errors are not commensurable. Sampling error is symmetric and quantifiable; staleness bias is directional, largest exactly when it matters most - during a regime change - and cannot be estimated from the same window that suffers from it. #### Marchenko-Pastur eigenvalue bounds and the condition number by N/T For N independent series of T observations each with unit variance, the eigenvalues of the sample correlation matrix do not converge to 1. They spread across the interval [(1-sqrt(c))^2, (1+sqrt(c))^2] with c = N/T, and the condition number of the matrix is the ratio of the endpoints. The true matrix is the identity, so every value below is pure estimation noise. | c = N/T | Smallest eigenvalue | Largest eigenvalue | Condition number | Example | |---|---|---|---|---| | 0.05 | 0.602786 | 1.497214 | 2.4838 | 50 assets, 1000 observations | | 0.10 | 0.467544 | 1.732456 | 3.7054 | 24 assets, 240 observations | | 0.20 | 0.305573 | 2.094427 | 6.8541 | 50 assets, 250 observations | | 0.50 | 0.085786 | 2.914214 | 33.9706 | 50 assets, 100 observations | | 0.80 | 0.011146 | 3.588854 | 321.9969 | 200 assets, 250 observations | | 0.90 | 0.002633 | 3.797367 | 1441.9993 | 225 assets, 250 observations | | 0.95 | 0.000641 | 3.899359 | 6081.9998 | 238 assets, 250 observations | | 0.99 | 0.000025 | 3.979975 | 158402.0000 | 248 assets, 250 observations | | 1.00 and above | 0 | - | infinite, matrix singular | rank at most T-1 | #### Ten daily OHLC bars used for every volatility estimator below Ten consecutive daily bars, with a previous close of 100.00 before the first. All five estimators in this section are computed from exactly these numbers, annualised at 252 trading days, so their disagreement is a property of the estimators and not of the data. | Day | Open | High | Low | Close | ln(C/C prev) | ln(H/L) | ln(C/O) | |---|---|---|---|---|---|---|---| | 1 | 100.30 | 101.80 | 99.90 | 101.40 | +0.013903 | 0.018840 | +0.010907 | | 2 | 101.60 | 102.50 | 100.70 | 100.90 | -0.004943 | 0.017717 | -0.006914 | | 3 | 100.50 | 101.20 | 99.10 | 99.60 | -0.012968 | 0.020969 | -0.008996 | | 4 | 99.20 | 100.40 | 98.30 | 98.80 | -0.008065 | 0.021138 | -0.004040 | | 5 | 98.50 | 100.10 | 98.20 | 99.90 | +0.011072 | 0.019163 | +0.014113 | | 6 | 100.20 | 101.90 | 99.80 | 101.50 | +0.015889 | 0.020824 | +0.012891 | | 7 | 101.80 | 103.20 | 101.30 | 102.60 | +0.010779 | 0.018582 | +0.007828 | | 8 | 102.30 | 102.90 | 100.80 | 101.10 | -0.014728 | 0.020619 | -0.011800 | | 9 | 100.90 | 101.60 | 99.60 | 100.30 | -0.007944 | 0.019881 | -0.005964 | | 10 | 100.60 | 102.40 | 100.20 | 102.10 | +0.017787 | 0.021719 | +0.014800 | #### Six volatility estimators on the same ten bars All annualised at 252 and expressed in volatility points. The spread from lowest to highest is 1.41 points on identical data, which is the size of the definitional disagreement a reader should expect before any sampling error is considered. | Estimator | Annualised volatility, percent | Uses | Assumes | |---|---|---|---| | Close-to-close, zero mean | 19.6906 | closes only | zero drift; discards intraday information entirely | | Close-to-close, sample mean, divisor n-1 | 20.4623 | closes only | drift estimated from the same short window | | Parkinson 1980 | 19.0522 | high and low | zero drift, no opening jump, continuous monitoring of the extremes | | Garman-Klass 1980 | 19.9407 | open, high, low, close | zero drift, no opening jump; combines range and close-open | | Rogers-Satchell 1991 | 19.5043 | open, high, low, close | allows nonzero drift; still assumes no opening jump | | Yang-Zhang 2000 | 19.8563 | open, high, low, close, previous close | allows both drift and opening jumps; minimum-variance combination | #### Precision of a volatility estimate by window length For iid normal returns the relative standard error of the sample standard deviation is approximately 1/sqrt(2n). The exact value is sqrt(1 - c4(n)^2) with c4 the gamma-function bias factor. Longer windows reduce this error and increase staleness bias when the true volatility is time-varying: that is the whole tradeoff, and it has no general solution. | Window n | 1/sqrt(2n), approximate relative SE | Exact SD(s)/sigma | Relative SE, percent | |---|---|---|---| | 5 | 0.316228 | 0.341214 | 34.12 | | 10 | 0.223607 | 0.232237 | 23.22 | | 20 | 0.158114 | 0.161123 | 16.11 | | 24 (base series) | 0.144338 | 0.146621 | 14.66 | | 60 | 0.091287 | 0.091861 | 9.19 | | 120 | 0.064550 | 0.064752 | 6.48 | | 252 | 0.044544 | 0.044610 | 4.46 | | 504 | 0.031497 | 0.031520 | 3.15 | ## Portfolio construction Reviewed: 2026-08-27 Canonical: https://quants.wiki/portfolio/ (JSON: https://quants.wiki/portfolio.json) Every allocation rule in this section is applied to the same three-asset covariance matrix so the weights can be compared directly. Closed forms are given wherever they exist, because a closed form is checkable and an iterative solver is not. Where a rule requires iteration - equal risk contribution, hierarchical risk parity - the fixed-point condition is stated exactly and the converged answer is verified against the identity it must satisfy. The recurring failure mode across the whole section is the same one: every rule that uses expected returns is far more sensitive to them than to the covariance matrix, and every rule that inverts the covariance matrix concentrates on its least well-estimated direction. ### The unconstrained mean-variance solution 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 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. ### Tangency portfolio and the maximum attainable Sharpe ratio 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) 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. ### Minimum-variance portfolio 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) 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. ### Two-asset closed forms, and what they show 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) 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. ### Why optimisers maximise estimation error 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 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. ### Marginal and total risk contribution, and the Euler identity 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 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. ### Equal risk contribution, or risk parity 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 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. ### Inverse-volatility weighting is not equal risk contribution 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 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. ### Hierarchical risk parity 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 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. ### Black-Litterman posterior 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 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. ### Reverse optimisation for the equilibrium returns 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 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. ### Kelly leverage in continuous form 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 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. ### Fractional Kelly, and why half is the common choice 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 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. ### Transaction costs create a no-trade band 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) ] 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. #### The three-asset covariance matrix used throughout this section 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. | | Asset 1 | Asset 2 | Asset 3 | |---|---|---|---| | 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 | #### Six allocations on the same covariance matrix 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. | Rule | w1 | w2 | w3 | Portfolio volatility | Sharpe ratio at the stated m | |---|---|---|---|---|---| | 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 | #### Closed-form solutions 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. | Portfolio | Closed form | Worked value on the three-asset matrix | |---|---|---| | 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 | ## Backtest validity Reviewed: 2026-08-27 Canonical: https://quants.wiki/backtest/ (JSON: https://quants.wiki/backtest.json) A backtest is a selected result. The number reported is the maximum over however many configurations were tried, not a sample from the distribution of one strategy, and the difference is quantifiable. This section gives the arithmetic: what Sharpe ratio a true-zero strategy is expected to produce as the best of N trials, how long a backtest must be before a given Sharpe ratio survives that correction, how to deflate an observed Sharpe ratio for the number of trials and the non-normality of the returns, and how to cross-validate a model whose labels overlap in time. Every result here follows from one observation - that the maximum of N draws from a distribution is not a draw from that distribution - and the arithmetic is unforgiving. ### Why a backtest result is not an estimate The Sharpe ratio of a chosen strategy is the maximum over the configurations that were tried, and the maximum of N draws has a higher expectation and a smaller variance than a single draw. Reporting it as if it were a single estimate is a category error, not a small bias. Formula: If N independent configurations of a true-zero strategy are tested and each produces an estimated Sharpe ratio with standard deviation s, the expected best result is s * E[max Z_N], with E[max Z_N] = (1-gamma)*Z^-1(1-1/N) + gamma*Z^-1(1-1/(N e)) and gamma = 0.5772156649 N is almost never known, and it is always larger than the number the researcher reports. A grid search over three parameters with ten values each is a thousand trials whether or not the researcher thinks of it that way, and every abandoned data-cleaning decision adds more.,The independence assumption cuts in the researcher's favour. Correlated trials - neighbouring parameter values on a smooth surface - have a lower expected maximum than independent ones, so treating a grid search as N independent trials overstates the correction. The right adjustment is to an effective number of independent trials, which is smaller and hard to estimate.,The approximation is asymptotic in N and poor at small N. At N = 2 it gives 0.519755 against the exact value of 1/sqrt(pi) = 0.564190, an 8 percent understatement. It is accurate enough for the N values that matter.,No amount of out-of-sample testing fixes this if the out-of-sample period was consulted during development. The correction applies to the total number of times the data influenced a decision. ### Expected maximum Sharpe ratio from N trials The specific number a backtest has to beat. It is the standard deviation of the Sharpe estimator under the null multiplied by the expected maximum of N standard normals, and it is computable from three inputs: the sample length, the periodicity and the trial count. Formula: E[max SR_ann] = sqrt(P/T) * E[max Z_N] under a true Sharpe ratio of zero and iid normal returns, with P periods per year and T observations The comparison for the base series is the whole point of publishing it. A 0.94 annualised Sharpe ratio over two years does not clear ten trials, let alone the search that actually produced it. Nothing about the strategy is being criticised; the sample is simply too short to say anything.,The null assumes iid normal returns, which makes the standard deviation sqrt(P/T) rather than the more general sqrt((1 + SR^2/2)*P/T). At SR = 0 those coincide exactly, which is convenient: the null is the case where the simple form is correct.,Autocorrelated returns inflate the null standard deviation, so a strategy on smoothed data faces a higher threshold than this, not a lower one. ### Probabilistic Sharpe ratio The probability that the true Sharpe ratio exceeds a stated threshold, given the observed Sharpe ratio, the sample length, and the skewness and kurtosis of the returns. It converts a point estimate into a probability statement and it is the machinery the deflated Sharpe ratio is built on. Formula: PSR(SR*) = Z[ (SR_hat - SR*) * sqrt(T - 1) / sqrt(1 - gamma3*SR_hat + ((gamma4 - 1)/4)*SR_hat^2) ], with SR_hat and SR* per period, gamma3 skewness and gamma4 kurtosis (3 for a normal), and Z the standard normal CDF Note the kurtosis term uses (gamma4 - 1)/4, with gamma4 the full kurtosis, not excess. Substituting excess kurtosis is a common implementation error and it inflates PSR: on the base series it would give a denominator of sqrt(1 + 0.138642 - 0.030263) = 1.052557 rather than sqrt(1 + 0.138642 + 0.025391) = 1.078903, raising PSR(0) from 0.887023 to 0.895998.,Negative skewness raises the denominator here, because the -gamma3*SR_hat term is positive when gamma3 is negative. It therefore lowers PSR, which is the correct direction: negative skewness makes a given Sharpe ratio less trustworthy.,PSR against a zero threshold is not a defence against overfitting. It corrects for sample length and higher moments only. The threshold has to be raised to account for selection, which is what the deflated Sharpe ratio does. ### Deflated Sharpe ratio The probabilistic Sharpe ratio evaluated against a threshold set by the number of trials rather than against zero. It answers the question a backtest actually poses: given that this was the best of N attempts, what is the probability the true Sharpe ratio is positive. Formula: DSR = PSR(SR0) where SR0 = sd(SR across the N trials) * [ (1-gamma)*Z^-1(1 - 1/N) + gamma*Z^-1(1 - 1/(N e)) ]. All Sharpe ratios per period, not annualised The trial standard deviation is not a nuisance parameter to be assumed. It is measured from the Sharpe ratios of all the configurations tested, and it is precisely the quantity a researcher who only kept the winner cannot supply. A deflated Sharpe ratio computed with a guessed dispersion is a guess.,The base series drops from a PSR of 0.887 against zero to a deflated Sharpe ratio of 0.564 at ten trials and 0.317 at a hundred. Nothing about the data changed; only the honest accounting of how it was found.,DSR is a probability, not a Sharpe ratio, despite the name. It ranges over [0,1] and is not comparable with an ordinary Sharpe ratio in any way.,The framework treats trials as independent draws from a common distribution. A grid search over a smooth parameter surface violates that badly, and the correct effective N is smaller than the raw count. Both the raw count and any effective count should be reported, because the gap between them is the researcher's judgement. ### Minimum backtest length The sample length below which a claimed Sharpe ratio cannot be distinguished from the best of N trials on no-edge data. It is a function of the trial count and the target Sharpe ratio only, and it is a necessary condition rather than a sufficient one. Formula: MinBTL in years = (E[max Z_N] / SR_ann)^2, with the source giving the approximation MinBTL is approximately 2*ln(N)/SR_ann^2 The relationship is inverse-square in the target Sharpe ratio, which is why low-Sharpe strategies are effectively unverifiable. Demonstrating a true annualised Sharpe ratio of 0.5 against even 45 trials needs 20 years of data, which for most strategies exceeds the period over which the market structure was stable.,This is a necessary condition and not a sufficient one. A backtest longer than the minimum length has not been shown to be valid; it has merely not been ruled out on multiple-testing grounds alone. Look-ahead bias, survivorship bias and regime change are separate failures with separate tests.,The formula is stated in years and uses an annualised Sharpe ratio, so the periodicity of the data does not enter. A daily backtest and a monthly backtest of the same length in years face the same minimum, which is correct: more frequent sampling of the same period does not add independent information about the mean. ### How many trials it takes to find a spurious Sharpe of 2 The inverse of the expected-maximum calculation. Given a sample length, solve for the number of independent trials at which the expected best result from a strategy with no edge is an annualised Sharpe ratio of 2. The answer is a strong function of sample length and a weak function of the target. Formula: Solve E[max Z_N] = SR_target * sqrt(T/P) for N, where the left side is the Bailey and Lopez de Prado approximation and the right side is the target annualised Sharpe divided by the null standard deviation sqrt(P/T) The jump from about 243 trials at two years to about 146,000 at five years is the argument for length over cleverness, in one line. Because E[max Z] grows as sqrt(2 ln N), buying an extra unit of spurious Sharpe ratio costs exponentially more trials, while buying it with sample length costs only linearly more data.,243 trials on two years of data is well within a single afternoon of parameter exploration. A two-year backtest showing a Sharpe ratio of 2 is not surprising under the null and should not be treated as informative without the trial count.,These figures assume independent trials, which no real search satisfies. The effective number of independent trials in a correlated grid search is smaller than the raw count, so the real numbers of parameter combinations required are larger than shown - which makes long samples more important, not less.,The same arithmetic run backwards is the useful diagnostic: given how many configurations were actually tried and how long the sample is, what Sharpe ratio should have been expected under the null. If the observed result is below it, there is nothing to explain. ### Probability of backtest overfitting The probability that the configuration selected as best in sample performs below median out of sample. It is estimated by combinatorially symmetric cross-validation: split the sample into groups, form every balanced train-test partition, pick the in-sample winner in each, and record its out-of-sample rank. Formula: For each of the C(S, S/2) symmetric splits, let omega_c be the relative out-of-sample rank of the in-sample-best configuration, in (0,1). Define the logit lambda_c = ln(omega_c/(1 - omega_c)). PBO = P[lambda_c <= 0], the fraction of splits in which the in-sample winner ranks at or below median out of sample PBO measures the selection procedure, not the selected strategy. A low PBO says the researcher's method of choosing between candidates generalises; it does not say the winner has an edge. The two questions are separate and need separate tests.,The symmetric splits are contiguous groups, not random samples, precisely so that the temporal structure survives. Randomly permuting observations into folds destroys the serial dependence and produces a meaninglessly low PBO.,The procedure inherits the purging requirement: if labels overlap in time, the train and test groups must be purged and embargoed or the out-of-sample ranks are contaminated and PBO is understated.,PBO is not a probability that a strategy will lose money. It is a probability about the ranking of one configuration relative to its siblings, and a strategy can have a low PBO and no edge, or a high PBO and a real one. ### Look-ahead bias, and the forms that survive review Using information at time t that was not available at time t. The obvious forms are caught immediately; the forms that survive are the ones where the leakage is in a preprocessing step rather than in the signal. Formula: A feature x_t is admissible only if x_t is a function of information observable strictly at or before t. Any statistic computed over the full sample and then applied at every t violates this The magnitude of look-ahead bias is unbounded and unpredictable. Unlike multiple testing, it has no correcting formula: the only remedy is to rebuild the pipeline so the leak cannot occur, which is why point-in-time data infrastructure is not an optional refinement.,Full-sample feature normalisation is the leak most likely to survive a code review, because it looks like a preprocessing detail rather than a signal. It is also one of the most damaging, since it injects future information into every single observation rather than a few.,A leak often shows up as a backtest whose performance is implausibly stable across regimes. Real edges vary with the environment; a leak does not, because it has access to the whole sample everywhere. ### Survivorship bias Restricting a universe to entities that exist at the end of the sample. It removes the worst outcomes from the historical record by construction, and its direction is always favourable to the strategy. Formula: The bias is the difference between the return of the full historical universe including delistings and the return of the surviving subset. It is measurable only with a database that retains dead entities and their terminal values The test is structural, not statistical: count the entities in the universe at the start of the sample and at the end. If the entry and exit counts are zero, the universe is a survivor set regardless of what the vendor claims.,Because the magnitude is universe-specific, no published figure for the size of survivorship bias transfers to a different universe or period. Any correction has to be measured on the actual data, not imported.,Survivorship and look-ahead bias interact. A universe defined by today's membership is both survivor-biased and look-ahead-biased, and the two effects are not separable after the fact. ### Overlapping labels and the effective sample size When the label at bar t depends on prices over the following h bars, consecutive labels share most of their information. The raw observation count then overstates the independent information in the sample, and every standard error computed from it is too small. Formula: With one label per bar and each label spanning h bars, the approximate number of independent observations is T/h. Standard errors computed on T rather than T/h are understated by a factor of approximately sqrt(h) This is the most quantitatively severe error in the section because it is multiplicative on the t-statistic and because the fix looks like throwing away data. A model with a 20-bar holding period trained on daily bars has 20 times fewer independent observations than its row count suggests.,The problem is not solved by using non-overlapping labels only if the resulting sample is too small to train on - which it usually is. The honest approach is to train on the overlapping sample and evaluate significance on the effective count.,Sample weights proportional to average uniqueness are the standard partial remedy: they let the model use every row while down-weighting redundant information. They correct the fit, not the standard error, which still has to be computed on the effective count. ### Purged k-fold cross-validation Ordinary k-fold cross-validation leaks when labels overlap the test set in time, because a training label whose window extends into the test period was formed partly from test-period prices. Purging removes exactly those training observations. Formula: For a test set spanning [t1, t2] and labels at t spanning [t, t+h]: purge every training observation whose label window intersects [t1, t2], that is every t with t+h >= t1 and t <= t2. In the contiguous case this removes the h bars immediately before t1 in addition to the test set itself Without purging, cross-validated performance on overlapping labels is optimistic by an amount that grows with h. The failure is silent: nothing in the fit or the score indicates that the folds shared information.,Purging is necessary and not sufficient. It removes label-window overlap; it does not remove serial dependence in the features themselves, which is what the embargo addresses.,The purge width is determined by the label definition, so it is fixed once the prediction horizon is fixed. A researcher who lengthens the holding period must widen the purge, and the training set shrinks accordingly - a real cost of longer-horizon models that is usually overlooked. ### Embargo A block of observations after the test set that is excluded from training, on top of purging. It exists because features are serially correlated: a training observation immediately after the test period can carry information about it even when its label window does not overlap. Formula: After a test set ending at t2, exclude training observations in (t2, t2 + he] where he is the embargo length. Conventionally he is a small fraction of T, chosen to exceed the serial dependence length of the features The embargo length is a judgement, not a derivation, and it should be reported. An unstated embargo makes a cross-validation result irreproducible in exactly the way an unstated purge does.,On short samples the embargo and purge together can consume a fifth of the training set, as the 252-bar case shows. That is a real argument for longer samples rather than for skipping the correction.,An embargo is not a substitute for purging and purging is not a substitute for an embargo. They address different leakage channels - label windows and feature serial dependence - and both are needed when both are present. ### Walk-forward against combinatorial purged cross-validation Walk-forward testing produces exactly one out-of-sample path, so it yields one Sharpe ratio and no distribution. Combinatorial purged cross-validation forms every balanced train-test partition and assembles multiple distinct out-of-sample paths from them, giving a distribution of outcomes from the same data. Formula: With N contiguous groups and k held out per test set: C(N,k) splits and phi = C(N,k)*k/N distinct backtest paths. Walk-forward is the phi = 1 case The two answer different questions. Walk-forward asks what a process deployed at the time would have produced; combinatorial purged cross-validation asks how much of the in-sample result generalises. A researcher who reports only walk-forward has one number and cannot deflate it; one who reports only cross-validation has a distribution and no simulation of deployment.,Walk-forward has its own overfitting channel that is easy to miss: the choice of window length, refit frequency and the number of walk-forward variants examined are all trials, and they count toward N.,Both require purging and embargoing when labels overlap. Walk-forward is often assumed safe because it is chronological, but a label at the end of the training window that spans into the test window leaks in exactly the same way. ### Why a t-statistic of 2 is not enough The conventional 5 percent significance threshold assumes one test. In a literature or a research process with hundreds of tests, a t-statistic of 2 is the expected best of a modest search, and the threshold has to be raised to preserve the intended error rate. Formula: Under N independent tests, controlling the family-wise error rate at alpha requires a per-test threshold of approximately Z^-1(1 - alpha/(2N)) rather than Z^-1(1 - alpha/2). Harvey, Liu and Zhu 2016 argue for a threshold near 3.0 for newly proposed factors after multiple-testing adjustment Bonferroni is conservative because it assumes independence and controls the family-wise error rate, which is a strict criterion. False-discovery-rate methods are less conservative and are the better choice when the goal is to keep the proportion of false positives among discoveries low rather than to avoid any false positive.,The threshold depends on N, and in a published literature N is unknowable: it includes every test that was run and not published. Any threshold derived from a count of published results is a lower bound on the correct one.,Raising the threshold does not make a result true. It reduces the rate at which noise is accepted, at the cost of rejecting real effects with modest t-statistics - which, given the minimum backtest length arithmetic, includes most real effects. #### Expected maximum of N independent standard normals The Bailey and Lopez de Prado approximation uses the Euler-Mascheroni constant gamma = 0.5772156649: E[max] = (1-gamma)*Z^-1(1 - 1/N) + gamma*Z^-1(1 - 1/(N*e)). This is the expected best t-statistic from N independent trials of a strategy with no edge at all. The last column shows the cruder sqrt(2*ln(N)) approximation for comparison. | N trials | Z^-1(1 - 1/N) | Z^-1(1 - 1/(N e)) | E[max Z] | sqrt(2 ln N) | |---|---|---|---|---| | 2 | 0.000000 | 0.900453 | 0.519755 | 1.177410 | | 5 | 0.841621 | 1.449666 | 1.192594 | 1.794123 | | 10 | 1.281552 | 1.789242 | 1.574598 | 2.145966 | | 20 | 1.644854 | 2.088110 | 1.900708 | 2.447747 | | 45 | 2.009875 | 2.401003 | 2.235640 | 2.759225 | | 100 | 2.326348 | 2.680210 | 2.530603 | 3.034854 | | 500 | 2.878162 | 3.180243 | 3.052528 | 3.525509 | | 1000 | 3.090232 | 3.375895 | 3.255122 | 3.716922 | | 10000 | 3.719016 | 3.964416 | 3.860665 | 4.291932 | | 100000 | 4.264891 | 4.483073 | 4.390829 | 4.798526 | | 1000000 | 4.753424 | 4.951679 | 4.867860 | 5.256522 | #### Expected maximum spurious annualised Sharpe ratio, and trials needed for a Sharpe of 2 For a true Sharpe ratio of zero with iid normal monthly returns, the estimated annualised Sharpe ratio has a standard deviation of sqrt(12/T). The expected maximum over N independent trials is that standard deviation times E[max Z]. The right-hand column inverts the relationship: how many independent trials are needed before the expected best result is an annualised Sharpe ratio of 2. | Sample length T, months | SD of estimated annualised SR | Best of 10 trials | Best of 100 | Best of 1,000 | Best of 10,000 | Trials for an expected best SR of 2 | |---|---|---|---|---|---|---| | 24 (2 years) | 0.707107 | 1.1134 | 1.7894 | 2.3017 | 2.7299 | approximately 243 | | 60 (5 years) | 0.447214 | 0.7042 | 1.1317 | 1.4557 | 1.7265 | approximately 1.46 x 10^5 | | 120 (10 years) | 0.316228 | 0.4979 | 0.8002 | 1.0294 | 1.2208 | approximately 4.4 x 10^9 | | 240 (20 years) | 0.223607 | 0.3521 | 0.5659 | 0.7279 | 0.8633 | approximately 3 x 10^18 | #### Minimum backtest length in years The number of years of data required before the observed Sharpe ratio exceeds what N independent trials would produce by chance. Exact column uses (E[max Z_N]/SR_ann)^2; the approximation column uses 2*ln(N)/SR_ann^2 as given in the source. Below the minimum backtest length, an in-sample Sharpe ratio at that level is not evidence of anything. | N trials | Target annualised Sharpe | Minimum years, exact | Minimum years, 2 ln N / SR^2 | |---|---|---|---| | 10 | 1.0 | 2.4794 | 4.6052 | | 45 | 1.0 | 4.9981 | 7.6133 | | 100 | 1.0 | 6.4040 | 9.2103 | | 1000 | 1.0 | 10.5958 | 13.8155 | | 10000 | 1.0 | 14.9047 | 18.4207 | | 45 | 0.5 | 19.9923 | 30.4533 | | 45 | 1.5 | 2.2214 | 3.3837 | | 45 | 2.0 | 1.2495 | 1.9033 | #### Deflated Sharpe ratio of the base series against trial count The base series has a monthly Sharpe ratio of 0.272400 over T = 24 observations, with skewness -0.508966 and kurtosis 2.368633. The deflated Sharpe ratio is the probabilistic Sharpe ratio evaluated against a threshold SR0 = sd(trial Sharpes) * E[max Z_N]. The table assumes a standard deviation of 0.15 in the monthly Sharpe ratios across trials, an input that must be measured from the actual trial set rather than assumed. | N trials | E[max Z] | Threshold SR0, monthly | Deflated Sharpe ratio | |---|---|---|---| | 1 (no selection, PSR against zero) | 0.000000 | 0.000000 | 0.887023 | | 2 | 0.519755 | 0.077963 | 0.806286 | | 4 | 1.052123 | 0.157818 | 0.694739 | | 6 | 1.300141 | 0.195021 | 0.634561 | | 10 | 1.574598 | 0.236190 | 0.563936 | | 20 | 1.900708 | 0.285106 | 0.477480 | | 30 | 2.073392 | 0.311009 | 0.431868 | | 100 | 2.530603 | 0.379590 | 0.316870 | | 1000 | 3.255122 | 0.488268 | 0.168640 | #### Combinatorial purged cross-validation: splits and backtest paths With the sample divided into N contiguous groups and k of them held out in each test set, there are C(N,k) train-test splits and phi = C(N,k)*k/N distinct out-of-sample paths that can be assembled from them. Walk-forward is the single-path special case. | Groups N | Test groups k | Splits C(N,k) | Backtest paths | Train groups per split | |---|---|---|---|---| | 6 | 2 | 15 | 5 | 4 | | 8 | 2 | 28 | 7 | 6 | | 10 | 2 | 45 | 9 | 8 | | 12 | 3 | 220 | 55 | 9 | | 16 | 2 | 120 | 15 | 14 | | 20 | 2 | 190 | 19 | 18 | | 10 | 5 | 252 | 126 | 5 | | any N | k = N (all held out) | 1 | 1 | 0, no training data | | walk-forward | - | N-1 sequential fits | 1 | expanding or rolling | #### Purge, embargo, and the cost in training observations When a label at bar t depends on prices up to bar t+h, any training observation whose label window overlaps the test set leaks information. Purging removes those observations; an embargo removes a further block after the test set to break serial dependence in the features. The cost is stated as a fraction of the training set. | Total bars T | Folds | Test bars per fold | Label span h | Embargo | Bars removed from training | Percent of training set | |---|---|---|---|---|---|---| | 1000 | 5 | 200 | 20 | 20 | up to 40 | 5.0000 | | 1000 | 5 | 200 | 50 | 50 | up to 100 | 12.5000 | | 2520 | 10 | 252 | 20 | 25 | up to 45 | 1.9841 | | 1000 | 5 | 200 | 0 | 0 | 0 | 0.0000 | | 252 | 5 | 50 | 20 | 20 | up to 40 | 19.8020 | ## Execution and microstructure arithmetic Reviewed: 2026-08-27 Canonical: https://quants.wiki/execution/ (JSON: https://quants.wiki/execution.json) Execution cost is the part of a strategy's return that the backtest almost never contains, and it is arithmetic rather than judgement once the inputs are fixed. This section decomposes the total cost of an order into the four components that sum to implementation shortfall, states the three spread measures and the identity that links them, gives the square-root impact law with its capacity implication, and derives the optimal execution trajectory and the price-impact coefficient from the two models that are usually cited for them. Every worked example uses one order: a 500,000-share buy at a decision price of 50.00 in a name trading 5,000,000 shares a day at 2 percent daily volatility. ### Implementation shortfall The difference between the value of a hypothetical portfolio traded instantly at the decision price and the value actually achieved. It is the only cost measure that captures unfilled quantity, which is why it is the correct benchmark for an order and VWAP is not. Formula: IS = filled x (P_exec - P_decision) + unfilled x (P_final - P_decision) + fees, signed so that a positive value is a cost for a buy. The first term splits further into filled x (P_arrival - P_decision) for delay and filled x (P_exec - P_arrival) for impact Trading passively lowers impact and raises opportunity cost, and trading aggressively does the reverse. Any measure that captures one and not the other can be gamed: a trader benchmarked on impact alone can post at the far touch and never fill, and report an excellent number.,The decision price must be a real, recorded price at a recorded time, not reconstructed later. Reconstructing it is the point at which the measure becomes negotiable, and a shortfall computed against a reconstructed decision price measures nothing.,Delay cost belongs to the portfolio manager and impact belongs to the trader, which is why the split matters organisationally as well as arithmetically. Here delay is 9.00 basis points and impact 16.20, and they have different owners and different fixes.,Implementation shortfall is signed against the side. For a sell, every difference reverses sign, and a shortfall measure that does not carry the side explicitly will report a cost as a gain roughly half the time. ### Effective against quoted spread The quoted spread is what the book shows; the effective spread is what a trade actually paid relative to the midpoint. They differ whenever a trade executes inside the quote, and the ratio of the two is a measure of how much of the displayed spread a trader actually crosses. Formula: Quoted spread = (ask - bid)/M. Effective half-spread = D*(P - M)/M with D = +1 for a buy and -1 for a sell and M the midpoint at the time of the trade. The doubled convention reports 2*D*(P - M)/M for comparability with the quoted spread The quoted spread is a cost only for a trade that crosses it in full at the displayed size. For any trade larger than the displayed depth it understates the cost, and for any trade that executes inside the quote it overstates it. Neither error is small and they run in opposite directions.,The midpoint used must be the one prevailing at the moment of the trade, and on a fast tape the difference between the midpoint at the order and at the fill is comparable to the spread itself. Stale-midpoint effective spreads are systematically wrong in the direction of the price drift.,Effective spread measures one trade. An order worked over an hour has an effective spread per fill and an implementation shortfall for the order, and only the second one includes the price drift over the hour. ### Realised spread, price impact, and the identity between them The effective spread decomposes exactly into a realised spread - what the liquidity provider kept - and a price impact - what the trade revealed about value. The decomposition requires a post-trade horizon and it is the whole content of the adverse-selection story in measurable form. Formula: Effective half = D*(P - M_t)/M_t. Realised half = D*(P - M_{t+delta})/M_t. Impact half = D*(M_{t+delta} - M_t)/M_t. Identity: effective = realised + impact, exactly and by construction The identity is algebraic and holds for any delta, which means it is not evidence for any model. What the decomposition provides is an accounting split, and the split is only economically meaningful if delta is chosen to match the horizon over which information is incorporated - a modelling choice with no data-driven answer.,Delta is conventionally set to five minutes or to the end of the day. Those choices are conventions, and comparing a five-minute realised spread with an end-of-day one compares two different quantities.,The measured impact is contaminated by any market-wide move over delta. Subtracting a benchmark return over the same window is the standard correction and is more important the longer delta is. ### The square-root market impact law Market impact grows approximately with the square root of order size relative to volume rather than linearly. The functional form is stable across studies and venues; the coefficient is not, and must be fitted rather than assumed. Formula: Impact as a fraction of price = Y * sigma_daily * sqrt(Q/V), with Q the order size, V the average daily volume, sigma_daily the daily volatility, and Y a dimensionless calibration constant The square-root form is the reason capacity is finite but not sharply bounded. A linear law would imply a hard capacity limit; a square-root law implies costs that rise steadily and can always be paid at the expense of alpha, which is why capacity is a business decision rather than a physical constraint.,The form is empirical, not derived. It appears consistently in published fits, and the theoretical arguments for the exponent of one half are suggestive rather than conclusive. Treating it as a law of nature and the coefficient as calibratable has the emphasis backwards: both should be fitted, and the exponent checked.,sigma_daily and V must be measured over a window comparable to the order horizon. Using a one-year average volume for an order worked during an unusual volume day produces an impact estimate that is wrong by whatever factor the volume differs.,The law describes temporary plus permanent impact together in most formulations. Decomposing it matters for a strategy that trades back out, because only the permanent part is a genuine round-trip cost. ### Almgren-Chriss optimal execution The trajectory that minimises expected execution cost plus a risk-aversion multiple of its variance, under linear temporary and permanent impact. The solution is a hyperbolic-sine curve whose shape depends on one dimensionless parameter, and its two limits are TWAP and immediate execution. Formula: Minimise E[cost] + lambda*Var[cost]. The optimal remaining position is x(t) = X * sinh(kappa*(T-t))/sinh(kappa*T), with kappa^2 = lambda*sigma^2/eta in the continuous limit, eta the temporary impact coefficient and sigma the volatility. lambda to 0 gives x(t) = X*(1 - t/T), the linear TWAP schedule The model assumes linear temporary impact, which contradicts the square-root law in the same section. That is a real inconsistency in common practice: the trajectory is taken from a linear-impact model and the cost estimate from a square-root fit. Under square-root impact the optimal trajectory is different and generally less front-loaded.,The only free parameter with economic content is lambda, and it is a preference rather than a measurement. Presenting an Almgren-Chriss schedule as optimal without stating lambda states nothing: every schedule from TWAP to immediate is optimal for some lambda.,Permanent impact drops out of the optimisation for a fully executed order under the linear model, because the permanent cost is the same whatever the path. That is a consequence of linearity and does not survive a nonlinear impact function.,The solution is a static schedule computed at t = 0. It does not respond to price moves during execution, so it is a plan rather than a policy, and comparing it with an adaptive algorithm is comparing two different objects. ### VWAP and TWAP tracking error A schedule that spreads an order evenly in time matches the market's volume-weighted average price only if volume is evenly spread. The tracking error against VWAP comes entirely from the mismatch between the schedule's weights and the market's realised volume weights, interacting with the price path. Formula: Execution price = sum_i w_i * P_i for schedule weights w_i. Market VWAP = sum_i v_i * P_i for realised volume weights v_i. Slippage = (sum_i (w_i - v_i)*P_i) / VWAP. A schedule with w_i = v_i has zero slippage identically Expected TWAP slippage against VWAP is zero if the price path and the volume profile are uncorrelated. They are not: volume concentrates at the open and close and around news, which is also when prices move, so the covariance is systematically nonzero and its sign varies by market.,Beating VWAP is not the same as executing well. A trader who fully controls the schedule can match VWAP almost exactly by tracking volume, while an order that should have been done in the first ten minutes accumulates delay cost the VWAP benchmark cannot see. Implementation shortfall can see it.,The order's own volume is part of the market volume it is benchmarked against. For a large order this makes VWAP partly self-referential and the benchmark easier to beat the larger the order is, which is the wrong incentive. ### Kyle's lambda and market depth In the single-auction model of informed trading, the market maker sets a linear price schedule in total order flow. Its slope is the price impact per unit of net order flow, and its reciprocal is market depth. Both have closed forms in two parameters. Formula: P = P0 + lambda*(x + u), with x informed demand and u noise-trader flow. Equilibrium: lambda = sigma_0/(2*sigma_u) and informed intensity beta = sigma_u/sigma_0, where sigma_0 is the standard deviation of the terminal value and sigma_u that of noise flow. Depth = 1/lambda Impact is linear in this model, not square-root. That is a consequence of the normal-linear setup and a single auction; it is the clean benchmark rather than the empirical description, and the two should not be used interchangeably in the same cost model.,Depth is proportional to noise-trader volume and inversely proportional to the amount of private information. That is the substantive prediction: liquidity dries up when informed trading rises relative to uninformed flow, which is why depth collapses around scheduled announcements.,The exactly-half information revelation is a specific consequence of the one-period normal model and does not generalise. Its usefulness is as a benchmark: it says that in a well-functioning market a single round of trading impounds a substantial and calculable fraction of private information, not all of it.,Empirical estimates of lambda are regressions of price change on signed order flow, which is a different object from the equilibrium lambda above. The regression slope confounds the true impact with the endogeneity of order flow, and it is not the model's lambda. ### Adverse selection as a component of the spread A liquidity provider loses on average to counterparties who know more, so the spread must be wide enough to cover that loss out of the profit on uninformed flow. The realised-spread decomposition measures the split directly, and the illiquidity measures approximate it from public data. Formula: Effective half-spread = realised half-spread + price impact half-spread. The impact term is the adverse-selection component. Amihud's illiquidity measure approximates the same quantity from daily data as ILLIQ = mean over days of |return| / dollar volume Adverse selection sets a floor on the spread that no amount of competition among liquidity providers can breach. That is why spreads widen before earnings and around macro releases, and why a cost model calibrated on quiet periods understates event-day costs systematically.,For a strategy that is itself informed, adverse selection is the cost being paid rather than earned, and its size scales with how much the strategy's signal predicts the next few minutes. A fast signal is expensive to trade for exactly the reason it is valuable.,The measured impact component includes any market-wide move over the measurement horizon. Without subtracting a benchmark return, adverse selection is overstated on trending days in whichever direction the trades leaned. ### Turnover, cost drag, and break-even Cost drag is annual turnover multiplied by cost per unit traded, subtracted directly from gross excess return. Because volatility is unaffected, the entire effect lands on the Sharpe ratio, and the break-even turnover has a one-line closed form. Formula: Net excess return = gross excess - turnover x cost. Net Sharpe = (gross excess - turnover x cost)/sigma. Break-even turnover = gross excess / cost; break-even cost = gross excess / turnover Cost reduces the numerator and leaves the denominator alone, so the Sharpe ratio falls exactly in proportion to the return. That makes the drag arithmetic linear and easy, and it also means there is no diversification benefit to costs: they are a deterministic subtraction.,The break-even turnover figures look generous because the cost is held constant as turnover rises. It is not: higher turnover means larger orders per unit time and, under the square-root law, higher cost per unit traded. The real break-even is materially lower than the linear arithmetic suggests.,A backtest with no cost model is not a backtest with a small error. At 12x turnover and 30 basis points the drag is 360 basis points on a gross excess of 680, which is over half the return. The cost assumption is a first-order input, not a refinement. ### Capacity implied by the impact law Capacity is the size at which impact consumes the gross alpha. Under the square-root law it has a closed form in the participation rate, and the resulting limit is on participation rather than on absolute size. Formula: Impact equals gross alpha A when Y*sigma_daily*sqrt(Q/V) = A, so Q/V = (A/(Y*sigma_daily))^2. Capacity in shares per trading event is that participation times V Capacity being quadratic in alpha is the structural reason small edges do not scale. A 30 basis point edge and a 60 basis point edge differ by a factor of two in return and a factor of four in capacity, so the larger edge is worth eight times as much in absolute currency terms.,The calculation gives capacity per trading event, not assets under management. Converting requires the number of positions, the turnover and the holding period, and each of those interacts with impact, so a single capacity number without the whole portfolio specification is not meaningful.,The result depends entirely on Y, which must be fitted from realised fills. A capacity estimate built on an assumed Y is an assumption dressed as arithmetic, and the quadratic form means an error in Y is squared in the answer. #### Implementation shortfall decomposition, worked A buy of 500,000 shares. Decision price 50.00, so a decision notional of 25,000,000. Arrival price when the order reached the market 50.05. 450,000 shares filled at an average of 50.14; 50,000 shares unfilled with the price at 50.40 at the end of the horizon. Commissions and fees 0.20 cents per share on shares filled. Basis points are on the decision notional. | Component | Formula | Amount | Basis points | |---|---|---|---| | Delay cost | filled x (arrival - decision) | 22,500.00 | 9.0000 | | Market impact | filled x (execution - arrival) | 40,500.00 | 16.2000 | | Opportunity cost | unfilled x (final - decision) | 20,000.00 | 8.0000 | | Fees and commissions | filled x fee per share | 900.00 | 0.3600 | | Total implementation shortfall | sum of the four | 83,900.00 | 33.5600 | | Check: execution cost on filled shares | filled x (execution - decision) | 63,000.00 | 25.2000 | | Fill rate | filled / ordered | 0.900000 | - | #### Three spread measures on one fill Bid 49.98, ask 50.02, so the midpoint is 50.00 and the quoted spread is 0.04. A buy fills at 50.015. Five minutes later the midpoint is 50.005. All measures are expressed as a fraction of the midpoint at the time of the trade and stated in basis points. | Measure | Formula | Value, basis points | |---|---|---| | Quoted spread | (ask - bid)/M | 8.0000 | | Effective half-spread | D x (P - M)/M | 3.0000 | | Effective spread, doubled convention | 2 x D x (P - M)/M | 6.0000 | | Realised half-spread | D x (P - M_later)/M | 2.0000 | | Price impact half | D x (M_later - M)/M | 1.0000 | | Identity | effective = realised + impact | 3.0000 = 2.0000 + 1.0000 | | Effective over quoted | - | 0.750000 | #### Square-root impact by order size Impact as a fraction of price is Y times daily volatility times the square root of the participation rate. Daily volatility 2.00 percent, average daily volume 5,000,000 shares, price 50.00. Y is a calibration constant that must be fitted per venue and instrument; the values 0.5 and 1.0 below are stated illustrative choices, not estimates. | Order, shares | Participation Q/V | Impact at Y = 0.5, bps | Cost at Y = 0.5 | Impact at Y = 1.0, bps | Cost at Y = 1.0 | |---|---|---|---|---|---| | 250,000 | 0.0500 | 22.3607 | 27,950.85 | 44.7214 | 55,901.70 | | 500,000 | 0.1000 | 31.6228 | 79,056.94 | 63.2456 | 158,113.88 | | 1,000,000 | 0.2000 | 44.7214 | 223,606.80 | 89.4427 | 447,213.60 | | 2,000,000 | 0.4000 | 63.2456 | 632,455.53 | 126.4911 | 1,264,911.06 | #### Almgren-Chriss trajectory: fraction of the order still held For a linear-impact model with risk aversion lambda, the optimal remaining holding is x(t)/X = sinh(kappa*(T-t))/sinh(kappa*T), with kappa approximately sqrt(lambda*sigma^2/eta). The product kappa*T is the only parameter that matters for the shape. The risk-neutral limit lambda to 0 gives kappa to 0 and a linear, that is TWAP, schedule. | kappa x T | t/T = 0 | t/T = 0.25 | t/T = 0.50 | t/T = 0.75 | t/T = 1 | Half the order done by t/T | |---|---|---|---|---|---|---| | 0 (risk neutral, TWAP) | 1.000000 | 0.750000 | 0.500000 | 0.250000 | 0.000000 | 0.500000 | | 0.5 | 1.000000 | 0.736624 | 0.484772 | 0.240505 | 0.000000 | 0.484627 | | 1.0 | 1.000000 | 0.699724 | 0.443409 | 0.214952 | 0.000000 | 0.441837 | | 2.0 | 1.000000 | 0.587086 | 0.324027 | 0.143677 | 0.000000 | 0.321528 | | 5.0 | 1.000000 | 0.286359 | 0.081536 | 0.021588 | 0.000000 | 0.138602 | #### Turnover cost drag on the base series The base series has a gross annualised excess return of 6.8000 percent and an annualised volatility of 7.2063 percent, giving a gross annualised Sharpe ratio of 0.943622. Turnover is stated as the annual traded value divided by portfolio value and cost as basis points of value traded. | Annual turnover | Cost per unit traded, bps | Annual drag, bps | Net annual excess, bps | Net Sharpe ratio | |---|---|---|---|---| | 1.0x | 15.0 | 15.00 | 665.00 | 0.922807 | | 4.0x | 15.0 | 60.00 | 620.00 | 0.860361 | | 4.0x | 30.0 | 120.00 | 560.00 | 0.777100 | | 12.0x | 15.0 | 180.00 | 500.00 | 0.693840 | | 45.3x | 15.0 | 680.00 | 0.00 | 0.000000 | | 22.7x | 30.0 | 680.00 | 0.00 | 0.000000 | Reference information only. Not investment advice, and not a recommendation of any strategy, estimator or allocation. The estimators described here carry explicit assumptions - independence, stationarity, normality, zero drift, continuous monitoring, known parameters - and they are not interchangeable: two of them applied to the same data will disagree, and the disagreement is a property of the estimators rather than an error in either. Figures labelled Worked are arithmetic examples computed from the inputs stated alongside them; none of them is an empirical finding about any market, instrument or manager, and the published return series, OHLC bars and covariance matrix are constructed data for that purpose.