← All tasks
T28 · Systematic Allocation

Universal Portfolio Shrinkage

Bryan T. Kelly et al. (4 authors), 2023 · National Bureau of Economic Research

43%
pass@1 across 16 systems
11/16
systems with ≥1 successful attempt
5/5
5/5 attempts passed for the best system
80 attempts · 16 systems × 5
Claude Code + Opus 5
80%
Claude Code + Opus 4.8
80%
Claude Code + Opus 4.7
40%
Codex + GPT-5.6-sol
80%
Codex + GPT-5.5
40%
OpenCode + Kimi-K3
100%
OpenCode + Opus 4.7
80%
OpenCode + GPT-5.5
40%
OpenCode + Sonnet 4.6
80%
OpenCode + Qwen3.7-Max
0%
OpenCode + GLM-5.2
40%
OpenCode + DeepSeek V4-Pro
0%
OpenCode + GLM-5.1
0%
OpenCode + Qwen 3.6 Plus
20%
OpenCode + MiniMax-M3
0%
OpenCode + MiniMax M2.7
0%
all checkers pass Type-A clean, Type-B fail fail checking timeout no result / incomplete
Strategy

What the paper asks for.

Across 153 JKP factor portfolios, a rolling 120-month second-moment estimate and leave-one-out ridge-ensemble optimization can shrink the eigen-spectrum adaptively and deliver a superior out-of-sample long-short allocation.

Type
technical
Implementation
pandas
Rebalance
monthly
Long-short
yes
Declared task setup
Data
Bundled public task data
Operational scope
The paper-defined methodological core is retained; the fixed instruction instantiates only the data mappings, interfaces, and evaluation conventions needed for execution.
Six-stage quantitative strategy pipeline
  1. 01 Data loading
  2. 02 Feature engineering
  3. 03 Model fitting
  4. 04 Signal generation
  5. 05 Portfolio construction
  6. 06 Execution
Checker suite

24 properties · 80 attempts.

Each row is one requirement the strategy must satisfy. The bar reports the share of observed checker verdicts that pass; missing checker output is not converted into a property verdict.

TYPE A · DOMAIN-LEVEL (7)
  • A2
    no global normalize
    stage · feature eng
    63/70
  • A3
    no future data access
    stage · feature eng
    58/70
  • A4
    causal consistency
    stage · signal gen
    52/70
  • A6
    train test temporal order
    stage · model fit
    58/70
  • A8
    transaction timing
    stage · execution
    52/70
  • A9
    signal delay test
    stage · signal gen
    52/70
  • A10
    e2e metric consistency
    45/70
TYPE B · PAPER-SPECIFIC (17)
  • B1
    universe 153 jkp factor portfolios
    §§4.1 “Our empirical analysis uses monthly returns on 153 characteristic-managed portfolios ("factors") from Jensen et al. (2023).”
    provenance · paper-explicit
    stage · data loading
    59/70
  • B2
    full sample period nov 1971 dec 2022
    §§4.1 “cover the period from November 1971 to December 2022.”
    provenance · paper-explicit
    stage · data loading
    57/70
  • B3
    oos period starts nov 1981
    §§4.1 “the out-of-sample period is from November 1981 to December 2022.”
    provenance · paper-explicit
    stage · data loading
    57/70
  • B4
    rolling training window t equals 120 months
    §§4.1 “We estimate portfolio weights using a rolling window of T = 120 months, with weights retrained and rebalanced on a monthly basis.”
    provenance · paper-explicit
    stage · model fit
    57/70
  • B5
    monthly rebalancing frequency
    §§4.1 “weights retrained and rebalanced on a monthly basis”
    provenance · paper-explicit
    stage · portfolio
    58/70
  • B6
    ridge penalty grid z 10 to minus1 powers of 10
    §§4.1 “We fix the grid of ridge penalties available to UPSA as Z ≡ z ∈ [10^i : i ∈ {−10, −9, · · · , −1}].”
    provenance · paper-explicit
    stage · model fit
    59/70
  • B7
    ensemble size l equals 10
    §§4.1, Definition 2 “Given a grid Z = {z1, . . . , zL} of ridge penalties and a vector W = (wi)L i=1 of weights ... We fix the grid of ridge penalties ... i ∈ {−10, −9, · · · , −1}”
    provenance · paper-explicit
    stage · model fit
    59/70
  • B8
    sample second moment formula
    §§2 / §3 “regularize the sample second moment matrix by shrinking its empirical eigenvalues”
    provenance · paper-explicit
    stage · feature eng
    57/70
  • B9
    eigendecomposition of second moment
    §§3 “regularize the sample second moment matrix by shrinking its empirical eigenvalues, λ̄”
    provenance · paper-explicit
    stage · feature eng
    57/70
  • B10
    ridge portfolio formula
    §§2 “problem relies on the ridge portfolio estimator, ... which is defined for some ridge parameter z > 0”
    provenance · paper-explicit
    stage · signal gen
    58/70
  • B11
    loo cross validation for out of sample moments
    §§3 “we suggest estimating these out-of-sample moments using classical leave-one-out (LOO) cross-validation. The LOO method drops ... repeats this for each t = 1, ..., T.”
    provenance · paper-explicit
    stage · model fit
    54/70
  • B12
    ensemble weights from markowitz on ridge portfolios
    §§3 “Training UPSA reduces to finding the optimal weight vector W across basic ridge portfolios that maximizes quadratic utility, which is equivalent to solving a Markowitz portfolio optimization using LOO returns of basic ridge portfolios instead of [the raw factors]”
    provenance · paper-explicit
    stage · signal gen
    46/70
  • B13
    non negative ensemble weights constraint
    §Definition 2 / §3 “We call FC(Z) = {fZ,W : W ∈ R_+^L} the ridge ensemble. ... The constraint that the ensemble weights must be positive ensures that the second moment matrix remains positive definite.”
    provenance · paper-explicit
    stage · portfolio
    59/70
  • B14
    upsa shrinkage function and final weights
    §Definition 2 / §3 (eq. after Definition 2) “fZ,W(λ) := Σ_{i=1..L} wi fzi(λ) = Σ_{i=1..L} wi (zi + λ)^{-1}.”
    provenance · paper-explicit
    stage · signal gen
    54/70
  • B15
    variance normalization to trace of shrunk second moment
    §§4.1, footnote 17 “we normalize portfolio weights so that the implied in-sample variance after shrinkage equals the in-sample variance of the empirical eigenvalues, following the recommendation of Ledoit and Wolf (2020).”
    provenance · paper-explicit
    stage · portfolio
    52/70
  • B16
    long short unconstrained portfolio in factor space
    §§4.1 “The factors are constructed as capped value-weight long-short portfolios of US stocks ... UPSA achieves a Sharpe ratio of 1.92 [over this long-short set].”
    provenance · paper-explicit
    stage · portfolio
    56/70
  • B17
    data source jkp factors
    §§4.1, footnote 15 “The complete list of these 153 factors and their monthly returns are available at https://jkpfactors.com.”
    provenance · paper-explicit
    stage · data loading
    70/70
What this task reveals

The lowest-passing observed requirement is e2e metric consistency: 45 of 70 observed checker verdicts pass. The full property list above shows whether errors concentrate in domain-level validity or the paper-specific strategy logic.