Project 6 Questions and Complete Answers
Author: Yuxiao Ma · Revision date: 2026-10-16.
This file contains the stable Project 6 IDs P6-L01–P6-L08 and P6-T01–P6-T04. P6-L01–P6-L03 preserve the original questions in the base report; P6-L04–P6-L08 cover the BIL19 v2 tree and PCA extension. The questions also appear in the v2 teaching guide and the workbook study notes. Each answer stays in the same project as its prompt.
Project questions: work independently first
P6-L01. Can the base Lasso IC of 0.01785759 be compared directly with Ridge's 0.01982995 to conclude that Lasso is weaker?
P6-L02. Does compressed NW(4) represent a four-trading-day HAC?
P6-L03. Can Chapter 39 reuse these P6 paired results?
P6-L04. Can the P6 experiment with 46 features, 1,512 dates, and 16 folds be merged into the Chapter 40 interaction experiment with 26 features, 1,260 dates, and 12 folds? Explain the design difference and the boundary around the fivefold post hoc comparison.
P6-L05. What are the six v1 prediction sequences and the four additions in v2? Why does the report say “8 main comparison models” while the frozen run has 10 prediction sequences? Which type of model is PCA + Ridge?
P6-L06. What does independence mean for the q and noise sequences? Are they IID over time? How are the three price columns generated? Why can the complete 46-dimensional feature set not be described as independent, identically distributed, and homoskedastic?
P6-L07. Using
P6-L08. Does the frozen configuration's claims_rule specify a joint threshold requiring “tree-model
P6-T01 (Label maturity and date groups). Fitting occurs after the close information for
P6-T02 (Diagnosing group permutation). There are three assets on each of two signal dates. On the first date,
# WRONG: one global order mixes signal dates; two independent orders destroy pairs.
q_perm = q_values[global_order]
z_perm = z_values[another_global_order]
P6-T03 (The full-dimensional PCA control). Let
P6-T04 (Costs, weight drift, and event order). Fractional shares are allowed; ignore financing, dividends, borrow fees, and impact. Initial cash is 1,000 and both A and B close at 100. Target dollar weights are
P6-L01: Own-date IC and common-date pairing
Question. Can the base Lasso IC of 0.01785759 be compared directly with Ridge's 0.01982995 to conclude that Lasso is weaker?
Complete answer. No. The Lasso value is its mean over 630 dates on which its IC is defined; Ridge's 0.01982995 is its mean over all 1,002 dates. The sets differ, so their direct difference is not a paired comparison. On the common 630 dates, Lasso's mean is 0.01785759, Ridge's mean is 0.01613330, and the paired mean difference is +0.00172429. This is a descriptive common-date statistic; the display provides no valid inferential t statistic for it and supports no superiority claim. An IC for a constant forecast is NaN (undefined), not zero.
P6-L02: The time span in compressed NW(4)
Question. Does compressed NW(4) represent a four-trading-day HAC?
Complete answer. No. Suppose the valid trading-date indices are 0, 2, 3, 5, and 8. After missing dates are removed, a fourth-order lag over the compressed observations connects the first and fifth valid observations: date 0 and date 8, eight trading days apart. It is not a four-day lag on the trading calendar. The report retains the old compressed values only as historical diagnostics, not as four-trading-day HAC or valid current inference; no new HAC was calculated.
P6-L03: P6 cannot replace Chapter 39's paired data
Question. Can Chapter 39 reuse these P6 paired results?
Complete answer. No. P6 and Chapter 39 are different experiments. The frozen row-level predictions needed to reconstruct Chapter 39's historical common-date comparison are unavailable. P6 rows belong to a different configuration and run identity and cannot fill that gap. Retraining also cannot create historical realized predictions. Preserve the fact that Chapter 39's paired quantity could not be recomputed rather than substituting another project's numbers.
P6-L04: P6 and the Chapter 40 interaction experiment
Question. Can the P6 experiment with 46 features, 1,512 dates, and 16 folds be merged into the Chapter 40 interaction experiment with 26 features, 1,260 dates, and 12 folds? Explain the design difference and the boundary around the fivefold post hoc comparison.
Complete answer. No. P6's linear construction uses 46 features, 1,512 trading dates, and 16 outer folds. Chapter 40 uses a different constructed design with 26 features, 1,260 dates, and 12 folds. The generating process, sample, and split are different; Chapter 40's interaction structure is not a P6 feature or result. Chapter 40 also has a registered primary strength and a separate fivefold post hoc sensitivity; both belong to that chapter's experiment, not to P6's results, protocol thresholds, or inference. The methods may be taught side by side only if each experiment identity remains explicit.
P6-L05: Prediction sequences versus models in the main table
Question. What are the six v1 prediction sequences and the four additions in v2? Why does the report say “8 main comparison models” while the frozen run has 10 prediction sequences? Which type of model is PCA + Ridge?
Complete answer. Version 1 produces zero, train_mean, OLS, Ridge, Lasso, and Elastic Net. Version 2 adds a single tree, random forest, gradient boosting (the fitted estimator is HistGradientBoostingRegressor, or HGB), and PCA + Ridge, for 10 prediction sequences in the frozen run. The historical main table and figures show eight fitted models: OLS, Ridge, Lasso, Elastic Net, single tree, RF, HGB, and PCA + Ridge. They omit zero and train_mean. Both omitted baselines make constant forecasts and hold a flat portfolio, with total return and turnover of 0. PCA + Ridge is a dimension-reduced linear pipeline that standardizes and applies PCA before Ridge; it is not a tree.
P6-L06: Sequence independence, temporal dependence, and price features
Question. What does independence mean for the q and noise sequences? Are they IID over time? How are the three price columns generated? Why can the complete 46-dimensional feature set not be described as independent, identically distributed, and homoskedastic?
Complete answer. Different constructed q sequences are independent of one another, as are different noise sequences; the construction specifies independent q and noise innovations. Each q or noise sequence is still a stationary AR(1) over time, with coefficient 0.98 and marginal variance 1. Adjacent values are therefore dependent, so the sequences are not IID over time. Returns also include a common market shock, a signal term from q, and idiosyncratic shocks. The price features rev_5, mom_60_5, and vol_20 are derived from this return/price path and therefore have a construction relationship to feature processes and past returns. The 46 columns combine 43 AR characteristic sequences and three derived price features; they are not draws from one independent, identically distributed, equal-variance population. This distinction matters when interpreting PCA, importance, and the word “noise.”
P6-L07: Multiple metrics for PCA + Ridge
Question. Using
Complete answer. It is not uniformly worse. In the base scenario, PCA + Ridge has
P6-L08: The claims_rule and the only larger tree-model t statistic
Question. Does the frozen configuration's claims_rule specify a joint threshold requiring “tree-model
Complete answer. No. The v2 configuration's claims_rule says not to make economic or alpha claims from constructed data and to retain zero and negative results. It does not specify that joint threshold, so do not attribute it to the frozen protocol. Among the six main tree-model comparisons (three tree types × two scenarios), the only absolute t statistic above 2 is the reversal-scenario single tree against Ridge:
P6-T01: Complete answer
A signal on label_available_at <= fit_time; the last does not. With no other missing values, keep
P6-T02: Complete answer and assertions
The first date becomes
These standard-library assertions check dates and joint structure directly, without training or calling the course implementation:
from collections import Counter
original = {"D1": [(1, 2), (2, 4), (3, 6)],
"D2": [(11, 22), (12, 24), (13, 26)]}
orders = {"D1": [2, 0, 1], "D2": [1, 0, 2]} # zero-based
permuted = {d: [rows[i] for i in orders[d]] for d, rows in original.items()}
for d in original:
assert Counter(permuted[d]) == Counter(original[d]) # same-date pairs only
for j in (0, 1):
assert Counter(v[j] for v in permuted[d]) == Counter(v[j] for v in original[d])
assert all(z == 2*q for q, z in permuted[d])
If a fixed predictor never reads a column, permuting it changes no prediction or loss, so importance is exactly zero. A model fitted on a finite sample may happen to use a truly zero-loading column; its estimated importance need not be zero, so examine repeats and windows. Group permutation preserves dependence within the group, but not necessarily its relationship with unpermuted columns, so support remains a limitation.
P6-T03: Complete proof and coefficients
Set
Numerically,
P6-T04: Complete ledger answer
The first trade buys five A shares and shorts five B shares. Total traded notional is 1,000, the fee is 1, cash is 999, net position value is zero, and NAV is 999. At the next closes, positions are worth 550 and −450, giving NAV of 1,099. Actual risky weights are approximately 0.500455 and −0.409463; net dollar exposure is
Fees depend on actual traded notional, cash updates at each event, and positions must first be marked at current prices to determine rebalancing requirements. Chapter 41's historical fixed-weight proxy charges costs on the return-ending row and approximates turnover from weight changes; it does not contain this complete event sequence. Its historical curve cannot replace the P6 event ledger. Financing, borrow fees, impact, and capacity are absent from this toy calculation; it verifies cash and NAV identities under the stated assumptions.