Chapter 4 Β· Section 5 practice

Cross-sectional Attention Features

0 of 5 answered

These questions review the examples in the companion slides. Choose an answer, then check the explanation.

Question 1

What does this survivorship bias do to a backtest run on the file?

  • Nothing β€” every price is the real price on that day
  • Flatters it: firms that failed are absent, so returns are biased upward and losers are under-represented
  • Hurts it: today’s winners were expensive in 2015
  • Only changes the sector mix

Question 2

Why is (rvol_21d βˆ’ rvol_21d.mean()) / rvol_21d.std() over the whole 2015–2024 file a look-ahead?

  • Volatility is not normally distributed
  • The mean is dominated by 2020
  • The 2015 z-score depends on 2024’s mean and std, which a live model in 2015 could not have seen
  • It is not: the transform is monotone

Question 3

With \(W_q = W_k = I\), the weight stock \(i\) gives stock \(j\) is proportional to

  • \(1/N\) β€” every stock equally
  • \(\exp(x_i \cdot x_j / \sqrt{K})\) β€” a similarity kernel in characteristic space
  • the sector indicator \(\mathbb{1}[s_i = s_j]\)
  • the Euclidean distance \(\lVert x_i - x_j \rVert\)

Question 4

The row dated 2018-12-31 has ret_next = January 2019’s return. May it sit in the training set when we predict the 2019-01-31 row?

  • No β€” its target overlaps the first test month
  • Yes β€” its target is realised on 31 Jan 2019, exactly when the 2019-01-31 features are observed
  • Only if we drop one month between train and test
  • Yes β€” targets can never leak

Question 5

Which feature set will have the highest mean rank IC β€” and will the difference be significant?

  • Raw standardised \(X\): fewer features, less over-fitting
  • \(X\) + sector-relative: sector-relative controls win
  • \(X\) + attention context and deviations: data-driven peers win
  • No approximate single-set test rejects zero here; pairwise superiority requires a separate paired comparison