Act V · Portfolios, Strategies and the Firm
Part 31 of 43Risk Models, Costs and Trading Through Time
A backtest shows a Sharpe ratio of 3.9 before costs and 1.6 after. Which number is the strategy?
Between a forecast and a profit sit a risk model, a cost model and time. The fundamental law says skill times the square root of breadth, and the part shows how quickly that overstates things once the information coefficient varies. A factor risk model splits a portfolio's variance into what is shared and what is specific. Costs grow like the square root of size, which gives every strategy a capacity. With costs, the optimal portfolio moves only part of the way toward its target each day (Garleanu and Pedersen). August 2007, when crowded long-short books were unwound together, is the crisis file.
What you need. Parts 24 and 30.
What you will be able to do
Undergraduate
- State the fundamental law of active management and compute an information ratio from an IC and a breadth.
- Explain why trading costs grow with size and what capacity means.
Master's
- Estimate a cross-sectional factor risk model and decompose a portfolio's risk and P&L.
- Apply the square-root impact law; solve for the partial-adjustment trading rule under quadratic costs; combine alphas.
PhD
- Derive the information ratio when the IC is random (Qian and Hua; Ding) and its limit E[IC]/sd(IC); solve Garleanu-Pedersen's dynamic problem.
Industry
- Read a P&L attribution, and explain what crowding did in August 2007.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Undergraduate 14 min · Master's 43 min · PhD 53 min · Industry 25 min.
- 0Three point nine, or one point sixUndergraduate3 min
- 1The fundamental lawUndergraduate4 min
- 2Factor risk modelsMaster's5 min
- 3Specific risk and Bayesian betasMaster's4 min
- 4Transaction costs and the square-root lawUndergraduate4 min
- 5Trading toward a moving target: Garleanu and PedersenPhD5 min
- 6Multi-period optimizationMaster's3 min
- 7Alpha combinationMaster's3 min
- 8Decay, capacity and Berk-GreenMaster's3 min
- 9Crowding and August 2007Industry3 min
- 10P&L attributionIndustry3 min
- 11Evaluation protocol and independent limitsIndustry2 min
- 12Rule 31: the risk modelIndustry2 min
- For the researcher: the information ratio when the IC movesPhD5 min
- Recap, desk questions, problemsAll tracks3 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Reading · 中文 · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.
Three point nine, or one point sixUndergraduate3 min
Risk models, costs and trading through time: what a forecast is worth once it has to be held, measured against a risk model, and traded at a price.
Begin with an idealized benchmark: mean signal correlation five percent, five hundred assets and independent monthly periods. These assumptions describe a toy model rather than an attainable investment record. The usual small-correlation breadth formula gives a year. That is already above Grinold and Kahn's historical rules of thumb for active management. Now let the toy's latent correlation vary across months with standard deviation ten percent, while retaining its mean. The exact normalized-score calculation gives annually. The research chapter derives the finite-sample identity and explains why an observed rank IC cannot simply be substituted for this latent parameter.
Three questions organize the part. First, how does instability affect the idealized signal model, and what can empirical IC diagnostics actually tell us? Second, how sensitive is a saved historical calculation to a chosen cost model? The calm-coin example has gross Sharpe , versus at a hundred thousand dollars and at a million under its selected impact and fee assumptions. These are research scenarios, with execution, financing and portfolio-drift limitations. Third, what happens algebraically when a forecast variance approaches zero? Chapter eleven uses fixed labelled inputs to compare variance floors and independent position limits, alongside an evaluation protocol.
This is the second part of Act Five. Part thirty studied estimated inputs and portfolio weights. Here the covariance comes from a factor model, trades have costs and forecasts change while positions adjust. The workflow is forecast, measure risk, price the proposed trades and choose how far to move. The public-data examples are retrospective method demonstrations. Their saved calculations, modelling assumptions and limits are part of the lesson; they do not establish a point-in-time executable investment process.
Oldrich Vasicek showed in 1973 how to shrink an estimated beta; Barr Rosenberg built the first commercial factor risk models around the same time; and in 1989 Richard Grinold wrote down the fundamental law. Then the price of trading: the square-root law of market impact, Almgren and Chriss's optimal execution, the transfer coefficient, Berk and Green's model of why a manager's skill does not reach the investors, the information ratio with a moving IC, and the August 2007 quant quake. And the modern answers: Garleanu and Pedersen's dynamic trading, the anomalies that do not survive costs, convex multi-period optimization, and AQR's measurement of its own trading costs.
The plan: the fundamental law and its assumptions; factor risk models and calibration diagnostics; specific risk and shrunk betas; square-root costs and hypothetical capacity; trading toward moving targets, from Garleanu and Pedersen to multi-period optimization; combining signals; decay, crowding and the quant quake; return attribution; evaluation protocol and fixed risk-limit arithmetic; and the exact normalized-score information ratio when the latent correlation varies.
In the House, the portfolio and risk desk gets its risk model, its cost model and its trading rule, and the arrow from the portfolio desk to execution is drawn for the first time with a price on it.
1The fundamental lawUndergraduate4 min
In 1989 Richard Grinold wrote down the most quoted formula in active management. How much information ratio does a forecast's skill buy, and how many bets does it need?
A conditional benchmark takes four lines. Assume a fixed score vector, diagonal positive residual covariance, and nonnegative signal strength IC. Assume the expected residual return is IC times the specified residual-risk scale times the score. That calibration is a modelling input, not a consequence of a rank correlation estimate. Unconstrained mean-variance holdings are proportional to the forecast divided by residual variance. Their conditional gross information ratio squared is alpha transpose inverse covariance alpha, or IC squared times the squared-score norm. If that norm is BR, the result is IC times root BR. Unconditional realized returns, correlated risks, constraints and annualization require further assumptions.
The saved simulations use normalized score cross sections and a latent correlation drawn each period, clipped to stay between minus point nine nine and point nine nine. With constant small correlation, simulated information ratios are close to the familiar IC root N approximation. Even the exact constant-correlation toy has a small finite-correlation adjustment. At five hundred assets, increasing latent dispersion reduces the saved simulated ratio from about to . The last column retains the original helper's approximation. The research chapter distinguishes it from the exact finite-N identity and from measured sample correlations.
Constraints change the direction of the active portfolio. Clarke, de Silva and Thorley express that effect through a transfer coefficient under their signal and risk assumptions. In the equal-risk, centered-active-weight illustration, it is the correlation of the chosen active weights with the forecast direction. With a general covariance, the appropriate object is an angle in the risk metric, not an arbitrary raw-weight correlation. The saved example holds positive Gaussian scores in a long-only portfolio relative to equal weights. Across two hundred score vectors its average correlation is . This is a specific construction, not a universal optimum or a fixed fraction of skill lost by every constrained manager.
Breadth needs a definition. For an equally weighted average of equal-variance bets with the same expected payoff, its variance-equivalent count is N over one plus N minus one times average pairwise correlation. This is not a general formula for the best correlated-signal portfolio. Under those assumptions, a hundred bets at average correlation point two have effective count . Different expected payoffs, risk scales or portfolio weights can give a different comparison. Across time, trading frequency alone supplies no independent breadth. Overlapping forecasts and return dependence must be accounted for before multiplying a per-period information ratio by a square root of time.
For historical perspective, Grinold and Kahn use annual information ratios of one half, three quarters and one as rules of thumb for good, very good and exceptional active performance. These labels depend on the benchmark, period and fees. ICs quoted for equity signals also depend on horizon, universe and whether correlation is linear or rank based. The toy value near three point nine therefore invites an audit of calibration, independence, risk and costs. It is not evidence that every real manager falls short of a universal attainable bound.
Three restrictions of the benchmark matter. Asset count alone does not establish independent breadth; correlations and shared exposures matter. The latent correlation varies in the research chapter's toy, and that variation contributes nondiversifiable return variance. Observed sample IC variability requires a separate measurement analysis. The simple law is gross of trading costs. None of these observations turns it into a universal upper bound for every possible forecasting and portfolio model.
Pause and predict. An IC of point zero five, five hundred stocks, rebalanced monthly. What annual information ratio does the fundamental law promise?
2Factor risk modelsMaster's5 min
Part thirty showed that a sample covariance of many assets is mostly noise. The industry's answer, for fifty years, has been the factor risk model.
The idea in one line. Write returns as exposures times factor returns plus residuals. Assuming factors and residuals are uncorrelated, and residual covariance is diagonal, covariance is X F X transpose plus Delta. A full covariance of three thousand stocks has entries. Conditional on sixty factor exposures, the covariance model has parameters. This count excludes uncertainty in X: beta and volatility exposures themselves are estimated.
The machine, in five parts. Exposures: each asset's characteristics, standardised across the universe every day. Factor returns: a regression across assets, each day, of the next day's returns on today's exposures; the coefficients are that day's factor returns. A covariance of those factor returns, weighted toward the recent past. Each asset's residual variance, shrunk toward its peers. And for any portfolio, a risk forecast that splits into a factor part and a specific part.
The House builds one, on the coins of Part twenty-nine. Five style exposures, each known at the close: size, measured by dollar volume; beta to the market; recent volatility; momentum, skipping the last week; and the last five days' return, for reversal. Plus a market factor to which every coin has exposure one. Each characteristic is standardised across the coins that day and clipped at three standard deviations, so a single wild coin cannot dominate a regression.
An equity model has more. Dozens of industry exposures, one for each stock's industry, and in a global model, countries and currencies. The coins have no industries worth the name, so the House's model has none. Industries bring a technical problem: every stock is in exactly one, so the industry columns add up to the market column, and the regression cannot separate them. The commercial models add a constraint: the cap-weighted industry returns sum to zero, so the market factor is the market, and each industry is measured against it.
Factor returns come from one regression a day. Today's exposures explain next day's returns, with residuals defined by that fitted identity. The House uses weights proportional to square root of average quote volume and a ridge of ten to the minus six. Size here is a liquidity proxy, not market capitalisation. Without ridge, and with full rank, each coefficient is a unit-exposure mimicking portfolio return. Ridge perturbs that exact exposure property. The saved mean cross-sectional R squared is ; it measures a fit, not a future return.
These are arithmetic sums of the saved daily style-factor returns, including the late twenty-seventeen warm-up. They are not compounded wealth. The volatility factor's annualised arithmetic mean was percent; reversal's was percent. The displayed t statistics use an independent-day reference, without serial-correlation or selection adjustment. These retrospective means establish no future premium. Risk modelling needs covariance forecasts even for factors with no expected premium. The House's exponentially weighted squares and outer products are uncentred second moments, used as a zero-mean approximation.
How much forecast asset variance does this model assign to factors? First take the median fraction across eligible coins each day; then the median across dates. The saved value is percent. It is a forecast-variance allocation, not realised R squared or a general comparison of coins with stocks. Pooling common risk can reduce estimation demands, but only to the extent that the factors and covariance assumptions describe the book.
Check the scale of the forecasts. Divide each realised portfolio return by its forecast volatility. Their sample standard deviation is the bias statistic. With correct conditional scale and negligible conditional mean, its target is one. Independent Gaussian observations give an approximate ninety-five percent reference half-width of square root of two over T: about five point five percent for these six hundred fifty-two observations. Fat tails, serial dependence and adaptive books change that reference. All four saved statistics lie outside this narrow reference. Equal weights give ; the volatility-factor book gives . These scale discrepancies identify neither a unique cause nor a reliable pass or fail test under the actual data distribution.
There are three kinds of factor model. Fundamental models, like the one we just built, measure the exposures and estimate the factor returns. Statistical models estimate both from the returns alone, by principal components, as Connor and Korajczyk did in 1986: no economic labels, but quick to adapt. Macroeconomic models observe the factor returns, such as surprises in inflation and interest rates, and estimate each asset's exposures, as Chen, Roll and Ross did. Gregory Connor's comparison in 1995 found the fundamental kind explained the most.
The firm file. Barr Rosenberg founded Barra in Berkeley in 1975 to sell exactly this machine, built on his academic papers on what he called extra-market covariance; MSCI bought it in 2004. Its models, and those of its competitors, became the common language in which managers, clients and regulators talk about risk. That has a cost we will meet in Chapter nine: when everyone measures risk the same way, everyone sees the same opportunities.
Pause and predict. A portfolio's bias statistic is one point three over two years of daily data. Is the model over- or under-forecasting its risk, and by how much?
3Specific risk and Bayesian betasMaster's4 min
The factor model leaves two kinds of number to estimate asset by asset: a specific variance, and, in the simplest model, a beta. Both are noisy, and both are improved by the same trick.
Specific risk first. The House exponentially averages each asset's squared residuals. This is an uncentred second moment, approximating variance when residual means are negligible. It then shrinks toward the overall cross-sectional mean for that day. The coefficient is a fixed point three for every asset. Peer groups or stronger shrinkage for short histories are possible extensions, not features of this implementation.
Betas. Marshall Blume noticed in 1971 that betas estimated in one period regress toward one in the next. A portfolio with a high beta now will probably have a lower one later, and a low one a higher one; regressing the later betas on the earlier ones gives a slope of about two thirds. Two thirds of the estimate plus one third of one became the adjusted beta printed on financial terminals. Blume read it partly as real drift, and partly as the statistics of noisy estimates.
Oldrich Vasicek made the statistical part exact in 1973. Each estimated beta is the true beta plus noise whose variance we know from the regression; and the true betas themselves are spread around a mean. The best guess of the true beta is a weighted average of the estimate and the mean, weighted by their precisions: the noisier the estimate, the more it is pulled in. The spread of the true betas is estimated from the data: the variance of the estimates, less the average noise. Empirical Bayes, as in Part thirty's Bayes-Stein means. On the coins, with sixty days of data, the average weight on a coin's own estimate is .
One pair of calendar blocks. On the horizontal axis, each coin's beta estimated on sixty days; on the vertical, its beta over the next sixty. A perfect forecast lies on the dashed line. The cloud is flatter than the line: high estimates were too high, low ones too low. Shrinking slides each point horizontally toward the mean, and the cloud lines up closer to the diagonal.
The saved comparison uses consecutive sixty-calendar-day block pairs. The target is next block's estimated beta, not latent truth. Raw estimates have mean squared error ; shrunk estimates have , a reduction of percent in this sample. Eligibility in both blocks selects survivors using future availability. This is retrospective evidence under that selection, not a universal guarantee of shrinkage improvement.
Why it works. The largest estimates are the ones most likely to have been helped by luck; selecting on an estimate selects on its noise. It is the same idea for the fourth time in two parts: Stein's means, Ledoit and Wolf's covariances, Vasicek's betas, and the specific variances. Accept a little bias to cut much more variance. It fails when the prior is wrong: shrinking a new kind of asset toward the mean of a group it does not belong to.
Time alignment also matters. In a standard lagged-trading model, a stale asset price can bias same-day beta downward. This is not a universal sign result. Dimson sums coefficients from a joint regression on lagged, current and leading market returns. Scholes and Williams use separate regressions plus an adjustment for market autocorrelation. A leading return is an ex post estimation device, not information for a live forecast. Weekly aggregation may reduce timing mismatch, at the cost of fewer observations; it does not guarantee the bias disappears.
Pause and predict. A beta is estimated at one point eight with a standard error of point three. Across stocks, true betas have mean one and standard deviation point three. What is Vasicek's estimate?
4Transaction costs and the square-root lawUndergraduate4 min
Every bet it counts must be placed, and placing it moves the price against you.
Andre Perold gave the right accounting in 1988: implementation shortfall, the paper portfolio's return minus the real one, measured from the price when the decision was made. It has four pieces. Fees, known in advance. Half the bid-ask spread, paid by whoever wants to trade now. Market impact: the price moves while, and because, you trade. And the opportunity cost of trades not finished. For a large fund, impact is most of the bill.
A common empirical execution model is a square root. Define average execution shortfall as Y average times daily volatility times square root of participation. The coefficient depends on the market, execution and benchmark. If Q and V are currency notionals, multiplying Q by that average fraction gives money cost proportional to Q to the three-halves power. A terminal peak price displacement is different; integrating a particular square-root peak-impact path gives a two-thirds factor. With the scenario held fixed, doubling quantity multiplies this money cost by about two point eight. Extrapolating to very large participation is uncertain.
For a numerical scenario, take separate pooled medians of eligible asset-date observations. ADV is million USDT and daily volatility is percent; these medians need not describe one actual coin. A million-USDT trade has participation . With a chosen average-cost coefficient of one, the saved model gives percent. This is an illustrative execution-cost assumption, not an observed fill. Dollar labels assume USDT parity.
How large are costs in practice? Academic studies long had to guess, from public trade data, which trades belonged to one order. In 2018 Andrea Frazzini, Ronen Israel and Tobias Moskowitz, then at AQR, published the costs of a large manager's own executions, reported to be their firm's: one point seven trillion dollars of trades in twenty-one markets over nineteen years. They found costs about an order of magnitude smaller than earlier academic estimates, dominated by market impact, rising less than proportionally with size, as the square-root law says. Patient, careful execution changes the answer to whether an anomaly survives.
Robert Novy-Marx and Mihail Velikov asked which anomalies survive costs. In their samples and cost models, many low-turnover anomalies survived and high-turnover ones were more vulnerable. What helps is to trade less: a band around the target, inside which you do not trade, and a cost charged inside the optimisation rather than subtracted afterwards. The anomaly on paper is gross; the investable one is what is left.
The saved capacity scenario holds signal targets and notional book size fixed. Gross annualised Sharpe is . Chosen square-root average impact and five basis points of fees give at a hundred thousand dollars and at a million. Target differences omit portfolio drift, and financing, borrow, spread and delay are incomplete. Sharpe need not fall exactly as square root of size because costs also change its variance. This research-period scenario is not an executable future account.
Put costs inside the objective. Under fixed positive-semidefinite risk and nonnegative costs, maximise return less risk, smooth three-halves impact, and a separate proportional cost kappa times absolute trade. The whole current book is optimal precisely when every marginal return less marginal risk lies between minus and plus kappa. Pure three-halves impact has derivative zero at zero: without the proportional term it generically reduces trades but creates no exact no-trade band. A quadratic trade cost is another smooth approximation. It makes the next chapter's linear dynamic model tractable; it does not by itself create an inaction band.
A different, classical proportional-cost model yields a band. For a continuous diffusion with an interior frictionless target and nondegenerate local fluctuations, trade toward the band edge when the position exits. In the small-cost limit, with other coefficients fixed, the leading band half-width scales as kappa to the one-third power. The associated certainty-equivalent loss scales as kappa to the two-thirds power. In that asymptotic regime, cutting kappa eightfold halves the leading band width. These are conditional diffusion asymptotics, distinct from the smooth three-halves impact objective.
Pause and predict. A strategy nets six percent a year at a hundred million dollars, after costs of two percent. Under the square-root law, what does it net at four hundred million?
5Trading toward a moving target: Garleanu and PedersenPhD5 min
Nicolae Garleanu and Lasse Pedersen solved, in 2013, the problem every systematic trader faces each morning: the forecasts have moved, trading costs money, and they will move again tomorrow.
Specify the timing before using the closed form. Signals have linear conditional dynamics and finite second moments. B f denotes the conditional next return, absorbing any one-step signal decay into B. In this Bellman convention, d equals one minus rho. Operating return and risk are discounted by d; the current trade cost is paid now; continuation value is discounted by d. Assume known fixed positive-definite covariance, positive risk aversion and quadratic cost, unconstrained notional holdings and a well-posed infinite horizon. Phi is diagonal here. Its entries parameterise geometric decay, rather than a universal description of empirical signals.
Linear dynamics and quadratic costs give a quadratic value function. Matching Bellman coefficients gives a Riccati equation. Under these assumptions, trade a fixed fraction toward an aim portfolio. The fraction is a over lambda, with a the displayed positive root and rho bar equal to one minus rho. With zero or negligible discount and costs large relative to risk aversion, the rate is approximately square root of gamma over lambda. Quadrupling costs then roughly halves speed. At fixed positive rho and arbitrarily large lambda the rate instead behaves as gamma times one minus rho, divided by rho lambda.
And the aim portfolio is the insight. It is a weighted average of the Markowitz portfolio today and the Markowitz portfolios expected in the future. For signals that decay geometrically, that average is today's Markowitz portfolio with each signal discounted. A slow signal keeps almost all its weight. A fast signal is cut, because it will have decayed before you finish trading on it. Aim in front of the target, and move partway.
Here is what it looks like, for one asset driven by a slow and a fast signal. The Markowitz target jumps around with the fast signal; a myopic trader chases it, and pays for every jump. The aim portfolio discounts the fast signal, so it moves less. And the optimal holdings move only part of the way toward the aim each day: a smooth path that follows the slow signal and ignores most of the fast one's noise.
Is the formula right? The House checks it the slow way. Iterate the Bellman equation on a quadratic value function until it stops changing, and read off the trade rate and the aim weight. They agree with the closed form to every digit shown, for cheap and expensive trading and for slow and fast signals.
A special cost matrix makes the multi-asset policy simple. If the quadratic cost matrix is lambda times the fixed return covariance, all assets share a scalar adjustment rate. Each moves the same fraction of its gap toward the aim. With a general positive-definite cost matrix, risk and liquidity interact through a matrix Riccati equation. Its modes can mix assets; a simple asset-by-asset fast-versus-slow rule does not describe the general solution.
The saved research comparison uses two signals. Calm has persistence proxy phi , corresponding to geometric half-life days. Three-day reversal has proxy . These are derived from average cross-sectional Pearson score correlations, not fitted individual time-series autoregressions. Signal coefficients use training rank correlations and the full research period's volatility scale; persistence also uses the full research period. This comparison includes estimation data and is not a holdout test.
The saved research result as quadratic cost increases. In the near-free numerical limit the traders agree: . As costs rise, the myopic trader, who chases the Markowitz target every day, falls to at lambda eight and at thirty-two. Garleanu and Pedersen's trader keeps and , by trading and then percent of the way each day and cutting the fast signal to of its weight.
Three conditional lessons. With strictly positive quadratic costs, partial trading balances present and future objectives. The free-cost limit is full adjustment. Persistent signals receive greater relative weight than fast signals. With positive decay, neither weight exceeds its own raw Markowitz weight. Estimated risk, nonlinear impact and constraints require further modelling. A convex multi-period formulation accommodates some of those features, but does not remove estimation error.
Pause and predict. Trading costs quadruple. Roughly how does the optimal trade rate change, and what happens to the weight of a fast signal in the aim?
6Multi-period optimizationMaster's3 min
Garleanu and Pedersen's closed form needs quadratic costs and no constraints. Real books have neither. The modern answer gives up the closed form and keeps the idea.
In 2017 Stephen Boyd and coauthors set out the general version. Plan a path of holdings over the next H periods, using a forecast for each: maximise expected return, less any convex measure of risk, less any convex trading cost, such as the spread and the three-halves power of impact. Add any convex constraint on every planned period. Then execute only the first trade, and tomorrow, with new forecasts, plan again. It is a convex problem, which standard solvers handle quickly for thousands of assets.
The receding horizon. Each day, plan several periods ahead, execute the first step, and move the window forward. This is model predictive control. Replanning incorporates new information; it does not make an inaccurate forecast correct. Forecast error, covariance error, solver accuracy and actual execution all remain relevant.
What the plan needs is a forecast for every period ahead. For returns, a term structure: each signal's forecast decays at its measured speed, as in Chapter five. For risk, often today's estimate, held constant, since risk is far more persistent than alpha; or a GARCH forecast from Part seven. And for costs: volume and spreads vary by the hour and the calendar, so the plan moves trades into the periods when trading is cheap.
Separate position constraints from model safeguards. Position, liquidity, exposure and turnover limits define a feasible set when expressed as convex constraints. They restrict planned positions; they do not guarantee realised risk or execution. A variance floor changes the risk input rather than adding a position constraint. Chapter eleven illustrates the distinction with fixed numbers, without a market experiment.
A fixed mathematical toy, not a trading backtest. One asset, geometric forecast decay of fifteen percent, fixed risk, and a smooth approximation to three-halves impact. All three numerical solves converged. The frictionless target uses the same period indexing. The one-period solution starts at . Five periods starts at . Forty periods starts at ; its complete path is shown. All horizons have free terminal holdings, not forced liquidation. Their objectives differ, so these paths illustrate boundary effects, not a theorem that more periods always improve the first trade.
Three lessons about objectives. A one-period model values only one period of future benefit. A finite horizon and its terminal assumptions create boundary effects; neither the size nor the sign of the first-trade difference is universal. With matching quadratic costs, timing, discount, forecasts and no constraints, an infinite-horizon limit can recover the Riccati policy. The displayed three-halves toy is a different cost model.
Pause and predict. A forecast is expected to last only one day. Does a longer planning horizon change today's trade much?
7Alpha combinationMaster's3 min
A desk never has one signal; Part twenty-nine mined thousands. Before the optimizer sees them, they must become one forecast per asset.
Start with a population Pearson-correlation identity. Standardise a finite-variance target and the scores. Assume a fixed positive-definite score correlation matrix and a feasible joint covariance. The maximum squared correlation of a linear combination with that target is ic transpose C inverse ic, between zero and one. The optimal direction is C inverse ic. Uncorrelated scores give a sum of squared Pearson correlations. Daily rank ICs and correlations of an IC time series are different objects. Estimated inputs also carry estimation and selection error.
Six signals on the coins: the five style exposures of Chapter two, and the mined alpha of Part twenty-nine. In blue, each signal's average daily IC in 2018 and 2019; in teal, in 2020. The mined alpha is the strongest in both, and then . Low volatility is next, with a negative sign. Momentum changed sign between the two periods, and reversal's IC grew several times over.
Three saved combinations. Equal magnitudes use each signal's training sign. IC weights use training rank ICs. Ridge instead minimises pooled squared raw-return error, without an intercept, with missing score entries filled by zero. The penalty shrinks raw coefficients toward zero. After normalisation, very large ridge tends toward the X transpose y direction, not equal weights. Its objective is not average daily rank IC.
The saved average daily rank ICs. Unpenalised regression has training IC . Its squared-error objective does not mathematically guarantee the best rank IC. In twenty-twenty it scores , IC weights , and equal weights . The previously mined signal alone scores . Multiple ridge choices and the earlier search reused these research data; this is not independent holdout evidence.
Read the comparison as descriptive. It is consistent with unstable or noisy estimates and an objective mismatch, but does not identify one cause. One signal winning marginally does not prove that others contain no conditional information. Slow refitting, explicit shrinkage toward a chosen prior and evaluation of the traded book are possible design choices. Selecting them after repeatedly inspecting the same validation years requires fresh future evaluation.
Horizon changes how forecasts enter a trading objective. Under Chapter five's particular quadratic model, slow signals receive higher relative aim weights. A separate weak-signal approximation, with independent return innovations and fixed variance, gives the displayed horizon correlation. For positive decay it eventually falls as one over square root of horizon. Optimising a fixed-horizon IC is not generally equivalent to the dynamic trading policy.
Where to combine is another choice. Combining forecasts and optimising jointly makes shared risk and costs explicit. Separate signal books can also send orders to a central netting layer; both sides pay spreads only if opposing orders are actually routed to market. With coupled risk, costs or constraints, the sum of separate optima generally differs from a joint optimum. Special linear or separable cases can agree. Internal netting helps execution but need not recover the joint risk decision.
Pause and predict. Two signals each have an IC of point zero four, and their scores correlate point five. What is the IC of their best combination?
8Decay, capacity and Berk-GreenMaster's3 min
A signal's speed sets its turnover, its turnover sets its costs, and its costs set how much money it can manage. Then the question is who keeps the profits.
Relate persistence to score changes carefully. For a stationary matched pair of unit-variance scores with correlation one minus phi, the difference has variance two phi. Its root-mean-square change is square root of two phi. Expected absolute change has proportional scaling only with a fixed increment distribution; portfolio turnover also depends on normalisation, universe and drift. The two saved persistence proxies give and . Their ratio is a score-change illustration, not measured turnover of the two books.
Choose an objective for size. Assume fixed positive gross return g and coefficient c, with dollar profit g A minus c A to the three-halves power, and no other costs, constraints or risk objective. Break-even size is g over c squared. Differentiating dollar profit gives an optimum of four ninths of break-even. Net return there is g over three before manager fees. This identity belongs to this fixed-input model, not a universal definition of capacity.
The same dimensionless fixed-input toy. Net return divided by g falls as square root of relative size. Profit divided by g times break-even size is multiplied by four for visibility. The full curve, including its negative tail, is shown. Profit peaks at four ninths. A fee contract can change incentives; the next model specifies one rather than assuming every manager wants unlimited assets.
Berk and Green model rational fund flows with decreasing returns to scale. Expected risk-adjusted alpha before fees is skill minus size-dependent costs. Ideal rational flows expand the fund while expected net alpha is positive. In equilibrium expected net alpha is zero; realised returns and total expected returns need not be zero. Manager fees collect the remaining rent after trading costs. In this model, past returns update beliefs and move assets, so weak return persistence can coexist with skill. This is a model implication, not proof that every observed flow is rational.
Consider a particular known-skill square-root-cost extension. Let skill a and c be positive and restrict the fee between zero and a. The zero-expected-net-alpha flow condition determines size. Maximising fee revenue gives a divided by three. The resulting size is four ninths of the no-fee break-even size, matching the earlier profit optimum under these assumptions. Other technologies, uncertainty or contracts need not give the same fee or size.
Empirical evidence is more qualified. Berk and van Binsbergen report value-added patterns in their fund sample; those measurements depend on their benchmark and assumptions. Capacity incentives are one possible reason to restrict outside money, not an identified explanation of every closure. A desk should state the capacity objective and show sensitivity to costs and size. The one-third-edge rule is the preceding toy's result, not a general capital-allocation rule.
Pause and predict. A strategy breaks even at nine hundred million dollars. At what size does it make the most money, and what share of its gross return do investors keep there?
9Crowding and August 2007Industry3 min
A risk model that everyone uses steers everyone toward the same trades. In the second week of August 2007, that bill came due.
The crisis file. In the week of the sixth of August 2007, many quantitative long-short equity funds lost heavily in three days, while the stock market moved much less than some reported fund losses. On the thirteenth, Goldman Sachs said it would put three billion dollars, with outside investors, into its Global Equity Opportunities fund, a quantitative long-short fund that had lost, as reported, about thirty percent. Its explanation named overlapping trades, rising volatility and rising correlations.
A contrarian proxy related to Khandani and Lo's work. Negate yesterday's return minus the cross-sectional mean, then divide by total absolute deviation. This gives zero net dollars and unit gross exposure when defined, not beta neutrality. Next day's weighted return measures the contrarian payoff. Calling it liquidity provision requires an economic interpretation beyond the weight formula.
The saved replay uses forty-nine French industry portfolios, prior-day weights and unit gross exposure. It is not a reconstruction of individual stocks or fund holdings. The curve adds daily proxy payoffs rather than compounding wealth. On August eighth the payoff was percent and on the ninth percent. Reference daily standard deviation is percent over January twenty-oh-six through June twenty-oh-seven, not a confidence interval. August tenth returned percent. Missing returns are filled by zero and costs are omitted. The shape resembles the reported stock-level episode, but the magnitude is a different proxy.
Khandani and Lo's explanation, offered as a hypothesis. A large fund with a similar book had to raise cash, perhaps because of losses elsewhere as the credit markets broke. It sold its longs and bought back its shorts quickly, moving prices against everyone who held the same positions. The others lost, hit their risk limits, and unwound too. When the selling stopped, prices snapped back.
A stylised model example, separate from the industry replay. Suppose a book is neutral to the factors its chosen model contains. A diagonal-residual model then forecasts the sum of squared holdings times specific variances. This need not be small: gross leverage and concentration still matter. If residuals co-move during crowded unwinds, omitted covariance can raise realised risk. This does not establish that every historical fund was factor neutral or that every vendor omitted crowding.
Crowding is imperfectly observed. Lou and Polk study excess residual correlation in momentum portfolios, called comomentum, and its associations with later returns. This is a proxy, not a count of arbitrageurs or a guaranteed prediction. Short interest, participation in market volume and correlation with peer funds provide other incomplete gauges. Stress tests of joint unwinds and liquidity-sensitive limits address scenarios that ordinary covariance estimates can miss.
Two lessons. Neutrality is relative to a specified factor set; shared residual risks can remain. The industry proxy's saved nineteen-ninety-seven to twenty-oh-seven Sharpe is . That descriptive result does not prove that all industries trend, that all stock reversal is a liquidity premium, or that every liquidity strategy has the same crash exposure. The unwind account remains an economic hypothesis.
Pause and predict. Your book's forecast volatility is four percent a year, and it is neutral to every factor in your model. Name one way it could lose ten percent in a week.
10P&L attributionIndustry3 min
Every morning a risk desk answers one question about yesterday: where did the money come from? The factor model answers it exactly.
Multiply the fitted return identity by aligned holdings. Portfolio return is factor exposures times realised factor returns plus residual return, exactly as accounting for that model. Each factor contribution is exposure times return. Specific return means residual relative to this factor set; omitted factors, noise and fitting choices remain. It is not automatically selection skill or a payoff no traded instrument could replicate.
An older benchmark-relative accounting split. Allocation uses sector weight differences times benchmark-sector return minus total benchmark return. With fully allocated sector weights it is the displayed allocation identity. Using portfolio weights on within-sector return differences combines selection and interaction. Other Brinson conventions separate those terms. Factor attribution extends the accounting idea, but its factors need not be sector portfolios.
Apply the accounting to the previously selected Part twenty-nine formula in the research sample. Saved gross annualised arithmetic return is percent. The volatility-factor contribution is percent. The attribution uses a fitted factor basis, not a causal experiment. Residual annualised return is percent. This residual is model dependent and is not automatically the formula's own skill.
The paths are arithmetic sums of daily fitted components. Total and factor components move closely in this sample. Residual return has its own path. Saved annualised Sharpes are and . Factor-component variance divided by total variance is percent. This ratio is not an additive risk attribution: factor--residual covariance can matter and the ratio can exceed one.
Interpret the model dependence. Much of the formula's saved return aligns with the fitted low-volatility factor. An investor could compare implementable factor alternatives, including their own costs; a regression factor is not automatically a cheap investable product. Neutralising candidates before scoring is a possible future research design, not a demonstrated repair here. Residual performance still contains omitted factors and noise, and any new search needs honest validation.
One exact sample identity. Mean exposure times next-period factor return equals mean exposure times mean factor return plus their sample covariance, defined with divisor T. The first term is static exposure times the realised sample factor mean, not proof of an expected premium or cheap replication. The covariance describes timing in this sample. Repeatable timing skill requires further evidence and aligned, available exposures.
Volatility also has an Euler attribution when covariance is fixed positive semidefinite and portfolio volatility is positive. Holding times marginal volatility contributions sum to total volatility. Under factor--residual orthogonality, the displayed factor contribution is exposure times covariance with the factor component, divided by portfolio volatility. Specific contributions complete the total. Contributions can be negative for hedges. They are shares of forecast volatility in a specified covariance model, distinct from the earlier descriptive variance ratio.
Pause and predict. A fund returned twelve percent. Its average market beta was point four, the market returned twenty percent, and the timing term was two percent. How much came from selection?
11Evaluation protocol and independent limitsIndustry2 min
Separate an evaluation protocol from risk-limit arithmetic. This numerical example uses chosen fixed inputs, with no market backtest.
Specify the full decision process before evaluation. This includes data timing, signals, risk, costs, constraints and the selection of alternatives. A change informed by inspected outcomes needs honest new evaluation; the same outcomes cannot supply independent evidence. Existing registration metadata totals twenty-three thousand five hundred thirty-five through this part, including ten existing charges. Restoring unchanged research calculations adds no trials and supplies no sealed-period verdict.
Choose two assets with identical forecasts of ten to the minus five and risk aversion one. Daily variances are chosen as ten to the minus eight and four times ten to the minus four. Unconstrained diagonal arithmetic gives one thousand and point zero two five times a unit book. There is no budget constraint, cost or market observation in this example. At nonzero forecast, inverse variance makes positions diverge as variance approaches zero.
Apply existing House functions to the same chosen numbers. A variance floor of ten to the minus four gives positions point one and point zero two five. A five-percent absolute book cap gives point zero five and point zero two five. Chosen daily volumes of point five and point one book units, with a ten-percent volume cap, give point zero five and point zero one. This is a position bound, not an execution schedule.
Interpret the arithmetic narrowly. A floor changes a model input; a cap changes the feasible set. Clipping is not a general constrained multi-asset solution. They bound this toy but establish neither model validity nor profitability. Thresholds, universe exclusions and combined constraints must form a specified policy. Changing a policy in response to inspected outcomes still changes the research procedure.
Pause and predict. Which operation changes a risk input, which bounds positions, and does either establish future profitability?
12Rule 31: the risk modelIndustry2 min
The House's thirty-first rule: what a strategy must show about its risk, its costs and its trading before it is given capital.
The first sheet collects different types of evidence. Normalised-score simulations; a model-dependent forecast-variance fraction; calibration statistics with an independent Gaussian reference; estimated-beta prediction errors; and saved research cost and trading scenarios. Factor-component variance divided by total variance is a descriptive ratio, not additive risk attribution. Chapter eleven adds fixed arithmetic showing how independent caps bound positions. Existing registration metadata is twenty-three thousand five hundred thirty-five through this part. None of these rows supplies a sealed-period performance verdict.
The House's existing daily factor regression. Keep assets with complete exposures and a return, apply square-root-quote-volume weights, solve with a small fixed ridge, then define fitted residuals. The factor-return fit is one component; covariance estimation and its assumptions are separate steps. Ridge stabilisation does not remove input or model uncertainty.
The existing scalar trade rate and its mathematical check. Quadratic value iteration agrees with the closed form for specified fixed model inputs. This verifies internal policy algebra, not profitability or optimality under estimated market dynamics. Timing and discount conventions must match the Bellman equation.
Two existing library functions, illustrated with fixed numbers. A positive floor changes forecast variances. Absolute book and volume-based caps bound positions independently of that variance estimate. This demonstrates arithmetic on chosen inputs, not a newly calibrated rule, a historical repair or evidence of future performance.
The tools this part adds. The risk model; its shrinkage and its tests; the fundamental law and its assumptions; costs and dynamic trading; attribution; and two guards. And the thirty-first rule. A strategy gets capital only with its risk forecast by the House's model and the model's bias statistic reported; its profit and loss attributed to factors and to specific return; its costs priced at its intended size, and its capacity stated; a trading rule that knows tomorrow comes; and every forecast variance floored, every position capped, by limits that do not depend on the model.
The rule against three cases. A pitch with an information ratio of three: ask for the standard deviation of the IC over time, which, as the research chapter shows, limits the information ratio in that specific latent model. A market-neutral fund with three percent volatility: ask whose risk model, and what a forced unwind of its crowded positions would cost. A daily strategy with a Sharpe ratio of two: ask for its turnover, and the size it was costed at.
For the researcher: the information ratio when the IC movesPhD5 min
For the researcher. An exact moment identity in a specified normalised-score model. A latent correlation parameter may vary across periods. We derive the resulting information ratio, compare existing toy simulations, then distinguish those assumptions from measured research-period rank correlations.
Specify the toy. Scores have cross-sectional sum zero and sum of squares N, with N at least two. Returns equal a latent parameter rho times scores plus noise scaled by square root of one minus rho squared. Rho is bounded between minus and plus one, with mean mu and variance sigma squared. Conditional on rho and scores, noise has zero mean, unit variance and no cross-asset covariance. Periods are independent for annual square-root scaling. The book holds scores divided by N. Rho is a latent parameter; a measured finite-sample Pearson or rank correlation is not the same object.
Four steps establish the moments. Substitute the return model into the book's payoff. Normalisation makes the first average one. Conditional noise has mean zero and variance one over N; Gaussian noise gives the displayed standard-normal projection. Unconditional mean payoff is mu. Total variance is sigma squared plus one minus mu squared minus sigma squared, divided by N. The persistent part does not diversify. Appropriate conditional first and second moments suffice for this variance identity.
The theorem is exact for this toy's actual latent moments. Divide mu by square root of sigma squared times one minus one over N, plus one minus mu squared over N. At zero dispersion the exact value is mu root N divided by square root of one minus mu squared; mu root N is a small-correlation approximation. For nonnegative mu and positive sigma, the limit is mu over sigma. This is not a universal bound for market strategies. With the hook's chosen moments and five hundred assets, the exact toy gives monthly and annually, assuming independent months.
Compare existing fixed simulations. The small-correlation benchmark rises with breadth. Solid references use the exact moment identity at the chosen latent parameters; dashed lines show their asymptotes. The saved simulator clips Gaussian latent draws between minus point nine nine and plus point nine nine. Its input moments are therefore pre-clipping parameters, while the theorem uses post-clipping moments. The saved thousand-asset simulated ratios are and . Cached reference values and use the unchanged House approximation, omitting the finite-N subtraction of sigma squared over N. Neither finite simulation nor pre-clipping curves establish exact equality.
A crossover within the toy. Equate persistent variance sigma squared with diversifiable variance, one minus mu squared minus sigma squared over N. This gives the displayed N star, assuming positive sigma and feasible nondegenerate moments. At this continuous reference breadth, the ratio is exactly one over root two of its asymptote. Mu point zero five and sigma point one give ninety-eight point seven five, about ninety-nine assets. Extra assets still help, with diminishing gains. If N star is below two, even the smallest feasible breadth is beyond the crossover.
Now separate the empirical objects. These are saved daily rank correlations in the reused research sample; the mined signal has mean and standard deviation . Substituting observed rank moments into the unchanged approximate helper gives , compared with naive . This is heuristic: observed dispersion already includes cross-sectional estimation noise, so adding another sampling-noise term can double count. The actual research book's daily mean-over-standard-deviation is . The difference does not establish a missing causal correction.
Definitions and scaling matter. For zero-sum weights, payoff equals N times cross-sectional weight dispersion times return dispersion times Pearson correlation. Use population-divisor cross-sectional dispersions. Weight normalisation and universe changes can change the prefactor. Spearman and Pearson correlations generally differ, including under Gaussian distributions. Rank correlation discards magnitudes; fat tails are not an identified explanation of the whole gap. Saved pooled excess kurtosis is . It is descriptive and can reflect heterogeneous volatility, not solely one stationary heavy-tailed law.
Compare four descriptive ratios for the selected formula. Naive rank mean times root breadth gives ; the rank-moment helper approximation gives . Mean over standard deviation of the weights' measured Pearson correlation is . The actual book's daily ratio is . These are different definitions on reused selected data. Their numerical proximity is not a causal decomposition, a confidence interval or independent validation. No serial-dependence or selection-adjusted uncertainty was estimated.
Three research directions, with precise limits. Memory changes annual scaling. Some specified linear-quadratic models already have Riccati solutions; broader models require explicit dynamics and costs. Known covariance allows effective-breadth calculations. Reliable estimation under changing correlation and overlapping decisions is difficult. With known finite moments, heavy tails do not erase the formal mean--variance solution. Robust estimation, moment existence and realistic nonlinear constraints remain substantive questions.
Pause and predict. The toy's independent monthly latent correlation has mean point zero three and standard deviation point zero six. What is the largest annual information ratio any breadth can give it?
Recap, desk questions, problemsAll tracks3 min
Part thirty-one in fourteen lines. The breadth benchmark needs calibration and covariance assumptions. Factor models reduce covariance parameters conditional on exposures; their forecasts still need diagnostics. The saved beta comparison uses noisy future estimates and eligible survivors. Square-root execution costs are scenario dependent. Dynamic trading is optimal only within the specified signal, risk, cost and discount model.
Multi-period optimisation makes horizon and constraints explicit. The research combination comparison is selected and reused, rather than independent holdout evidence. Fixed-input capacity and ideal rational-flow models clarify incentives. The industry quake proxy differs from actual fund books. Attribution is model-dependent accounting. Fixed arithmetic distinguishes risk floors from independent position caps. The research theorem is exact for bounded latent correlation and normalised scores, not a plug-in result for measured rank IC.
Six desk checks. The fixed latent-correlation toy gives about one point five eight annually under independent months. A bias statistic of one point three describes dispersion above the forecast scale; the narrow Gaussian reference needs its own assumptions. A volatility forecast is not a maximum loss, even for a model-factor-neutral book.
At fixed gross return and square-root cost technology, four times the size doubles costs per dollar. Quadrupling quadratic costs roughly halves trading speed only in the negligible-discount regime. A variance floor changes the risk input and an independent cap bounds holdings; neither establishes profitability. Complete solutions are in the notes.
Six core calculations: the fixed toy's information ratio, the Gaussian bias reference, a known-prior beta update, fixed-input cost scaling, profit-maximising size and the zero-discount trade-rate limit. Complete assumptions and worked solutions are in the bilingual notes.
Four extensions, problems seven through ten: population Pearson signal combination, RMS score changes versus turnover, sample return attribution and the latent toy's asymptote and variance crossover. Keep the definitions and independence conditions explicit.
Two qualifying derivations: prove the bounded-latent-correlation moment identity and exact continuous-crossover ratio, then derive the scalar Riccati policy using the stated Bellman timing. Distinguish the two cost asymptotic regimes. Both complete proofs are in the English and Chinese notes.
Where this comes back. Part thirty-two trades trend and carry across asset classes with this part's costs and risk model. Part thirty-four is the firm, where capacity and fees decide who keeps the alpha. Part thirty-seven derives the square-root law and schedules the trades. Part forty-one returns to crowding and liquidity spirals. And the finale deflates every row.
These are the textbooks and papers behind the methods. Saved public research examples, quoted empirical studies, mathematical simulations and chosen fixed arithmetic have different scopes. The notes identify their assumptions and limitations; no sealed strategy result is loaded in this review.
The portfolio and risk desk now connects forecast inputs, covariance assumptions, execution scenarios, dynamic decisions and independent position bounds. Next, Part thirty-two: systematic macro and alternative premia. We will distinguish historical method demonstrations from evidence about a future trading process.
Where it goes next. Costs are derived from the order book in Parts 36-37; crowding returns as fire sales in Part 41.
Key results
The part's results in one place, for revision.
Try it
Lab 31 · From IC to information ratio to capacity
Simulate a long-short book with a small information coefficient across N stocks. Check the fundamental law, see it fail when the IC varies from day to day, then charge square-root impact and find the size at which the strategy earns the most dollars.
python -m videos.quant.labs 31
needs numpy, scipy, matplotlib, numba · download lab31.py ·
source on GitHubN = 50 stocks IC sqrt(N): 2.24 simulated 2.40 | IC with sd 0.04: formula 2.16, simulated 2.33
N = 200 stocks IC sqrt(N): 4.49 simulated 4.35 | IC with sd 0.04: formula 3.91, simulated 3.67
N = 800 stocks IC sqrt(N): 8.98 simulated 9.36 | IC with sd 0.04: formula 5.95, simulated 5.46
N = 3200 stocks IC sqrt(N): 17.96 simulated 17.99 | IC with sd 0.04: formula 7.26, simulated 7.43
Capacity (most dollars earned) AUM $2.57bn: net 2.0% a year, $50m
Alpha gone AUM $5.77bn
With square-root impact, costs grow like the square root of size: dollars peak where costs take two thirds of the gross alpha, long before the alpha is gone.
The code (70 lines; it asserts its own result)
"""Lab 31: the fundamental law, when the IC moves, and what size does to a strategy."""
import numpy as np
from videos.quant import labs
from explainer.quant.house import riskmodel
TITLE = "From IC to information ratio to capacity"
GOAL = ("Simulate a long-short book with a small information coefficient across N stocks. Check the fundamental "
"law, see it fail when the IC varies from day to day, then charge square-root impact and find the size "
"at which the strategy earns the most dollars.")
TASKS = [
"Double the turnover. What happens to capacity, and to the Sharpe ratio at capacity?",
"Set the transfer coefficient to 0.4 (a long-only book). How many stocks buy the lost IR back?",
"Use riskmodel.gp_trade_rate: how fast should you trade toward the target when costs are quadratic?",
]
def run(seed=0):
rng = np.random.default_rng(seed)
ic, T = 0.02, 2000
Ns = np.array([50, 200, 800, 3200])
lab = labs.Lab()
sim = {0.0: [], 0.04: []}
for N in Ns:
for sd in sim:
ir, _ = riskmodel.simulate_ic_strategy(int(N), T, ic, sd, rng)
sim[sd].append(ir * np.sqrt(252))
law = riskmodel.fundamental_ir(ic, N) * np.sqrt(252)
tv = riskmodel.ir_time_varying(ic, 0.04, int(N)) * np.sqrt(252)
lab.row(f"N = {N:>4} stocks", f"IC sqrt(N): {law:5.2f} simulated {sim[0.0][-1]:5.2f} | IC with sd 0.04: "
f"formula {tv:5.2f}, simulated {sim[0.04][-1]:5.2f}")
assert all(abs(s - riskmodel.fundamental_ir(ic, n) * np.sqrt(252)) < 0.25 * s + 0.5 for s, n in zip(sim[0.0], Ns))
assert sim[0.04][-1] < 0.5 * sim[0.0][-1], "a varying IC caps the information ratio at E[IC]/sd(IC)"
# capacity: gross alpha 6% a year on capital, the book turns over 20x a year, impact Y sigma sqrt(Q/ADV)
gross, turnover, sigma_d, adv_total = 0.06, 20.0, 0.02, 2e10
aum = np.logspace(7, 10.5, 200)
daily_trade = aum * turnover / 252
cost = turnover * riskmodel.sqrt_impact(daily_trade, adv_total, sigma_d)
net = gross - cost
dollars = net * aum
i = int(np.argmax(dollars))
j = int(np.argmin(np.abs(net)))
lab.row("Capacity (most dollars earned)", f"AUM ${aum[i] / 1e9:.2f}bn: net {100 * net[i]:.1f}% a year, ${dollars[i] / 1e6:.0f}m")
lab.row("Alpha gone", f"AUM ${aum[j] / 1e9:.2f}bn")
lab.note = ("With square-root impact, costs grow like the square root of size: dollars peak where costs take "
"two thirds of the gross alpha, long before the alpha is gone.")
assert abs(net[i] / gross - 1 / 3) < 0.03
fig, ax = labs.figure(2, size=(11, 4.2))
grid = np.logspace(1.5, 3.6, 60)
ax[0].loglog(grid, [riskmodel.fundamental_ir(ic, n) * np.sqrt(252) for n in grid], color=labs.P, label="IC sqrt(N)")
ax[0].loglog(grid, [riskmodel.ir_time_varying(ic, 0.04, int(n)) * np.sqrt(252) for n in grid], color=labs.LOSS,
label="IC varies: E[IC]/sqrt(sd^2 + 1/N)")
ax[0].loglog(Ns, sim[0.0], "o", color=labs.P)
ax[0].loglog(Ns, sim[0.04], "o", color=labs.LOSS)
ax[0].set(title="Annual information ratio against breadth (IC = 0.02)", xlabel="stocks, N")
ax[0].legend(fontsize=8)
ax[1].semilogx(aum / 1e9, 100 * net, color=labs.SPOT, label="net return, % a year")
ax2 = ax[1].twinx()
ax2.semilogx(aum / 1e9, dollars / 1e6, color=labs.GAIN, label="dollars earned, $m")
ax2.grid(False)
ax2.set_ylim(0, None)
ax[1].axvline(aum[i] / 1e9, color=labs.P, ls="--", lw=1)
ax[1].set(title="Size against return: capacity", xlabel="assets under management, $bn", ylim=(0, 6.2))
ax[1].legend(loc="upper left", fontsize=8)
ax2.legend(loc="upper right", fontsize=8)
lab.fig = fig
return lab
Now change it
- Double the turnover. What happens to capacity, and to the Sharpe ratio at capacity?
- Set the transfer coefficient to 0.4 (a long-only book). How many stocks buy the lost IR back?
- Use riskmodel.gp_trade_rate: how fast should you trade toward the target when costs are quadratic?
Problems, with solutions
Try each problem before opening its solution; the last two of each set are at qualifying-exam level.
Desk questions, with solutions
Six desk checks
- Fixed latent toy μ=.05,s=.10,N=500 with independent months: benchmark .05√6000=3.873; exact annual IR
√12×.05/√(.01+.9875/500)=1.5828. - Bias statistic1.30 means standardised-return SD is30% above one. AtT=504, the approximate IID Gaussian95% reference is1±√(2/504)=1±.0630. Dependence, tails and nonzero conditional means require further analysis.
- A4% annual volatility forecast is not a loss bound; a10% weekly loss can reflect jumps, omitted covariance, leverage or changing risk.
- Holding gross return and cost technology fixed, four times size doubles2% costs to4%;8% gross nets4%, before other costs.
- Quadrupling λ roughly halves speed only in the negligible-discount regime. At fixed positive discount and extreme λ, speed scales as1/λ instead.
- The fixed variance floor changes the risk input; the independent cap bounds positions. Neither establishes future profitability.
Problems, with worked solutions
Problems 1–6: complete solutions
1. Hook. In the fixed normalised-score toy, compute annual IR for latent mean 0.05, sd 0.10, N=500 and independent months; compare the small-correlation benchmark.
Solution
Scores and latent moments satisfy the research model. Monthly variance is .10²+(1−.05²−.10²)/500=.011975, so monthly IR=.05/√.011975=.45691. Independent months give annual√12 times this,1.5828. The usual small-correlation constant-IC benchmark is.05√(500×12)=3.8730; the exact constant-IC toy also divides by√(1−.05²).
2. Bias reference. At T=504, compute the approximate IID standard-normal 95% reference band for the sample SD of standardised returns. Is 1.30 inside?
Solution
If zₜ are independent standard normals and b is their sample SD, (T−1)b² has χ²(T−1) law. The delta method gives SD(b)≈1/√[2(T−1)]; multiplying by1.96 gives approximate95% half-width .0618 atT=504, close to the shorthand√(2/T)=.0630. Thus1.30 lies outside either Gaussian reference. This is not an actual-data confidence statement without those assumptions.
3. Vasicek. Known Gaussian prior: beta mean 1.0, sd 0.3; estimate 1.8 with known Gaussian SE 0.3. Derive the posterior mean.
Solution
Known Gaussian observation variance and known Gaussian prior variance are both .3²=.09. Posterior precision is2/.09 and precision-weighted mean is (1.8/.09+1/.09)/(2/.09)=1.4. Actual empirical Bayes estimates its prior and standard errors rather than knowing them.
4. Size. With fixed gross return, net 6% at 100 m after 2% square-root costs: compute net return at 400 m.
Solution
Assume fixed8% gross return and costs proportional to√A. Costs at400m are2%√(400/100)=4%; net8%−4%=4%. Financing and any other costs are excluded by the question.
5. Capacity. For fixed positive g,c and profit \(gA-cA^{3/2}\), break-even is 900 m. Derive profit-maximising size and net return before fees.
Solution
ForΠ=gA−cA^(3/2), g,c>0, break-evenA₀=(g/c)². SettingΠ′=g−(3/2)c√A=0 givesA*=(2g/3c)²=(4/9)A₀=400m. Π″=−3c/(4√A)<0. Net returnΠ/A atA* isg−2g/3=g/3 before management fees.
6. Rate. With zero discount and \(\lambda\gg\gamma\), derive the GP trade-rate approximation and effect of quadrupling cost.
Solution
Withρ=0, a solvesa²+γa−γλ=0, so a=[−γ+√(γ²+4γλ)]/2. Forλ≫γ, a≈√(γλ) and ratea/λ≈√(γ/λ). Quadrupling λ approximately halves the rate and approximately doubles a. At fixedρ>0 the extreme-cost approximation differs; no universal half-speed statement follows.
Problems, with worked solutions
Problems 7–10: complete solutions
7. Combination. Two standardised finite-variance scores each have population Pearson IC 0.04 and score correlation 0.5. Derive the maximum combined Pearson IC.
Solution
With unit-variance target and scores, feasible joint covariance andC=[[1,.5],[.5,1]], the best linear Pearson squared correlation isicᵀC⁻¹ic. EqualIC=.04 gives2×.04²/(1+.5)=.00213333; square root=.046188. Equal positive weights attain it here. This identity does not substitute average rank ICs.
8. RMS change. For stationary unit-variance scores with lag correlations 1-0.02 and 1-0.32, derive the ratio of RMS changes. What extra assumptions convert it to a turnover ratio?
Solution
For stationary unit-variance matched scores with correlation1−φ, E[(zₜ−zₜ₋₁)²]=2φ. The RMS ratio is√(.32/.02)=4. With zero-mean Gaussian increments E|Δz|=√(2/π)×RMS, so the same ratio applies to absolute score changes. Portfolio turnover additionally needs fixed holdings scale, gross normalisation, matched universe and consistent treatment of drift; the proxy alone does not establish it.
9. Attribution. A fund returned 12%; average beta 0.4, sample market return 20%, exposure–next-return covariance term 2%. Compute the residual term.
Solution
The sample identity uses the covariance term with divisorT. Static market contribution=.4×20%=8%; adding2% timing leaves12%−8%−2%=2% model-relative residual. The residual does not by itself prove skill.
10. Ceiling and crossover. In the toy with independent monthly latent mean 0.03 and sd 0.06, derive the annual asymptotic IR and persistent-versus-diversifiable variance crossover \(N^*\).
Solution
In the bounded-latent toy, μ=.03,s=.06. The per-month limit μ/s=.5; independent months give annual√12/2=1.73205. Equating s² with(1−μ²−s²)/N gives N*=(1−.0009−.0036)/.0036=276.5278, about277. This continuous crossover is a model reference, not an estimated effective market breadth.
Problems, with worked solutions
Problems 11–12: qualifying solutions
11. Moving-latent-correlation theorem. (qual) Under the stated bounded-latent-correlation and normalised-score assumptions prove \(IR=\mu/\sqrt{\sigma^2+(1-\mu^2-\sigma^2)/N}\). Prove monotonicity for \(\mu>0\), the limit, and the exact continuous-crossover ratio \(1/\sqrt 2\).
Solution
Substitute returns: π=ρ N⁻¹Σzᵢ²+√(1−ρ²)N⁻¹Σzᵢεᵢ. Normalisation makes the first termρ. Conditional noise payoff has mean0 and variance(1−ρ²)/N, from the stated conditional unit variances and zero cross-covariances. Thus Eπ=Eρ=μ. Total variance gives Varπ=Varρ+E[(1−ρ²)/N]=s²+(1−μ²−s²)/N. Writeb=1−μ²−s²>0. Forμ>0, IR(N)=μ(s²+b/N)^−1/2, with derivative μb/[2N²(s²+b/N)^(3/2)]>0. For s>0 its limit isμ/s; for s=0 the exact ratio isμ√N/√(1−μ²). For positive s the continuous crossoverN*=b/s² gives variance2s², soIR(N*)=μ/(s√2) exactly. IfN*<2, the crossover lies below feasible normalised-score breadth. Independent periods permit√T annual scaling; serial dependence generally changes it. The proof concerns latent moments, not measured sample rank ICs.
12. Scalar GP derivation. (qual) For the scalar Bellman timing in Chapter 5, derive the quadratic value coefficients, Riccati equation, trade rate and aim multiplier. State model assumptions and distinguish fixed-positive-discount from negligible-discount cost asymptotics.
Solution
Letd=1−ρ∈(0,1), c=1−φ, variancev>0, λ,γ>0 and known linear conditional forecastβcf. Current trade costs are paid now; operating return/risk and continuation are discounted:
V(x₋,f)=max_x{d[βcfx−γvx²/2]−λv(x−x₋)²/2+d E[V(x,f⁺)|f]}, withE[f⁺|f]=cf and finite innovation variance. Use V=−Axx x₋²/2+Axf x₋f−Aff f²/2+constant. LetH=dγv+λv+dAxx. The first-order condition givesx=(λv/H)x₋+[dc(β+Axf)/H]f. Matching x₋² gives Axx=λv−(λv)²/H. Writek=1−λv/H andAxx=λvk. Algebra yields dλk²+(dγ+ρλ)k−dγ=0; the stable root has0<k<1, witha=λk and
a=[−(dγ+ρλ)+√((dγ+ρλ)²+4d²γλ)]/(2d).
Matching x₋f givesAxf=λv times the policy's f coefficient. Solving this linear relation gives coefficientdcβ/(H−dcλv). Dividing byk expresses the policy as(1−k)x₋+k aim. Sincek(H−dcλv)=dv(γ+φa), the aim is [βcf/(γv)]/[1+φa/γ]: Markowitz's conditional-next-return target times the displayed discount. Forρ=0 andλ≫γ, k≈√(γ/λ). At fixedρ>0 asλ→∞, the positive-root equation instead givesa→dγ/ρ andk≈dγ/(ρλ). Known fixed risk, unconstrained notional holdings, linear dynamics, appropriate moments, timing and well-posedness are essential; the saved Riccati check validates this specified mathematics.
Reading and notes
The part's papers
from READING.md
- Rosenberg, B. (1974). "Extra-market components of covariance in security returns." JFQA.
- Brinson, G., Hood, L. R., Beebower, G. (1986). "Determinants of portfolio performance." FAJ.
- Perold, A. (1988). "The implementation shortfall: paper versus reality." JPM.
- Grinold, R. (1989). "The fundamental law of active management." JPM.
- Connor, G. (1995). "The three types of factor models: a comparison of their explanatory power." FAJ.
- Clarke, R., de Silva, H., Thorley, S. (2002). "Portfolio constraints and the fundamental law of active management." FAJ.
- Berk, J., Green, R. (2004). "Mutual fund flows and performance in rational markets." JPE.
- Korajczyk, R., Sadka, R. (2004). "Are momentum profits robust to trading costs?" Journal of Finance.
- Khandani, A., Lo, A. W. (2007). "What happened to the quants in August 2007?" J. Investment Management; (2011) "... evidence from factors and transactions data." J. Financial Markets.
- Menchero, J., Orr, D. J., Wang, J. (2011). The Barra US Equity Model (USE4) Methodology Notes. MSCI.
- Gârleanu, N., Pedersen, L. H. (2013). "Dynamic trading with predictable returns and transaction costs." Journal of Finance.
- Kolm, P., Tütüncü, R., Fabozzi, F. (2014). "60 years of portfolio optimization: practical challenges and current trends." EJOR.
- Pástor, Ľ., Stambaugh, R., Taylor, L. (2015). "Scale and skill in active management." JFE.
- Novy-Marx, R., Velikov, M. (2016). "A taxonomy of anomalies and their trading costs." RFS.
- Kahn, R., Lemmon, M. (2016). "The asset manager's dilemma: how smart beta is disrupting the investment management industry." FAJ.
- Boyd, S., et al. (2017). "Multi-period trading via convex optimization." Foundations and Trends in Optimization.
- Frazzini, A., Israel, R., Moskowitz, T. (2018). "Trading costs." Working paper.
- DeMiguel, V., Martín-Utrera, A., Nogales, F., Uppal, R. (2020). "A transaction-cost perspective on the multitude of firm characteristics." RFS.
- Collin-Dufresne, P., Daniel, K., Sağlam, M. (2020). "Liquidity regimes and optimal dynamic asset allocation." JFE.
- Lou, D., Polk, C. (2022). "Comomentum: inferring arbitrage activity from return correlations." RFS.
- Blume, M. (1971). "On the assessment of risk." Journal of Finance; (1975) "Betas and their regression tendencies." Journal of Finance.
- Vasicek, O. (1973). "A note on using cross-sectional information in Bayesian estimation of security betas." Journal of Finance.
- Scholes, M., Williams, J. (1977). "Estimating betas from nonsynchronous data." JFE; Dimson, E. (1979). "Risk measurement when shares are subject to infrequent trading." JFE.
- Chen, N.-F., Roll, R., Ross, S. (1986). "Economic forces and the stock market." Journal of Business; Connor, G., Korajczyk, R. (1986). "Performance measurement with the arbitrage pricing theory." JFE.
- Constantinides, G. (1986). "Capital market equilibrium with transaction costs." JPE; Davis, M., Norman, A. (1990). "Portfolio selection with transaction costs." Math. of OR; Shreve, S., Soner, H. M. (1994). "Optimal investment and consumption with transaction costs." Annals of Applied Probability.
- Almgren, R., Thum, C., Hauptmann, E., Li, H. (2005). "Direct estimation of equity market impact." Risk; Tóth, B., et al. (2011). "Anomalous price impact and the critical nature of liquidity in financial markets." PRX.
- Qian, E., Hua, R. (2004). "Active risk and information ratio." J. Investment Management; Ding, Z. (2010). "The fundamental law of active management: time series dynamics and cross-sectional properties." Working paper; Buckle, D. (2004). "How to calculate breadth." J. Asset Management; Ding, Z., Martin, R. D. (2017). "The fundamental law of active management: redux." J. Empirical Finance.
- Berk, J., van Binsbergen, J. (2015). "Measuring skill in the mutual fund industry." JFE.
- Goldman Sachs (2007). Press release on the Global Equity Opportunities fund, 13 August 2007.
Papers and sources
Readings and verification
Textbooks: Grinold–Kahn, Active Portfolio Management; Isichenko, Quantitative Portfolio Management; Paleologo, The Elements of Quantitative Investing; Narang, Inside the Black Box. Foundational studies include Blume(1971,1975), Vasicek(1973), Rosenberg(1974), Connor–Korajczyk(1986), Brinson–Hood–Beebower(1986), Perold(1988), Grinold(1989), Clarke–de Silva–Thorley(2002), Berk–Green(2004), Qian–Hua(2004), Khandani–Lo(2007,2011), Ding(2010), Gârleanu–Pedersen(2013), Berk–van Binsbergen(2015), Novy-Marx–Velikov(2016), Boyd et al.(2017), Ding–Martin(2017), Frazzini–Israel–Moskowitz(2018), and Lou–Polk's comomentum work. Their empirical findings remain specific to their datasets and methods.
The existing pure House risk-model test passed; scientific source revision and visual review are distinct checks. For this task use only the audited ordinary-original restoration, cached-only guarded QA and explicit scene selection. The unrestricted compute-all command includes the excluded experiment and is not a rebuild instruction for this review. Evidence and current review status are maintained in docs/qa/ and the series polish ledger.
For the researcher
Research: exact normalised-score identity
Let N≥2, Σzᵢ=0, Σzᵢ²=N and bounded latent ρ∈[−1,1]. Conditional noise has mean zero, unit variance and zero cross-asset covariance. Let μ=Eρ, s²=Varρ, with Eρ²=μ²+s²<1. For rᵢ=ρzᵢ+√(1−ρ²)εᵢ and π=N⁻¹Σzᵢrᵢ,
Eπ=μ, Varπ=s²+(1−μ²−s²)/N, and IR=μ/√Varπ.
The unchanged House helper omits −s²/N and is labelled approximate. The saved simulator clips Gaussian latent draws at ±.99; its input moments are pre-clipping, while the identity requires actual post-clipping moments. Measured finite-sample Pearson or rank IC is not latent ρ. Observed IC dispersion already includes cross-sectional sampling noise, so adding another noise term can double count. The empirical table is a heuristic comparison, not an exact plug-in correction.
For zero-sum weights, π=N sd_cs(w) sd_cs(r) Corr_P(w,r), using population-divisor cross-sectional SDs. The scale changes with normalisation and universe. Spearman and Pearson differ even under Gaussian distributions. Pooled excess kurtosis can reflect heteroskedastic mixtures. The four saved empirical ratios change definitions on selected reused data; numerical proximity is neither a causal explanation nor an uncertainty interval. No HAC or selection-adjusted interval was estimated. Memory changes annual scaling; specified linear-quadratic models can still have Riccati solutions. Known finite μ,Σ retain the formal mean–variance solution even under heavy tails; robust estimation and realistic constraints are distinct difficulties.
Data, scope and reproducibilityData and interpretation
Nine unchanged ordinary originals were restored once: model, vasicek, law, costs, gp, combine, attribution, quake, and theory. There were nine wrapper invocations, no failed attempts or retries, no new market trials and no registry changes. The strategy experiment is excluded before counted/cache access; no sealed strategy cache, payload, outcome or diagnostic is used in this review. The existing cumulative registration metadata is 23,535 through Part 31, versus 23,562 globally; ten existing charges belong to this part. Counts describe research history, not independent performance evidence.
The Binance examples use Part 29's frozen public USDT-pair grid and its 2018–2020 research mask. The inherited reader loads public 2017–2025 daily arrays before masking. Those public raw arrays are distinct from sealed strategy payloads. The frozen late-2026 listing is retrospective, with survivorship, listing availability, asset classification and other point-in-time limitations. Eligibility requires 60 days of history and median quote volume of at least 250,000 USDT. The factor model has a median 34 eligible coins per day; model warm-up and complete-case selection alter the observations available to individual calculations. Dollar labels assume USDT parity.
The quake replay uses Kenneth French's 49 daily US industry portfolios through 2020. It is an industry proxy, not individual stock execution, actual fund holdings or the original Khandani–Lo experiment. Missing industry returns are filled by zero. Its arithmetic P&L excludes fees, borrowing and market impact.
Quoted study findings, reported historical fund losses, saved research calculations, fixed simulations and chosen arithmetic inputs have separate scopes. Sharpe annualisation uses the stated independent-period convention; no selection-adjusted, dependence-robust confidence interval is estimated here. Full continuous production listening and pronunciation review remain pending separately from visual QA.
Chapter notesChapters and scientific boundaries
- Fundamental law. The conditional diagonal-risk identity needs calibrated forecasts, fixed score norm and an appropriate risk metric. Realised unconditional information ratios require more assumptions. The displayed long-only transfer coefficient is a fixed Gaussian-score heuristic relative to equal weights, not a universal loss of skill. The equicorrelation breadth formula concerns a mean-equivalent count under equal variances, equal weights and common expected payoff.
- Factor risk models.
X F Xᵀ + Δassumes factor–residual orthogonality and diagonal residual covariance. The 4,830-versus-4,501,500 parameter comparison conditions on X; estimated beta and volatility exposures still carry uncertainty. The House uses square-root-quote-volume WLS weights and a fixed 10⁻⁶ ridge. Exact unit-exposure mimicking portfolios require the unregularised full-rank case. EWMA squares and outer products are uncentred second moments. Daily date coordinates retain day-level spacing, including late-2017 warm-up. Factor paths are arithmetic sums, not wealth; displayed t statistics use an IID reference without serial or selection adjustment. - Calibration and betas. The median forecast factor fraction is a median across dates of within-date median fractions, about 71.7%; it is not realised R². All four saved bias statistics fall outside the approximate IID Gaussian 95% reference half-width √(2/652)≈.0554. Actual fat tails, dependence, conditional means and adaptive holdings limit that reference; the discrepancies identify no unique cause. Specific-risk shrinkage is a fixed .3 toward the overall cross-sectional mean. Vasicek's empirical prior variance is floored at 10⁻⁸. The 12 beta comparisons use consecutive 60-calendar-day blocks and require eligibility in both, selecting survivors; their targets are noisy future estimated betas. Saved MSE is .04960 raw versus .04066 shrunk. Dimson's joint lead/lag regression differs from Scholes–Williams' separate regressions and market-autocorrelation adjustment. Leads are ex post estimation devices.
- Execution costs. Distinguish average execution shortfall from terminal peak impact. For currency notionals Q,V, average cost fraction
Y_avg σ√(Q/V)gives money costQ×fraction. Integrating a particular square-root peak-impact path instead introduces a 2/3 factor. The worked example uses separate pooled asset-date medians of ADV and volatility, not one actual median coin. The chosen average-cost coefficient is one. Saved size scenarios use fixed targets, target differences rather than drift-adjusted trades, and five-basis-point fees; financing, borrow, spread, delay and execution are incomplete. Large-participation extrapolation is uncertain. Net Sharpe need not scale as √A because its denominator changes too. - Inaction and dynamic trading. Smooth
|Δh|^(3/2)impact has derivative zero at zero and generically creates no exact no-trade band. A separate proportional cost κᵢ|Δhᵢ| yields the whole-book condition|αᵢ−γ(Σh₀)ᵢ|≤κᵢin the unconstrained fixed concave problem. Classical κ^(1/3) band and κ^(2/3) utility-loss asymptotics need their continuous-diffusion, interior-target, nondegeneracy and small-cost assumptions. They are a different model. - Gârleanu–Pedersen. Use the stated Bellman timing: operating return/risk and continuation are discounted by d=1−ρ, while current trade cost is paid now. Known fixed positive-definite covariance/cost, linear conditional dynamics, finite second moments, unconstrained holdings and a well-posed horizon underlie the Riccati policy. The √(γ/λ) rate approximation needs zero or negligible discount, roughly γ≪λ≪γ/ρ². At fixed positive ρ as λ→∞ the rate is γ(1−ρ)/(ρλ). General cost matrices create coupled risk/liquidity modes. The empirical φ is one minus average cross-sectional Pearson score correlation, a geometric-persistence proxy. Coefficients, persistence and volatility scaling reuse research data. Both aim multipliers are at most one for positive decay; slow signals are favoured relatively, not amplified above raw forecasts. The zero-cost row uses a numerical near-free limit. Value iteration checks algebra, not market optimality.
- Multi-period optimisation. The unchanged fixed toy uses L-BFGS-B and smoothed three-halves impact. Its 1-, 5- and 40-period solves all converged; first positions are .08812, .26382 and .24069. Terminal holdings are free, not forced to zero. The complete 40-period path is shown with aligned forecast indexing. Different horizons have different objectives and boundary effects, not a universal ranking. Borrowing is a holding cost, not solely a trade-increment cost. A variance floor changes a risk input rather than defining a position constraint. Replanning does not correct an incorrect model. Recovery of GP requires matching costs, timing, discount and forecasts.
- Combination. The population multiple-correlation formula uses finite-variance standardised Pearson objects, a positive-definite C and a feasible joint covariance; it does not accept measured rank ICs interchangeably. Ridge shrinks coefficients toward zero. With L¹ normalisation its large-penalty direction tends toward Xᵀy, not equal weights. The saved pooled raw-return squared-error fit has no intercept and zero-fills missing scores; it does not optimise average daily rank IC. Mining, multiple ridge choices and repeated 2020 validation are reused research. A winning marginal signal does not prove the others lack conditional information. The geometric horizon-IC formula is a weak-signal approximation and eventually decays as h⁻¹/² for positive decay. Separate signal books can still centrally net orders; coupled risk, costs and constraints generally distinguish separate and joint optima.
- Capacity and incentives. √(2φ) is RMS change for a stationary matched unit-variance score pair, not directly portfolio turnover. Absolute-turnover scaling needs a fixed increment distribution, normalisation and universe. Four-ninths capacity and one-third net edge hold in the fixed positive-g,c profit model without other costs or a risk objective. The plot shows net/g and four times normalised profit, including its full negative tail. Berk–Green's ideal rational-flow equilibrium has zero expected risk-adjusted net alpha, not zero realised or total return. Fees capture rents after trading costs. The a/3 fee is specific to the known-skill square-root-cost extension. Observational fund findings do not identify a universal cause of closures.
- Quake. The proxy uses
wᵢ=−(Rᵢ−R̄)/Σ|Rⱼ−R̄|, giving zero net dollars and gross one when defined, not beta neutrality. Paths sum daily P&L. Reference daily SD uses January 2006–June 2007 and is not a confidence interval. The stylised factor-neutral risk example is separate from the replay; diagonal residual risk need not be small under leverage or concentration. The unwind account is a hypothesis. Comomentum is a proxy with sample associations, not a direct fund count or guaranteed predictor. The industry Sharpe does not identify a universal reversal premium or crash exposure. - Attribution. Multiplying a fitted return identity by aligned holdings gives exact model-relative accounting. Specific return is not automatically skill. The displayed Brinson-style selection term uses portfolio sector weights, combining selection and interaction. Factor-component variance divided by total variance is descriptive, can exceed one, and is not additive Euler attribution when component covariance matters. Timing uses sample covariance with divisor T; it establishes no repeatable skill. Euler volatility contributions need fixed PSD covariance and positive portfolio volatility; factor terms assume factor–residual orthogonality.
- Protocol and limits. Specify data timing, universe, forecasts, risk, costs, constraints and selection before evaluation. Outcome-informed changes need honest new evaluation. The fixed example chooses α=(10⁻⁵,10⁻⁵), γ=1, σ²=(10⁻⁸,4×10⁻⁴), book=1. Unconstrained positions are (1000,.025); a 10⁻⁴ variance floor gives (.1,.025); a .05 absolute book cap gives (.05,.025); chosen ADV=(.5,.1) with .1 participation-based position cap gives (.05,.01). These are existing library functions on chosen arithmetic, not a calibrated rule, a market trial or a historical repair. Clipping is not a general constrained multi-asset optimum. Position bounds do not validate forecasts or establish profitability.
中文讲义
本讲的中文说明、交易台问题与习题解答(与英文版对应)。
导言量化金融,从零搭建 · 第31部分:风险模型、成本与跨期交易
本部分连接预测、协方差假设、执行成本和跨期决策。公开数据计算是回顾性的方法演示;它不建立可按历史信息实时执行的投资记录,也不证明未来盈利。
Chapter notes章节及科学边界
- 基本定律。 条件对角风险恒等式要求预测校准、固定分数范数和适当风险度量;实现的无条件信息比率需要更多假设。只做多转移系数是固定高斯分数、相对等权的启发式示例。等相关广度只对应等方差、等权、同预期收益的均值等价计数。
- 因子风险模型。 XFXᵀ+Δ假设因子与残差正交且残差协方差对角。4,830对4,501,500的参数比较以X给定为条件;贝塔和波动率暴露自身也被估计。公司使用成交额平方根WLS权重及固定10⁻⁶岭;精确单位暴露模拟组合要求无正则且满秩。EWMA平方和外积是未中心化二阶矩。日期保留逐日间距及2017年末预热;曲线为算术累加,不是财富。t统计量使用独立日参考,未调整序列相关或选择。
- 校准及贝塔。 约71.7%是先取每日币种预测方差因子占比中位数,再跨日期取中位数,不是实现R²。四个保存的偏差统计量都在独立高斯参考半宽√(2/652)≈.0554外;肥尾、依赖、条件均值和自适应持仓限制该参考,也不能识别唯一原因。特质风险固定按.3向整体横截面均值收缩;Vasicek经验先验方差设10⁻⁸下限。12组比较是连续60个日历日区块,要求两块都合格,选择了未来幸存者;目标是带噪声的未来贝塔估计。MSE原值.04960,收缩后.04066。Dimson联合领先滞后回归不同于Scholes–Williams分别回归及市场自相关调整;领先收益只用于事后估计。
- 执行成本。 区分平均执行落差与终点峰值冲击。Q,V为货币名义额时,平均成本比例Y_avg σ√(Q/V)乘Q才是货币成本;对特定平方根峰值路径积分则出现2/3因子。例子取ADV与波动率各自的混合资产日中位数,不是某个实际中位币种。平均成本系数选为1。规模情景固定目标,以目标差代替漂移调整交易,并加5基点费用;融资、借券、价差、延迟及执行不完整。高参与率外推不确定,净夏普的分母也变动,故不必按√A下降。
- 不交易与动态交易。 光滑|Δh|^(3/2)在零点导数为零,通常不产生精确不交易区间。另加比例成本κᵢ|Δhᵢ|,在无约束固定凹问题中整本不交易条件是|αᵢ−γ(Σh₀)ᵢ|≤κᵢ。经典κ^(1/3)区间及κ^(2/3)效用损失渐近,需要连续扩散、内部目标、非退化及小成本假设,是另一个模型。
- Gârleanu–Pedersen。 贝尔曼时间约定中经营收益、风险及续值乘d=1−ρ,当前交易成本立即支付。Riccati策略以已知固定正定风险及成本、线性条件动态、有限二阶矩、无约束名义持仓及适定时域为前提。√(γ/λ)速率近似要求零或可忽略贴现,约γ≪λ≪γ/ρ²;固定正ρ且λ趋于无穷时速率约γ(1−ρ)/(ρλ)。一般成本矩阵产生耦合风险流动性模式。经验φ是1减相邻日分数横截面Pearson相关均值,只是几何持续性代理。系数、持续性及波动率尺度重用研究数据。正衰减时两种目标乘数都不超过1,慢信号只是相对受重视。零成本行使用数值上的近乎免费极限。值迭代验证代数,不验证市场最优性。
- 多期优化。 原固定玩具使用L-BFGS-B及光滑3/2次方冲击近似。1、5、40期求解都收敛,首仓位.08812、.26382、.24069。终端持仓自由,不强制归零。展示完整40期路径并对齐预测期。时域目标与边界效应不同,不存在通用排序。借券是持仓成本;方差下限修改风险输入而非定义仓位约束。重规划不会修正错误模型;恢复GP必须匹配成本、时序、贴现和预测。
- 合成。 总体多重相关公式使用有限方差、标准化Pearson对象、正定C和可行联合协方差,不能互换为平均秩IC。岭将原始系数向零收缩,L¹归一化后大惩罚方向趋于Xᵀy而非等权。保存的回归拟合原始收益平方误差、无截距、缺失分数填零,不优化日均秩IC。挖掘、多档岭和反复2020验证都重用了研究数据。最强边际信号胜出不能证明其他信号无条件信息。几何时域IC仅为弱信号近似,正衰减时最终按h⁻¹/²下降。分开子组合也可以集中净额交易;耦合风险、成本与约束通常使单独最优与联合最优不同。
- 容量及激励。 √(2φ)是平稳单位方差匹配分数的均方根变化,不直接等于换手;绝对换手比例需要固定增量分布、归一化和资产池。四分之九容量及三分之一净优势属于固定正g,c、无其他成本或风险目标的利润模型。图示net/g及四倍归一化利润,保留完整负尾。Berk–Green理想理性流量均衡为预期风险调整净阿尔法零,不是实现收益或总收益零;费用攫取交易成本后的租金。a/3费率属于已知技能平方根成本扩展;基金样本观察不识别所有关闭原因。
- 量化地震。 代理wᵢ=−(Rᵢ−R̄)/Σ|Rⱼ−R̄|,定义良好时净美元零、总敞口1,不保证贝塔中性。曲线累加日损益;参考日标准差来自2006年1月至2007年6月,不是置信区间。风格中性风险算例与回放分开;杠杆和集中度可使对角特质风险很大。平仓解释是一个假说。共动量是具有样本关联的代理,不是基金人数或预测保证。行业夏普不识别普遍反转溢价或崩盘暴露。
- 归因。 拟合收益恒等式乘对齐持仓产生模型相对的精确会计。特质收益不自动等于技能。Brinson式选股项使用组合行业权重,包含选股及交互。因子分量方差除总方差可超过1;分量协方差存在时并非可加Euler归因。择时用除数T的样本协方差,不证明可重复技能。Euler波动率归因要求固定半正定协方差及正组合波动率;因子项假设因子残差正交。
- 协议及限额。 评估前明确时点、资产池、预测、风险、成本、约束及选择程序;受已见结果影响的改动需要诚实的新评估。固定α=(10⁻⁵,10⁻⁵)、γ=1、σ²=(10⁻⁸,4×10⁻⁴)、账本1:无约束仓位(1000,.025),10⁻⁴方差下限给(.1,.025),.05独立仓位上限给(.05,.025),选定ADV=(.5,.1)及.1成交量仓位上限给(.05,.01)。这是既有函数上的选定算术,不是校准规则、市场试验或历史修补。裁剪不是一般多资产约束最优解,限额不验证预测或盈利。
Desk questions, with solutions六个交易台检查
- 固定潜在玩具μ=.05、s=.10、N=500,月份独立:通常小相关基准.05√6000=3.873;精确年IR=√12×.05/√(.01+.9875/500)=1.5828。
- 偏差统计量1.30表示标准化收益标准差高于1达30%;T=504的独立高斯95%近似参考1±√(2/504)=1±.0630,实际依赖、尾部和非零条件均值需另行分析。
- 4%年度波动预测不是损失上限;一周损失10%可能与跳跃、遗漏协方差、杠杆或风险变化有关。
- 毛收益及技术固定时四倍规模使每美元2%成本翻倍至4%;毛8%净4%,未计其他成本。
- 成本四倍只在可忽略贴现区间使速率约减半;固定正贴现的极端成本区间速率按1/λ变化。
- 固定例子的方差下限修改风险输入,独立限额约束仓位;两者都不证明未来盈利。
Problems, with worked solutions习题1–6:完整解答
1. 开篇。 固定标准化分数玩具:潜在均值0.05、标准差0.10、N=500、独立月份;计算年IR并比较小相关基准。
解答
指定潜在模型下月方差=.10²+(1−.05²−.10²)/500=.011975,月IR=.05/√.011975=.45691。独立月份年化乘√12,得1.5828。通常常IC小相关基准=.05√(500×12)=3.8730;精确常IC玩具还需除√(1−.05²)。
2. 偏差参考。 T=504时,计算独立标准正态下标准化收益样本标准差的约95%参考区间;1.30是否在内?
解答
若zₜ独立标准正态,样本标准差b满足(T−1)b²服从χ²(T−1)。Delta方法给SD(b)≈1/√[2(T−1)];T=504乘1.96的95%半宽约.0618,与简写√(2/T)=.0630接近。1.30在两者之外;没有分布假设就不是实际数据的置信结论。
3. Vasicek。 已知高斯先验:贝塔均值1.0、标准差0.3;估计1.8且已知高斯标准误0.3。推导后验均值。
解答
已知高斯观测方差与已知高斯先验方差都为.09,后验精度2/.09,均值(1.8/.09+1/.09)/(2/.09)=1.4。实际经验贝叶斯需估计先验及标准误。
4. 规模。 毛收益固定,一亿美元时扣2%平方根成本净6%;计算四亿美元时净收益。
解答
固定毛收益8%、成本随√A变化:四亿美元成本2%√(400/100)=4%,净8%−4%=4%。题设排除其他成本。
5. 容量。 固定正\(g,c\),利润\(gA-cA^{3/2}\),盈亏平衡九亿美元;推导利润最优规模及管理费前净收益。
解答
Π=gA−cA^(3/2),g,c>0,盈亏平衡A₀=(g/c)²。Π′=g−(3/2)c√A=0给A*=(2g/3c)²=(4/9)A₀=四亿美元;Π″=−3c/(4√A)<0。此处每美元净收益g−2g/3=g/3,为管理费前。
6. 速率。 零贴现且\(\lambda\gg\gamma\)时,推导GP速率近似及成本四倍的影响。
解答
ρ=0时a²+γa−γλ=0,a=[−γ+√(γ²+4γλ)]/2。λ≫γ时a≈√(γλ),速率a/λ≈√(γ/λ);λ四倍使速率约减半、a约加倍。固定正ρ的极端成本极限不同,不能普遍声称减半。
Problems, with worked solutions习题7–10:完整解答
7. 合成。 两个标准化有限方差分数的总体Pearson IC均0.04,分数相关0.5;推导最佳合成Pearson IC。
解答
目标及分数单位方差、联合协方差可行且C=[[1,.5],[.5,1]]时,最佳线性Pearson相关平方为icᵀC⁻¹ic。两者IC=.04,得2×.04²/1.5=.00213333,开方=.046188,此处正等权达到最优。不能代入平均秩IC。
8. 均方根变化。 平稳单位方差分数的滞后相关为1−0.02及1−0.32;推导均方根变化比。转换为换手比还需哪些假设?
解答
平稳单位方差匹配分数的滞后相关为1−φ,则E[(zₜ−zₜ₋₁)²]=2φ,比值√(.32/.02)=4。若增量为零均值高斯,E|Δz|=√(2/π)乘均方根,故绝对分数变化也同比。换手还需要固定持仓尺度、总敞口归一化、匹配资产池及一致漂移处理,代理本身不能证明换手比。
9. 归因。 基金收益12%、平均贝塔0.4、样本市场收益20%、暴露与下一收益协方差项2%;计算残差。
解答
样本协方差用除数T。静态贡献.4×20%=8%,择时2%,故模型相对残差12%−8%−2%=2%。残差本身不证明技能。
10. 上限与交点。 玩具的独立月度潜在均值0.03、标准差0.06;推导年IR渐近值及持续与可分散方差交点\(N^*\)。
解答
潜在玩具μ=.03、s=.06,月极限μ/s=.5,独立月份年化√12/2=1.73205。令s²=(1−μ²−s²)/N,得N*=(1−.0009−.0036)/.0036=276.5278,约277。这是连续模型参考,不是市场有效广度估计。
Problems, with worked solutions习题11–12:资格题完整证明
11. 潜在相关变动定理。 (资格题)在有界潜在相关及标准化分数假设下证明\(IR=\mu/\sqrt{\sigma^2+(1-\mu^2-\sigma^2)/N}\);证明\(\mu>0\)时的单调性、极限及连续交点精确比例\(1/\sqrt2\)。
解答
代入π=ρN⁻¹Σzᵢ²+√(1−ρ²)N⁻¹Σzᵢεᵢ。归一化使第一项为ρ。给定ρ及分数,噪声收益均值0,方差(1−ρ²)/N,来自条件单位方差及零跨协方差。因此Eπ=μ。全方差公式给Varπ=s²+E(1−ρ²)/N=s²+(1−μ²−s²)/N。记b=1−μ²−s²>0,μ>0时IR(N)=μ(s²+b/N)^−1/2,导数μb/[2N²(s²+b/N)^(3/2)]>0。s>0时极限μ/s;s=0时精确值μ√N/√(1−μ²)。正s下连续交点N*=b/s²使方差2s²,故IR(N*)=μ/(s√2)精确成立。N*<2则交点低于可行分数广度。独立期才允许√T年化,序列依赖通常改变比例。证明针对潜在矩,不是测得样本秩IC。
12. 标量GP。 (资格题)按第5章标量贝尔曼时序,推导二次值函数系数、Riccati方程、交易速率及目标乘数;说明假设,区分固定正贴现及可忽略贴现的成本渐近。
解答
d=1−ρ∈(0,1)、c=1−φ、方差v>0、λ,γ>0、已知线性条件预测βcf。当前交易成本立即支付,经营收益风险及续值贴现:
V(x₋,f)=max_x{d[βcfx−γvx²/2]−λv(x−x₋)²/2+d E[V(x,f⁺)|f]},E[f⁺|f]=cf,创新方差有限。猜测V=−Axx x₋²/2+Axf x₋f−Aff f²/2+常数。H=dγv+λv+dAxx,一阶条件x=(λv/H)x₋+[dc(β+Axf)/H]f。比较x₋²得Axx=λv−(λv)²/H。记k=1−λv/H,Axx=λvk,整理得dλk²+(dγ+ρλ)k−dγ=0。稳定根0<k<1,a=λk:
a=[−(dγ+ρλ)+√((dγ+ρλ)²+4d²γλ)]/(2d)。
比较x₋f得Axf=λv乘策略的f系数,解得系数dcβ/(H−dcλv)。除以k写成(1−k)x₋+k aim。利用k(H−dcλv)=dv(γ+φa),目标为[βcf/(γv)]/[1+φa/γ],即条件下一期收益的Markowitz目标乘持续性折扣。ρ=0且λ≫γ时k≈√(γ/λ);固定ρ>0且λ趋无穷时a趋dγ/ρ,k≈dγ/(ρλ)。已知固定风险、无约束名义持仓、线性动态、适当矩、时序和适定性至关重要;保存的Riccati检查只验证这一指定数学问题。
For the researcher研究:精确标准化分数恒等式
N≥2、Σzᵢ=0、Σzᵢ²=N,有界潜在ρ∈[−1,1]。条件噪声均值零、方差1、跨资产协方差零。μ=Eρ、s²=Varρ、μ²+s²<1。在rᵢ=ρzᵢ+√(1−ρ²)εᵢ及π=N⁻¹Σzᵢrᵢ下,Eπ=μ,Varπ=s²+(1−μ²−s²)/N,IR=μ/√Varπ。
未改动的公司辅助函数省略−s²/N,明确标为近似。保存的模拟将高斯潜在参数截在±.99;输入矩是截断前参数,精确恒等式要求截断后真实矩。测得有限横截面Pearson或秩IC不等于潜在ρ。IC离散度已含抽样噪声,再加入噪声项可能重复计算;经验表是启发式比较。零和权重下π=N sd_cs(w) sd_cs(r) Corr_P(w,r),横截面标准差除以N;规模随归一化及资产池变动。高斯下Spearman与Pearson也不同;混合波动率可造成混合峰度。四个经验比率改变定义并重用已选择数据,接近不代表因果分解或置信区间;未估计HAC或选择调整区间。记忆改变年化,但特定线性二次模型仍可有Riccati解;有限矩已知时肥尾不抹掉形式上的均值方差解,稳健估计与现实约束是不同难题。
Papers and sources阅读与验证
教材及逐章论文列于英文书目,中文叙述遵循同样的样本及假设边界。现有公司风险模型纯测试已通过;科学源文件审阅与视觉验证是不同检查。本任务只用已审计普通原始计算恢复、受保护的仅缓存QA和明确场景选择。无参数compute-all会包括被排除实验,不是本次重建指令。实际证据及当前状态在docs/qa及系列打磨台账维护。
Review log of the earlier QA passes on this part: docs/qa/quant/part31.md.
Data, scope and reproducibility数据及解释边界
九项未改动的普通原始计算已各恢复一次:model、vasicek、law、costs、gp、combine、attribution、quake、theory。共九次包装器调用,没有失败或重试,没有新增市场试验,没有修改登记文件。策略实验在计数及缓存访问前被排除;本次审阅没有读取其封存缓存、载荷、结果或诊断。第31部分既有累计登记计数为23,535,全局23,562,其中十次既有计费属于本部分;计数描述研究历史,不代表独立业绩证据。
币安例子沿用第29部分冻结的公开USDT交易对网格和2018–2020研究掩码。继承的读取器先加载2017–2025公开日数组再筛选研究期;公开原始数据与封存策略载荷不同。2026年末冻结名单具有回顾性,存在幸存者、上市可得性、资产分类等时点问题。日度资格要求60天历史及至少25万USDT成交额中位数。风险模型每日合格币种数量中位数为34;预热及完整案例筛选进一步改变各项计算的样本。美元标签假设USDT平价。
量化地震回放使用Kenneth French截至2020年的49个美国日度行业组合,是行业代理,不是实际基金持仓、个股执行或Khandani–Lo原实验。缺失收益填零;算术损益不含费用、借券或冲击。文献引用、历史报道、保存的研究计算、模拟及选定算术输入各有不同适用范围。年化使用所述独立期数约定;未估计选择调整或依赖稳健的置信区间。完整连续成片试听及发音审阅仍单独待完成。
Build the film
python -m videos.quant.quant31.compute # the part's numbers, into .cache/quant31
python tools/make.py quant31 # the narrated film, English and Chinese
EXPLAINER_TTS=silent python tools/qa_scene.py quant31 Hook # one chapter, silent, with a contact sheet
Scenes: videos/quant/quant31. Setup: see the course page. Source of these notes: the part's README and the scenes' narration.