Factor exposure and residual performance

Construct an affine factor fit and audit what its intercept and residual risk actually mean.

39 minutes · advanced · Original Poker4Quant lesson

What you will learn

Derive the unique affine least-squares projection by completing the square, construct residual orthogonality certificates and a factor-origin intercept witness, and distinguish uncorrelated residuals from independence.

Prerequisites: Benchmark-relative performance and paired risk · Portfolio covariance and minimum variance

Separate exposure from the fitted intercept

A strategy can have a positive mean because it loads on a factor with a positive mean. Comparing that mean with cash alone does not isolate the part left after matching exposure. Let Y be a strategy's excess return above a specified one-period cash rate, and F a factor excess return over the same cash rate in the same states. We seek an affine approximation Y=a+bF+e. The slope b measures linear exposure; the intercept a is the fitted return at F=0; e is the statewise residual. These quantities answer a different question from the return on holding one unit of a benchmark. The exposure is chosen by a squared-error criterion rather than being fixed at one. Neither the fitted intercept nor a small residual automatically demonstrates manager skill.

Assume four equally probable population states, a single period, simultaneous observations, and returns measured in percentage points. Use F=(−1,0,1,2) and Y=(0,0,2,6). These are an original stipulated joint law, not historical observations. There are no fees, missing records, financing constraints or estimation errors in this arithmetic exercise. We permit any real slope and intercept for the mathematical fit. Implementing a hedge would require separate feasibility and cost assumptions. Because these four states exhaust the law, all expectations use divisor four. We are not estimating a sampling error or using the residual degrees-of-freedom correction from statistical regression.

Derive the affine projection by completing the square

Choose a and b to minimize Q(a,b)=E[(Y−a−bF)^2]. For any fixed b, write Y−bF as its mean plus a centered fluctuation. The cross term vanishes on averaging, leaving Q(a,b)=Var(Y−bF)+(E[Y]−a−bE[F])^2. Thus the best intercept at that slope is a(b)=E[Y]−bE[F]. This first step is essential: setting the intercept to zero changes the optimization problem and generally changes the slope. A zero intercept is an additional restriction, not a harmless convention.

After substituting a(b), the remaining objective is Var(Y)−2bCov(F,Y)+b²Var(F). If Var(F)>0, complete the square to obtain Var(F)[b−Cov(F,Y)/Var(F)]²+Var(Y)−Cov(F,Y)²/Var(F). Hence b*=Cov(F,Y)/Var(F), a*=E[Y]−b*E[F]. The positive squared coefficient proves a unique global minimizing slope without relying only on a stationary derivative. At the optimum E[e]=0 and Cov(F,e)=Cov(F,Y)−b*Var(F)=0. These two equations are diagnostic certificates for an affine fit. Zero mean alone merely checks the intercept at the current slope; it does not certify the slope.

Audit the worked four-state fit in two ways

Here E[F]=1/2 and E[Y]=2. Factor deviations are (−3/2,−1/2,1/2,3/2), so Var(F)=(9/4+1/4+1/4+9/4)/4=5/4. Strategy deviations are (−2,−2,0,4), giving Var(Y)=(4+4+0+16)/4=6. The paired centered products are (3,1,0,6), whose average is 5/2. Consequently b*=2 and a*=1. Fitted returns are (−1,1,3,5), and subtracting them from Y gives e=(1,−1,−1,1). The residual mean is zero; its variance and mean square are both one. The products of centered F with e are (−3/2,1/2,−1/2,3/2), whose mean is zero.

Independently, the complete-square expression becomes Q(a(b),b)=6−5b+(5/4)b²=1+(5/4)(b−2)². At b=1, choose a=3/2 to center the residual, but the mean square remains 9/4. At b=3 the centered residual also has mean square 9/4. Neither centered fit is optimal. At b=2,a=0 the residual has mean one and mean square two: matching exposure alone does not supply the intercept. At b=2,a=1, explained variance b²Var(F)=5 and residual variance one sum to total variance six. The cancellation behind this identity is Cov(F,e)=0, not an independence assumption.

Build an intercept-origin witness

Change the factor coordinate to H=F+c while leaving every strategy return and state probability unchanged. Since Var(H)=Var(F) and Cov(H,Y)=Cov(F,Y), the best slope stays two. But E[H]=E[F]+c, so the new intercept is aH=1−2c. Choosing c=1/2 turns the fitted intercept from one to zero. The fitted value aH+2H is still 1+2F in every state. Residuals, residual risk and the quality of fit are identical. This construction shows that the intercept has meaning only alongside a declared factor origin and return convention. A change in the reported intercept alone is not evidence of a changed strategy.

In the workshop, shift the factor origin and move the candidate slope and intercept in half-unit steps. The live state rows show the residual produced by your choices, along with its mean, covariance with the factor and mean square. First construct any zero-mean fit with an incorrect slope, then use the covariance to repair it. Certify the unshifted fit, save its report, shift the origin by one half, and construct the second fit without changing Y. Save both certificates to document the same residual vector with different intercepts. The audit checks your construction and an entered minimum mean square; seeing a low number without satisfying the two normal equations is insufficient. Certificates are visit-local practice, separate from account progress.

Distinguish orthogonality, independence and performance evidence

The fitted residual in this example is completely determined by the factor: e=(F−1/2)²−5/4. For instance, when F=−1 the residual must equal one, whereas its unconditional chance of equaling one is only one half. Thus e and F are dependent despite zero covariance. A linear fit removes linear co-movement, not all information about Y contained in F. A nonlinear factor or additional predictor could absorb some of this residual variation. It would be incorrect to label every residual fluctuation as independent noise or as a separate diversifiable source of risk. The decomposition is relative to the chosen span of predictors.

If the factor is constant, its variance is zero and the slope formula is unavailable. Only the combined fitted constant a+bF is identified: many coefficient pairs give the same prediction. Even with a varying factor, our population identities do not prove causal exposure, future performance, a correctly specified asset-pricing model or a statistically significant intercept. Historical fitting adds sampling uncertainty, possible selection bias, outliers and dependence across periods. A realistic evaluation must declare the factor construction, cash convention, horizon and whether parameters were selected before evaluation. Keep the fitted residual e distinct from Y−bF: the latter has mean a, while e has mean zero by construction. Reporting a divided by residual volatility also requires a positive denominator and a carefully defined evaluation purpose; it is not computed here.

Worked example

Fit Y=(0,0,2,6) to F=(−1,0,1,2) in four equally likely states, then shift the factor origin by 1/2.

  1. Average the paired law: E[F]=1/2, E[Y]=2, Var(F)=5/4, Var(Y)=6 and Cov(F,Y)=5/2.
  2. Complete the square: after centering, Q=1+(5/4)(b−2)². The optimum is b=2 and a=1.
  3. Subtract fitted values (−1,1,3,5) to get residual (1,−1,−1,1). Its mean and covariance with F vanish; its mean square is one.
  4. Check variance independently: 2²×5/4+1=6. With b=1 and a=3/2, mean square is 9/4.
  5. For H=F+1/2 use aH=0,bH=2. Predictions and residuals are identical, even though the intercept is now zero.

The affine projection is certified by two moment conditions. Its intercept depends on factor origin, and orthogonal residuals need not be independent.

Hands-on: Construct an orthogonal residual

Move an affine fit, repair both residual moment conditions, and retain two factor-origin certificates with the same residual risk.

Construct an orthogonal residual

Four equally probable states. Strategy excess returns Y=(0,0,2,6); base factor F=(−1,0,1,2). Shift its origin to H=F+c, then construct a+bH. Move the coefficients in half-unit steps. Find a centered but nonoptimal residual, repair its covariance, and save optimal fits for c=0 and c=1/2. Compare their intercepts and identical residual risk.

Factor origin

Slope

Intercept

Origin c 0; slope b 0; intercept a 0. Residual mean 2; factor covariance 2.5; mean square 10.

State 1: H -1, Y 0, fit 0, residual 0; probability 1/4.

State 2: H 0, Y 0, fit 0, residual 0; probability 1/4.

State 3: H 1, Y 2, fit 0, residual 2; probability 1/4.

State 4: H 2, Y 6, fit 0, residual 6; probability 1/4.

Construct and certify an affine fit.

Visit-local construction; no account credit.

Common mistakes

  • Forcing a zero intercept without declaring a constrained fit.
  • Calling a centered residual an optimal residual before checking covariance.
  • Confusing Y−bF, which has mean a, with e=Y−a−bF.
  • Interpreting zero covariance as independence or a fitted intercept as verified skill.
  • Dividing by zero factor variance or treating population residual variance as a sampling-error estimate.

Keep these ideas

  • Center first, then complete the square in the slope.
  • For positive factor variance, b=Cov(F,Y)/Var(F) and a=E[Y]−bE[F].
  • Verify E[e]=0, Cov(F,e)=0 and the variance reconciliation.
  • A factor-origin shift changes the intercept without changing the fit; nonlinear dependence can remain.

Further reading

  • NIST/SEMATECH e-Handbook: 4.4.3.1 Least Squares ↗

    Read general least-squares criterion, straight-line coefficient derivation and residual standard deviation discussion. Supports affine minimization formulas only. Our four-state population, complete-square proof, origin witness and activity are original. We use population mean squares, not the source sampling correction. No source example, quotation or video reused. Checked 2026-10-25.

  • NIST/SEMATECH e-Handbook: 4.1.4.1 Linear Least Squares Regression ↗

    Read definition of linearity in parameters and disadvantages including shape limits, extrapolation and outlier sensitivity. Supports model-scope caveats. Original residual dependence witness is separately derived; no empirical fit or statistical significance claimed. Checked 2026-10-25.

  • William F. Sharpe: The Sharpe Ratio (1994) ↗

    Read Definitions (ex ante and ex post), Time Dependence, scale independence discussion, and Summary on the author’s Stanford page. Supports differential-return definition, horizon and correlation caveats. Our four-state strategies, pairing manipulations, ranking reversal, arithmetic and questions are original. Population law rather than empirical estimate; no video or whole-paper review claimed. Checked 2026-10-25.

Check your understanding

Untimed · 5 checks · Guest progress stays in this browser. Sign in to save account snapshots.

Loading saved lesson…