Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Worked Solutions

This is a reference companion to Chapters 1–4. Attempt an exercise before reading its solution; compare the reasoning as well as the numerical answer.

ChapterExercisesMain skill
1. Statistical foundations5Derivation, covariance estimation and simulation
2. Financial time series4Dependence diagnostics and their interpretation
3. The three-factor model5Estimation, uncertainty and economic interpretation
4. Beyond three factors4Model comparison, diversification and subsample evidence

Solutions use the same return conventions as the chapters. Market-dependent answers are calculated from the displayed sample, so their numerical values can change when the data are refreshed. The mathematical reasoning should continue to apply.

Book introduction · Data and methods

Source
As of 2026-10-31; source returns are decimals.
Source
Source
FF3 full: 321 observations, 2000-01-01 to 2026-09-01; as of 2026-10-31
FF3 short: 201 observations, 2010-01-01 to 2026-09-01; as of 2026-10-31
FF5 + momentum: 321 observations, 2000-01-01 to 2026-09-01; as of 2026-10-31

Part 1: Statistical Foundations (Notebook 01) — Solutions


Exercise 1: Hand Computation

Problem: Given x=[2,5,3,8,7]x = [2, 5, 3, 8, 7] and y=[4,7,5,10,9]y = [4, 7, 5, 10, 9]:

  1. Compute mean, variance, std dev of xx and yy

  2. Compute Cov(x,y)\text{Cov}(x,y) and Corr(x,y)\text{Corr}(x,y)

  3. Set up the design matrix and compute β^\hat\beta via the normal equations

PART 1: Descriptive Statistics
==================================================
  x = [2. 5. 3. 8. 7.]
  y = [ 4.  7.  5. 10.  9.]

  mean(x) = 25.0/5 = 5.00
  mean(y) = 35.0/5 = 7.00

  var(x)  = Σ(xᵢ − x̄)² / (n−1) = 26.00 / 4 = 6.5000
  var(y)  = 26.00 / 4 = 6.5000

  std(x)  = √6.5000 = 2.5495
  std(y)  = √6.5000 = 2.5495

  Verify with NumPy:  std(x, ddof=1) = 2.5495  ✓

PART 2: Covariance and Correlation
==================================================
  Cov(x,y) = Σ(xᵢ-x̄)(yᵢ-ȳ)/(n-1) = 26.00/4 = 6.5000
  Corr(x,y) = Cov(x,y)/(s_x · s_y) = 6.5000/(2.5495·2.5495) = 1.0000

  Verify: np.corrcoef = 1.0000  ✓

PART 3: OLS via Normal Equations
==================================================
  Design matrix X (n×2):
[[1. 2.]
 [1. 5.]
 [1. 3.]
 [1. 8.]
 [1. 7.]]

  X'X =
[[  5.  25.]
 [ 25. 151.]]

  (X'X)⁻¹ =
[[ 1.16153846 -0.19230769]
 [-0.19230769  0.03846154]]

  X'y = [ 35. 201.]

  β̂ = (X'X)⁻¹ X'y = [2.000000, 1.000000]

  Interpretation:  ŷ = 2.0000 + 1.0000 · x
    → intercept ≈ 2.00, slope ≈ 1.00

  Sanity: Cov(x,y)/Var(x) = 1.000000  (should match slope)  ✓

Exercise 2: CLT in Action — Beta(0.5, 0.5) Distribution

Problem: Repeat the CLT experiment with Beta(0.5,0.5)\text{Beta}(0.5, 0.5) — a bimodal distribution. Show that sample means become normal as nn grows.

<Figure size 1800x400 with 4 Axes>
The bounded Beta distribution has finite moments and satisfies the iid CLT.
Its signed third central moment is zero, but E[|X-mu|^3] is positive.
Symmetry removes a skewness term in an Edgeworth expansion; it does not make the Berry–Esseen bound zero.
Inspect the histograms: visual similarity at a given n is not a universal error bound.

Exercise 3: Sandwich estimator comparison

Use the five observations from Notebook 01 Section 5 and multiply the final two outcomes by three. This is a deterministic perturbation, not a controlled experiment that isolates heteroscedasticity. Compare Classic, HC0 and lag-one HAC covariance mechanically.

Loading...
Largest absolute slope-SE change: HC0
Five observations illustrate mechanics; robust asymptotic inference is unreliable here.

Exercise 4: Monte Carlo — Varying the Autocorrelation (Challenge)

Problem: Run Monte Carlo simulations with ρ∈{0,0.3,0.6,0.9}\rho \in \{0, 0.3, 0.6, 0.9\} and plot rejection rates for Classic OLS vs Newey-West.

  ρ = 0.0:  Classic = 17.8%,  Newey-West = 6.2%
  ρ = 0.3:  Classic = 18.6%,  Newey-West = 6.3%
  ρ = 0.6:  Classic = 17.8%,  Newey-West = 6.9%
  ρ = 0.9:  Classic = 19.6%,  Newey-West = 7.5%
<Figure size 800x500 with 1 Axes>
Monte Carlo standard errors, percentage points:
0.0 [np.float64(0.86), np.float64(0.54)]
0.3 [np.float64(0.87), np.float64(0.54)]
0.6 [np.float64(0.85), np.float64(0.57)]
0.9 [np.float64(0.89), np.float64(0.59)]
HAC is asymptotic and need not attain the nominal 5% size in this design.
The slope score is x_t*epsilon_t: iid mean-zero x can weaken score dependence even when errors are persistent.

Exercise 5: Why does a dependent-data CLT matter?

  1. The iid CLT cannot be invoked just because return autocorrelations are small. Nonlinear dependence, including dependence in squared returns, can remain.

  2. One sufficient theorem assumes strict stationarity, E∣Zt∣2+δ<∞E|Z_t|^{2+\delta}<\infty and ∑k≥1α(k)δ/(2+δ)<∞\sum_{k\ge1}\alpha(k)^{\delta/(2+\delta)}<\infty for some δ>0\delta>0. Regression inference applies the relevant multivariate CLT to the score Zt=XtϵtZ_t=X_t\epsilon_t, alongside exogeneity and a nonsingular regressor moment matrix. Return ACF plots do not establish these conditions.

  3. A random-walk level has time-varying variance, so a stationary covariance sequence γk\gamma_k and its usual long-run variance formula are not applicable. Ordinary stationary HAC does not fix a spurious levels regression. Differences may have an appropriate stationary model, but this must be justified. ADF rejection alone does not prove mixing, constant moments or valid regression inference.

Part 2: Time-Series Foundations (Notebook 02) — Solutions


Exercise 1: Stationarity on a New Series (AAPL)

Problem: Download daily AAPL prices, compute log returns, run ADF tests on prices and returns, and plot rolling moments.

AAPL daily prices: 2,975 observations, 2015-01-02 to 2026-10-30; as of 2026-10-31
ADF TEST RESULTS
============================================================

AAPL PRICES:
  ADF statistic:  1.1635
  p-value:        0.9957
  Conclusion:     Do not reject unit root

AAPL LOG RETURNS:
  ADF statistic:  -17.6225
  p-value:        0.000000
  Conclusion:     Reject unit root
ADF uses a constant, AIC lag selection and a unit-root null; it does not test full stationarity.
<Figure size 1500x800 with 4 Axes>
Rolling moments are diagnostics. Changing conditional volatility is compatible with stationary GARCH, but neither the plot nor ADF proves that model.

Exercise 2: Interpreting ACF plots

ProcessPopulation ACF of XtX_tPopulation ACF of Xt2X_t^2
iid, mean-zero Gaussian noiseZero after lag zeroZero after lag zero
Stationary mean-zero Gaussian AR(1), ϕ=0.8\phi=0.80.8k0.8^k0.64k0.64^k
Stationary GARCH returns with martingale-difference innovations and finite required momentsZero after lag zeroCan show persistent positive dependence

White noise alone means uncorrelated observations; it does not imply independence or independent squares. The first row requires iid Gaussian noise. Sample ACFs fluctuate: about 5% of individual lags can exceed pointwise 95% bands even under the null, and those bands are not a joint test.

Volatility clustering motivates heteroscedasticity-robust inference. HAC also allows score autocorrelation, but is not logically necessary from clustering alone: a martingale-difference regression score can have zero serial covariance, making HC appropriate under other regularity conditions. Inspect residuals and scores; do not infer a regression covariance structure solely from raw-return ACFs.

Exercise 3: Sample-period sensitivity of ARCH tests

Split monthly Mkt-RF into 2000–2011 and 2012–latest. Fit a mean in each window, then apply ARCH(6) to its residuals. Compare estimates and sample lengths; do not assume the later period is calmer.

2000–2011: N=144, monthly SD=4.87%, ARCH LM=18.059, p=0.006087
2012–latest: N=177, monthly SD=4.17%, ARCH LM=26.758, p=0.0001608
<Figure size 1300x400 with 2 Axes>
Differences reflect both the sample and test power. Non-rejection does not establish constant conditional variance.

Exercise 4: Does an apparent long-run variance plateau establish mixing?

No. For a covariance-stationary scalar process, absolute summability ∑k∣γk∣<∞\sum_k |\gamma_k|<\infty is sufficient for a finite long-run variance and variance-based consistency of the sample mean. A signed partial sum can appear stable because positive and negative covariances cancel, even if absolute summability has not been established.

A finite sample estimates only finitely many noisy covariances. Neither an apparent plateau of signed sums nor of absolute sums proves an infinite-series condition. Even population absolute summability does not, by itself, imply strong mixing or a CLT. A theorem must impose suitable dependence and moment conditions on the relevant regression scores. Structural breaks threaten stationarity; long-memory processes can violate covariance summability. Stationarity, covariance summability and mixing are distinct properties.

For a random-walk level, variance depends on time; there is no stationary lag-only covariance sequence to insert in this formula. Consistency for a finite long-run variance requires that such a target exist, alongside appropriate estimator conditions. A structural break violates the single stationary model, but does not logically imply failure of every mixing condition. Inspect subsamples and break-sensitive specifications, report their dates, and do not treat a post-break window as automatically stable.

Part 3 — Fama–French 3-factor model

Exercise 1: Predicting loadings

Fund typeQualitative expectation
QQQBroad equity exposure; large-cap/growth orientation suggests negative SMB and HML, subject to the sample.
IWMPositive size exposure; a blend mandate does not force HML to zero.
Daily 2× S&P 500 ETFApproximately twice the daily index exposure before costs, not exactly twice its monthly return or beta.

These are hypotheses, not estimated values. Daily leverage resets, financing, path dependence and compounding affect monthly exposure. Large-cap benchmarks can have nonzero size and value coefficients.

Exercise 2 — Comparing ETFs (Hands-On)

Problem: Run the FF3 regression on IWN (Small Cap Value). Compare its R2R^2 and βSMB\beta_{\text{SMB}} to SPY and VTV.

Common ETF comparison: 201 observations, 2010-01-01 to 2026-09-01; as of 2026-10-31
Loading...
Highest sample R²: SPY
IWN minus SPY SMB: 0.9622475945491108
High R² measures within-sample fit, not superior investment performance.

Exercise 3 — Sensitivity of Newey-West Standard Errors

Problem: Re-fit the SPY regression with maxlags=0, default, and maxlags=8. How sensitive are conclusions to lag choice?

Loading...
Lag zero with n/(n-k) correction equals HC1; uncorrected lag zero equals HC0.
Coefficients stay fixed. HAC standard errors need not increase monotonically with lag length.

Exercise 4: Economic versus statistical significance

The stated monthly alpha is 0.03% with p = 0.04, so it rejects zero at a nominal 5% level under the inference method that produced that p-value. Its arithmetic annualisation is 0.36%, or 36 basis points.

Thirty-six basis points can be economically meaningful. Compare it with uncertainty, implementation costs and the relevant alternative, not an arbitrary cutoff. If alpha is estimated from observed fund returns, recurring fund expenses are already reflected; subtracting the expense ratio again double counts them. Investor spreads, trading costs and tax remain separate.

Switching from classical to HAC covariance leaves the alpha estimate unchanged but can make its standard error and p-value either larger or smaller. Without the data and covariance estimates, the direction is unknown. A p-value of 0.04 is also fragile to specification changes and multiple testing. Alpha depends on the model and period; it does not establish skill or a repeatable future return.

Exercise 5 — Extending to Another Asset (Challenge)

Problem: Download a stock of your choice, compute monthly excess returns, run the FF3 regression with Newey-West SEs, and interpret the results with diagnostics.

AAPL FF3: 201 observations, 2010-01-01 to 2026-09-01; as of 2026-10-31
Loading...
Annualised arithmetic alpha: 10.74%; R²: 0.4082
<Figure size 1100x400 with 2 Axes>
Loading...
Single-stock alpha mixes model omissions and stock-specific outcomes; it does not identify skill.

Part 4 — Advanced Factor Models (Notebook 04)

Exercise 1 — 5-Factor Model on IWM

Problem: Run the full 5-factor regression on IWM (Russell 2000 small-cap blend). Compare SMB loading to IWN, check HML significance, and compare 3-factor vs 5-factor alpha.

Common small-cap comparison: 314 observations, 2000-08-01 to 2026-09-01; as of 2026-10-31
Loading...
FF3 uses its own SMB. Published FF3 and FF5 are not exactly nested, so R² need not increase.
Compare measured SMB and HML estimates; a blend mandate does not imply zero HML exposure.

Exercise 2 — Rolling Sharpe Ratios for Combined Strategies

Problem: Compute 36-month rolling Sharpe ratios for (a) HML alone, (b) Value + Profitability, (c) Value + Profitability + Momentum. Plot and compare.

<Figure size 1400x550 with 1 Axes>
SUMMARY STATISTICS
============================================================
                 Strategy   Mean SR    Std SR     % < 0
------------------------------------------------------------
                 HML only     0.135     0.734     50.3%
             Value + Prof     0.305     0.577     26.9%
         Val + Prof + Mom     0.320     0.557     27.3%

First/last months with all three negative (not necessarily consecutive):
  2011-09 to 2025-12 (41 months)
The displayed sample determines whether diversification improved Sharpe or stability.
These overlapping rolling windows are dependent and are not independent performance tests.

Exercise 3: Momentum crash anatomy

Find the worst compounded three-month UMD return. Compare market total return and an equal-weight UMD/HML combination in those same months. Distinguish the three-month loss from peak-to-trough drawdown. Spread-factor compounding here is a hypothetical constant-notional index convention, not a traded fund return net of financing and costs.

Worst UMD window: 2009-03-01 to 2009-05-01
Loading...
Compounded three-month returns (%):
UMD -49.37 HML 9.50 Market total 26.38 UMD + HML -23.02 dtype: float64
Combination minus UMD return: 26.35 percentage points
UMD full-sample max drawdown: -57.78%
UMD + HML full-sample max drawdown: -40.69%
<Figure size 1300x400 with 2 Axes>
Compare the displayed market rebound with the momentum-crash mechanism; diversification is not a guaranteed hedge.

Exercise 4: Beta anomaly across subperiods

Use true value-weighted beta deciles (not the quintiles in the same file). Split 2000–2011 and 2012–latest. Compare descriptive security-market lines and control a simple D1-minus-D10 spread for FF5 plus momentum. This unscaled spread is not the published beta-neutral BAB strategy.

<Figure size 1600x600 with 2 Axes>

============================================================
UNSCALED D1–D10 SPREAD ALPHA BY SUBPERIOD (FF5 + Momentum controls)
============================================================

  2000–2011 (144 months)
    Alpha (ann.): -2.02%   t = -0.51   p = 0.6089
    Conclusion:   NOT significant

  2012–latest (177 months)
    Alpha (ann.): +0.09%   t = 0.02   p = 0.9869
    Conclusion:   NOT significant
Compare estimated slopes with the CAPM reference; do not assume their signs.
A significant spread intercept is conditional on this model and sample; this is not published BAB.
Changes in access to leverage could affect demand for high-beta stocks, but this two-period comparison cannot identify that causal mechanism.
A fitted cross-sectional line through ten noisy estimated betas is descriptive, without an errors-in-variables correction or pricing test.

Bringing the answers back to the investment question

The exercises establish a sequence: calculate an estimator, examine its uncertainty, check the time-series setting, and interpret factor exposures under a stated model. Historical diversification and a statistically significant result each answer a narrower question than whether a fund will outperform in the future.

Use that sequence in Chapter 5’s ETF case study. The data and methods reference explains the common conventions.