diff --git "a/data/questions.jsonl" "b/data/questions.jsonl" --- "a/data/questions.jsonl" +++ "b/data/questions.jsonl" @@ -1,5 +1,5 @@ -{"display_order": 1, "task_id": "B01", "title": "What does a broker revision add to the price?", "category": "factor_data", "instruction": "# What does a broker revision add to the price?\n\nResearch area: Factor and data research.\n\nWhen a broker raises next year’s earnings estimate after a stock has rallied, the upgrade can mean two different things for our portfolio. The analyst may have learned something the market has yet to absorb, or the new forecast may simply put a number on news investors have already traded. At month-end we want to know whether that distinction is useful for ranking US stocks over the following month.\n\nThe forecast history gives us a way to ask that question. One broker may be changing its view while another is publishing its first estimate for that fiscal period. Even for the same broker, a lower number after a stock split need not mean a worse outlook. Treating every new estimate as a fresh opinion could give us a signal about who publishes and when, rather than about earnings.\n\nDevelop one monthly stock-ranking signal from the dated broker forecasts. You decide which changes carry information, how to compare them across brokers and fiscal periods, and what the preceding price history tells you about those changes. Compare your signal with the simple share of upgrades after controlling for industry, size and recent momentum. In your experiment record, show what happens when you remove or perturb the forecast information on the same stocks and dates. Use the period and coverage results to say where you would trust the ranking and where you would not.\n\n## Data and clocks\n\nThe public file `/app/data/history.npz` contains real US market observations from 2019-01-02 through 2023-12-29 and a forecast-event history beginning in 2019. Use the observations through 2021 for initial development and the scored origins from January 2022 through October 2023 for public validation. Public labels exist only when their exit observation has matured by 2023-12-29. Full feedback uses all 22 public validation origins; quick feedback uses the last eight. These public results can inform method selection and are therefore post-selection diagnostics. Final evaluation executes the frozen program on fresh chronological inputs. Hidden dates, securities, labels and scores are withheld.\n\nBusiness dates use America/New_York and the actual US session calendar. Decisions follow the last close of the calendar month. An annual estimate has a target period end, fiscal horizon, announcement, activation and review time. We assign the exact retained value to the first session strictly after the latest of those three dates. Activation cannot precede announcement by date; the latest date must lie within seven calendar days of announcement and no later than fiscal period end. Unmatched values, indeterminate same-time replacements, missing clocks and incompatible units do not enter the stream. The retained observations are a timely subset of the archive, not a complete history of broker coverage.\n\nThe forecaster identifier denotes a brokerage, not an individual analyst. Annual forecasts cover fiscal horizons one through three; two denotes the next fiscal year. Compare the exact fiscal period end, not an announcement-year approximation. The forecast is diluted USD earnings per share, in constant share units from the start of the price history. Multiply an unadjusted estimate by the cumulative new-to-old share ratio effective by publication. A split-day publication or a split between publication and review is excluded. Negative values are forecast losses. Rows on one availability day do not enter one another’s prior information; the latest original publication breaks ties for updating the following day’s state. The archived source admits rows with USD reporting currency and either blank or USD observation currency under the documented provider convention. The supplied coverage summary describes currency status. The organizer documents that convention and the explicit-currency sensitivity; contestants use the released causal event fields.\n\nThe universe at the decision close consists of observed historical S&P 500 constituents with a dated class identity, at least 365 calendar days since listing, a positive closing price and volume, positive finite class capitalization, known dated industry and finite 63-session price return. A stock must also have at least two retained next-fiscal-year forecast rows available in the preceding three calendar months. We use actual membership intervals, not the present index. Future label availability never determines signal eligibility.\n\nAdjusted prices are raw session prices on a common historical share basis: raw price times the cumulative effective split ratio. Returns and holding payoffs exclude cash dividends. A missing closing mark carries forward; daily returns require both consecutive closing observations. Raw prices are USD/share, volume is estimated contemporaneous shares, and amount and class capitalization are USD. Capitalization uses the most recent strictly prior observed class share count rolled across effective splits, times the current marked close. Industry is the strictly prior observed two-digit SIC. The dictionary in `/app/tools/data_contract.md` specifies every array.\n\nFor decision T and the next scheduled month-end U, the label is `adjusted_open(U+1)/adjusted_open(T+1)-1`, where +1 means the next market session. An unavailable exit open uses the last marked adjusted close at U. An unavailable or nonpositive entry gives an undefined label but still requires a score. An index deletion is not a worthless delisting. The series has no independently dated liquidation-proceeds feed; stale exit marks need not capture a corporate-action settlement. These are gross forecast-attribution payoffs, not executable portfolio returns. Any submitted trading experiment must separately state costs, capacity and executable fills after the decision.\n\n## Inference and deliverables\n\nUse `/app/work` for research and `/app/submission` for the final bundle. Submit `factors.json` with exactly one nominated entry, such as `{\"factors\":[{\"id\":\"revisions\",\"path\":\"factors/revisions\",\"direction\":1,\"hypothesis\":\"your economic hypothesis\"}],\"scored_factors\":[\"revisions\"]}`. The nominated directory contains self-contained `main.py`, `provenance.json`, and any local source modules or plain-text parameters. At the root provide UTF-8 `experiment_summary.json`, at most 2 MiB, containing the hypothesis, method description, validation measurements with their periods, relevant comparisons and sensitivity, and conclusions. It may reference included CSV validation tables. Code and parameter evidence must support its substantive claims. The bundle is at most 256 MiB; only ordinary unlinked `.py`, `.json`, `.md`, `.csv` and `.txt` files are supported. Helper modules must live inside the nominated program directory. No hidden dependencies or stored fitted models are transported.\n\nThe command is `python main.py --input /input/snapshot.npz --output /output/prediction.npz`, launched from the nominated program directory. Each origin starts a new isolated process and fresh temporary/output directories. There is no retained process state or data from a previous origin. Inference must be deterministic for an identical snapshot; use fixed seeds for stochastic estimation. Load NPZ files with `allow_pickle=False`. Each input contains scalar `asof`, Unicode `codes`, Boolean `eligible`, a chronological market window of at most 253 sessions, contemporaneous industry and momentum, and up to 730 calendar days of available forecast events. Event stock indices refer to that snapshot's codes. Brokerage integers are categorical within the snapshot and may be remapped on another call. They are not magnitudes or stable cross-call identities. No labels are in inference snapshots.\n\nWrite an NPZ with exactly `codes` and `values`, each one dimensional. `codes` must equal the input `codes[eligible]` in its supplied order; emit every eligible stock once, including stocks lacking a label. `values` must be finite real scores with absolute value at most 1e6 and larger values predicting higher returns. Boolean, complex, NaN, infinite, missing, extra, reordered or duplicate rows are invalid. Output must be one regular unlinked file no larger than 8 MiB, including the total expanded NPZ members. No stdout protocol is required; stderr is for concise diagnostics.\n\nUse provenance `{\"mode\":\"fixed_rules\",\"description\":\"explain inputs, estimation and parameter choices\"}`. Final inference computes from the supplied causal snapshot and frozen research-selected configuration. Estimation within a snapshot is allowed; any internally constructed outcome must have matured by `asof`. Carried fitted coefficients or learned model weights, including ones encoded in text or code, are not supported; perform numerical model estimation inside the snapshot process. Public experiments may select the frozen algorithm configuration and hyperparameters. Features, standardization, imputation and selection obey the same availability boundary. Stored models fitted to future decision information, security/date lookup tables of historical answers and access to hidden targets are prohibited. Describe public-data selection of constants. A future-row probe may append records dated after `asof`; ignore those rows in every operation. The ordinary replay supplies only the causal prefix.\n\nFor quick research, you may place UTF-8 `factor.csv` inside the nominated directory with exactly `time,symbol,value` columns, unique decision-date/security rows and finite numbers. It must cover every eligible security at each requested public origin. Within each date, rows follow the supplied eligible-code order. Public table feedback measures those values and does not certify causal computation. The final deliverable contains executable inference code; public-table adapters and lookup-based final answers are invalid in hidden replay. This task uses table-then-replay with fixed rules and snapshot-local estimation, not stored fitted-model replay.\n\n## Objective and public feedback\n\nThe declared simple comparison is the fraction of retained next-fiscal-year forecasts available in the preceding three calendar months that increase the same brokerage's immediately preceding available forecast for the same stock and fiscal year. A predecessor must be on a strictly earlier availability day and no more than 365 calendar days old. If multiple predecessor rows share that availability day, use the latest original publication date. All retained next-year rows in the window enter the denominator, including first observations and unchanged or missing-predecessor forecasts; only a strict increase enters the numerator. No broker, skill or innovation filter is used. This is the sole admission comparison. Other controls are research diagnostics.\n\nAt each origin use the complete eligible universe. Winsorize submitted scores at the 1st and 99th percentiles using NumPy's linear quantile interpolation. Center the winsorized scores and divide by their maximum absolute centered value (use zeros for a constant vector). Regress these dimensionless values by unweighted least squares on an intercept, separately winsorized and population-standardized log share-class capitalization and 63-session cumulative return, and historical-industry dummies with one omitted category. Treat residual standard deviation at or below 1e-10 as constant. Round the dimensionless residuals to 12 decimal places before assigning average ranks to ties. All prediction values are required even for stocks subsequently excluded for undefined labels.\n\nLet `r_i` be a residual score's average rank among the N eligible stocks. Its group is `min(9, floor(10*(r_i-1)/N))`; ties therefore stay together. Compute group means from stocks with finite labels. The origin IC `c_t` is Pearson correlation of residual-score ranks with average ranks of the finite holding returns. The origin spread `d_t` is group 9's mean return minus group 0's mean return, or zero if either is empty. The origin group monotonicity `g_t` is Spearman correlation between the indices of nonempty groups and their mean returns, or zero with fewer than three nonempty groups. A constant signal or fewer than 30 labeled stocks gives all three origin metrics zero. Correlations with zero denominator are zero.\n\nThe four core metrics are mean `c_t` (neutralized RankIC), `sqrt(12)*mean(c_t)/sample_std(c_t)` with ddof=1 (RankICIR), mean `d_t` (monthly gross decile spread), and mean `g_t` (group monotonicity). RankICIR is zero for fewer than two origins or standard deviation at most 1e-12. All metrics are larger-is-better. Returns and correlations use fractional units. Every origin has equal weight. RankICIR is a diagnostic and has zero objective weight. The remaining three metrics enter as differences from the frozen strict-upward-revision comparator on exactly the same dates, eligible symbols and observed labels.\n\nAn improvement of 0.05 in mean neutralized rank IC is worth 0.65 raw improvement units. A 0.02 monthly gross spread improvement is worth 0.25; a 0.50 group-monotonicity improvement is worth 0.10.\n\nThe metrics measure ranking quality, temporal stability, tail payoff magnitude and whether the payoff extends across the ranking. Public feedback returns all four raw metrics, origin and annual breakdowns, group returns, coverage and label completeness, IC dispersion and positive fraction, a three-origin circular-block bootstrap 90% interval using 500 draws, gross-spread downside and positive fraction, top-group membership turnover, ordinary RankIC, remaining control exposure and runtime. These additional diagnostics are not extra weighted metrics. Publish the four raw measurements, signed paired contributions and research evidence. Public guidance and private scoring use the same declared units. The final objective uses the prespecified reward mapping below.\n\nRequest `evaluate` with the nominated `factor_id` and `mode` equal to `quick` or `full`. There are at most 60 quick and 30 full calls. The service freezes the bundle and returns feedback before continued research. Infrastructure failures do not consume a scientific call allowance. Use full feedback for the final nominated signal. `/app/tools/make_snapshot.py --asof YYYY-MM-DD --output PATH` constructs an identical public snapshot. `/app/tools/core.py` contains the public numerical definitions for independent local diagnostics; `/app/tools/example.py` demonstrates the output schema with a constant signal.\n\n## Resources\n\nLinux, Python 3.12, NumPy, pandas, SciPy, PyArrow and scikit-learn are installed. Research has 2 CPU cores, 3 GiB memory and four hours. Each replay process has a 120-second limit, at most 96 processes/threads, and shares a 2-core, 3-GiB evaluation container. A complete evaluation has a 7,200-second execution limit, including startup, replay and cleanup. `/app/data` and `/app/tools` are read-only. Internet access is prohibited, including direct connections, proxies, external APIs and package repositories. Use only the supplied data and installed dependencies.\n\nTask-specific scientific review checks whether forecast information actually contributes to the implemented mechanism; whether stock, brokerage and fiscal-year comparisons retain their stated meaning; whether evidence distinguishes new information from public price history under the common protocol; and whether sensitivity and temporal evidence support the scope claimed. A relevant alternative representation is valid. Using price context nonlinearly is permitted; the evaluator's fixed regression controls do not restrict all candidate features. An implementation that ignores forecasts entirely is a fundamental task-alignment defect. A noisy but honest result or an equivalent numerical implementation is not a defect. Documentation length, algorithmic complexity and abandoned experiments do not earn points or deductions.\n\n\n\n## Objective score\n\nNumber of comparable strict upward revisions divided by all retained next-fiscal-year forecast events in the previous three calendar months, using a strictly earlier forecast by the same broker on the same fiscal period and share basis. Replay the comparator on the same eligible issuer-months.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.65 × Δneutralized_rank_ic / 0.05 +0.25 × Δdecile_spread / 0.02 +0.10 × Δgroup_monotonicity / 0.5.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Trace the events used by the program to the released stock, broker, fiscal period and first usable timestamp. Identify the common share and currency basis from the published field contract; verify event timestamps against the supplied records.\n2. Ablate broker revisions on the same issuer-months while retaining price and consensus controls.\n3. Report residual IC and coverage by period and retain a null result if the evidence warrants it.\n"} -{"display_order": 2, "task_id": "B04", "title": "Crowding and the term structure of US factor returns and risk", "category": "factor_data", "instruction": "# Crowding and the term structure of US factor returns and risk\n\nResearch area: Factor and data research.\n\nAt month end, a risk manager must decide whether to raise the volatility forecast for a US equity exposure now or reserve that adjustment for later. A factor can rally while its stocks become more dependent on the same buyers. The rally may persist while those buyers are adding risk; if they sell together, much of the risk may arrive after the rally. A factor whose volatility is already high poses a different question: how much of the move has already happened?\n\nDevelop one forecasting program for the market, ten styles and thirty industries. At each month end, forecast the compounded return and annualized daily volatility of each exposure in four successive six-month blocks. Determine whether the state of the stocks behind an exposure changes that outlook beyond what is evident in its own return history and broad market conditions. Define the stock evidence you find economically relevant. A signal that helps size a risk forecast need not tell us when risk will rise, or what return to expect.\n\nShow where your conclusions hold up when the calendar period or market risk state changes. If you attribute an improvement to stock-level information, compare your final procedure with one that removes that information while keeping the decision dates, available labels and fitting rules the same. We want to know which forecast you would change on that evidence, including when you would leave the unconditional forecast alone.\n\n## Forecasting contract\n\nSubmit exactly one integrated forecasting program. It must forecast both compounded factor return and annualized daily factor volatility in four successive six-month blocks: months 1–6, 7–12, 13–18 and 19–24 following each decision. These are eight outputs of the same research program. Explain the mechanisms you investigated, alternatives you rejected, component ablations, sensitivity to material modeling choices and uncertainty from overlapping response windows. Use the complete public evaluation set to assess your final method. Separate observations used to select a hypothesis from independent evidence supporting it, and document the actual chronology of selection and fitting. Repeated feedback on the same dates does not provide a fresh validation sample. Investigate how much each response's apparent timing skill depends on a few calendar regimes or on broad slow-moving paths. For any claim of incremental stock-state information, compare the final procedure with a matched information-removal experiment that removes the claimed stock-state channel while preserving the remaining inputs, decision dates, response construction, training-label maturity, fitting and model-selection rules. Refit both procedures causally when fitting is part of the method. Report all three metrics on the same dates and distinguish changes in return timing, risk timing and risk magnitude. This is evidence for the claim, not an additional scored baseline or a prescribed forecasting method. If the evidence is mixed or negative, retain that result and limit the conclusion; a truthful null result is valid. For any claim that a normalization preserves the scored order, check temporal ranks within each factor: a positive divisor that changes over dates can change those ranks. Documentation must connect the delivered forecasts to the research conclusion; the three declared metrics determine the objective score and the sourced research evidence receives a separate grade. Different risk levels at different horizons need not imply different timing: monotone transformations of one state can preserve the same ordering of decision dates. If you claim to locate the buildup or decay of risk across horizons, check both the horizon profile and the temporal ordering actually produced by the final code. Examine whether an apparent timing relation is already explained by risk observable at the decision. The supplied current-risk and horizon diagnostics support this investigation; their limitations do not require a particular conditioning model or a new comparison program. Report useful level forecasts and the measured incremental contribution of crowding, including a null finding.\n\nFor return ranks, use zero expected compounded return. For risk ranks, use annualized sample standard deviation of the trailing 63 sessions through the origin (ddof=1, sqrt(252), minimum 42 finite returns; use the frozen pre-2017 per-factor volatility when history is short). For QLIKE, use the original fixed pre-2017 per-factor volatility profile to evaluate improvements in the level of risk. Broadcast each benchmark to all four horizons, on the same eligible coordinates. Publish the native measurements of both complete controls and preserve the 126-session diagnostic. The metric-specific benchmarks are fixed before blind submissions.\n\nPublic observations are in `/app/data/history.npz`. Monthly stock panels, including trailing daily total and specific returns, span June 2014 through December 2021; daily realized factor returns start on 2014-01-02 and end on 2021-12-31. Use observations and matured responses through 2016-12-30 for initial offline fitting. Full public feedback evaluates the 36 month-end decisions in 2017–2019; quick feedback evaluates their latest 18 decisions. Responses may mature through the end of the public data. At each replay decision, the program receives only the historical prefix available at that close. It may train or update models using that prefix, provided every training response has fully matured. Final evaluation runs the frozen program on fresh chronological inputs with the same field definitions.\n\nThe stock panel contains up to 800 securities selected independently at each month-end by descending class capitalization within the historical US large-cap risk-model universe. Unused slots have empty codes. Eligibility requires effective membership, positive observed price and capitalization, all ten finite style exposures and at least 50 observed specific returns in the last 63 market sessions. Ties use the stable security identifier. New listings enter only after the necessary descriptor and residual histories become available; historical exits and changes in membership remain in the data. No present-day constituent list is backfilled. The broad risk model's realized factor returns use its own complete-case estimation universe; the stock panel is a liquid-universe view for researching crowding. This difference in scope is part of the research setting.\n\nA decision occurs after the final observed market close of a calendar month. All dates use the US equity market calendar and America/New_York time. Month-end stock exposures and market descriptors use observations through that close. Financial fields use reports strictly after their announcement dates; analyst-derived fields use publications strictly earlier than the decision date and expire after 180 calendar days. A realized factor or specific return dated t is estimated using the most recent month-end exposures available at t−1 and is known after close t. The supplied segment starts after the risk model has accumulated its lookbacks. The field dictionary in `/app/tools/data_contract.md` gives array axes, units, missingness and examples.\n\nFor a decision at the end of month m and block h=0,1,2,3, use daily factor returns strictly after the last session of month m+6h through the final session of month m+6(h+1), inclusive. The return response is product(1+r)−1 and the volatility response is sqrt(252) times sample standard deviation of daily r, with ddof=1. A response requires at least 90 daily observations and all daily values finite for that factor. A block becomes available for training only after its final close. Returns are dimensionless regression-factor returns from the documented project model, not the return on an executable long-short portfolio. The scored program produces forecasts only: it does not create positions or orders, simulate execution or fills, or report strategy net P&L. The evaluator scores forecast accuracy against the realized factor-return and volatility labels and applies no transaction costs; do not interpret a factor return as an earned portfolio return. If your report adds an optional portfolio simulation or makes an executable-trading claim, state the signal and order timestamps and earliest eligible execution (a signal computed after a close cannot fill at that already-observed close); the order type and exact fill, partial-fill, rejection, trading halt, price-band and execution-price rules; each commission, tax, exchange or transfer fee, slippage and market-impact formula with numerical parameters; and apply the same execution and cost protocol to every benchmark and comparison. Report gross and net results separately. Such optional portfolio results do not change the forecast score.\n\nThree quantitative metrics determine the raw composite, with predeclared matched-improvement units of 0.10 for each rank metric and log(2)−0.5 for ratio-form variance QLIKE. `return_rank_correlation` and `volatility_rank_correlation` each have weight 0.35 and higher values are preferred. For each factor, horizon and response, keep dates with finite observed responses, rank forecasts and responses using average ranks for ties, and compute the Pearson correlation of those ranks. A constant vector or fewer than 12 observed responses yields zero. Average these correlations equally across factors within each of the three classes (market, style, industry), then equally across the classes and four horizons. Each rank metric lies in [−1,1]. This measures temporal forecasting within each factor; differences in average return or risk between factors do not create timing skill. There is no extra rank neutralization.\n\n`volatility_qlike` has weight 0.30, is dimensionless, lies in [0,infinity), and lower values are preferred. For each observed volatility v and forecast v_hat, both in annual fractional units, set q = max(v,10^−6)^2 / max(v_hat,10^−6)^2 and loss = q − log(q) − 1 (natural logarithm). For each factor and horizon, average loss over its observed decision dates. Then average equally across factors within each class and equally across the three classes and four horizons. Omit factor/horizon coordinates without observed responses and entirely empty class/horizon cells. A wholly unobserved diagnostic sample uses zero as the placeholder and available=false as its coverage flag. The fixed 10^−6 volatility floor only defines the loss at zero. This loss tests risk magnitude: its population target above the floor is conditional mean variance, whose square root is the corresponding volatility forecast. It penalizes severe risk underprediction more strongly than comparable multiplicative overprediction. For an official split require defined matched results for all four horizons in all three classes; a required empty cell is a data failure. Reserve available=false for optional diagnostics.\n\nCompute 35% return rank, 35% volatility rank and 30% variance loss on matched origins, in the declared units. The two rank terms give equal emphasis to return and risk timing; the variance loss adds a separate risk-magnitude requirement. No forecast scale is fitted by the evaluator. Return magnitudes are not calibrated by these metrics, and Q does not measure executable portfolio profit. Raw program composites are averaged equally before one final reward mapping. Public feedback returns all three raw metrics, factor-by-horizon correlations and losses, observation counts, predictions, realized responses and their missingness mask, yearly diagnostics and replay times. Risk diagnostics include mean log(max(v_hat,10^−6)/max(v,10^−6)) by class and horizon; positive values indicate overprediction and negative values underprediction. These bias summaries are unscored. Yearly metrics follow the same formulas; yearly correlations are zero with fewer than 12 observations, while variance loss can still be measured. Public feedback does not return a normalized reward.\n\nPublic feedback also returns `temporal_robustness`, an unscored dependence diagnostic for the two rank metrics. For each block length L of 6 and 12 months, use NumPy default_rng with seed 2718+L to draw 200 paired circular moving-block samples of the N evaluated decisions. Each sample draws ceil(N/L) starting indices uniformly with replacement from 0 through N−1, joins their consecutive L indices modulo N, and truncates to N rows. Predictions and responses share these indices across every factor, horizon and response; rerank and aggregate each sample by the same metric rule. Feedback includes all metric samples, their means, 2.5th and 97.5th percentiles with linear interpolation, and fractions above zero. It also reports both metrics after circularly shifting predictions by each integer s from 6 through N−6 while keeping response dates fixed: shifted prediction at row t equals the original at (t−s) modulo N. Fewer than 12 decisions makes these diagnostics unavailable. The helper `/app/tools/robustness.py` accepts paired arrays of shape (N,41,4,2), ordered as return then volatility, with NaN for unobserved responses.\n\nThese summaries describe frozen forecasts; they neither refit the program nor correct for adaptive model selection. Bootstrap draws contain repeated observations, not new independent evidence. Circular blocks assume local stationarity, create wraparound seams and may miss longer regime dependence; adjacent decisions and horizons share outcomes. The displayed percentile intervals are descriptive uncertainty summaries, not guaranteed coverage. Circular shifts are alignment stress tests, not exchangeable null draws or valid p-values. Similar shifted and unshifted measurements may indicate slow-moving paths. Use the matched comparison to assess the crowding mechanism. Neither diagnostic changes the score, the forecast requirements or the primary comparison.\n\nFeedback also returns unscored `regime_sensitivity` summaries of the frozen forecasts. For every calendar year represented in the evaluated decision dates, remove that year and recompute all three metrics with their existing response masks and aggregation rules; do not refit or modify labels. A second partition uses the market factor (column zero): at every historical month end, compute sqrt(252) times the sample standard deviation (ddof=1) of the most recent 126 daily market returns through that close, requiring all 126 to be finite. Compare this risk with the median of finite risks at strictly earlier supplied month ends, requiring at least 12 such earlier months. Label the decision high if its current risk strictly exceeds the prior median and low otherwise; absent history is unavailable. Recompute all three metrics separately for low, high and unavailable decisions, keeping the same factor/class/horizon rules. Feedback includes decision states, prior counts, per-coordinate response counts, class/horizon correlations and risk losses. An empty partition returns available=false with the metrics omitted. For coordinates with fewer than 12 responses, record rank correlation as zero by convention. The helper `/app/tools/regime_diagnostics.py` implements these definitions. Calendar deletion and the risk partition are sensitivity summaries, not new independent samples, significance tests or proof of a crowding channel. They retain overlapping labels and do not correct model selection. Use them to qualify claims of stability, along with any stronger independent checks your claim requires.\n\nThe unscored `risk_transition` feedback separates current-risk dependence from the forecast horizon profile. At each decision and for each factor, current risk is sqrt(252) times the sample standard deviation (ddof=1) of exactly the last 126 daily factor returns through that close; fewer observations or any nonfinite return makes that state unavailable. For each factor and horizon, use dates with both a finite realized volatility and an available current-risk state, requiring at least 12 dates. Separately rank forecast volatility, realized volatility and current risk with average ranks for ties; center each rank vector and divide by its Euclidean norm (a norm at or below 10^−12 yields the zero vector). Call these vectors a, b and c. Feedback reports a·b, a·c and b·c. Its partial rank diagnostic is the normalized dot product of a−(a·c)c and b−(b·c)c; if either residual norm is at or below 10^−12, it is zero. Numerical correlations are clipped to [−1,1]. Short or missing cells are unavailable, not zero observations. Partial ranks remove only a linear relation in rank space with this one current-risk state. Interpret these unweighted diagnostics as conditional associations. Nonlinear dependence, other market effects and selection bias can still contribute.\n\nThe same feedback reports forecast rank concordance for each of the six horizon pairs: the dot product of their centered unit rank vectors over all evaluated decisions, requiring at least 12 dates and using the same constant-vector rule. A value of one means identical date ordering, regardless of differences in risk levels. Horizon shape is summarized by the mean absolute error in adjacent log volatility ratios. For adjacent blocks h and h+1, each observed pair contributes abs([log(max(v_hat[h+1],10^−6))−log(max(v_hat[h],10^−6))]−[log(max(v[h+1],10^−6))−log(max(v[h],10^−6))]). Average over dates with both realized blocks observed, then equally over observed factors within each class, then equally over nonempty class/pair cells; associations use the corresponding class/horizon rule. Feedback retains per-factor results, counts and class breakdowns. An entirely unavailable summary has mean=null. Shape error is unchanged by a common per-date multiplier on all four risk forecasts, so it cannot replace the scored variance loss. Use matched comparisons to interpret high partial association or low shape error in terms of crowding. Compute these diagnostics on frozen forecasts with overlapping labels; retain the original benchmark and fitting window. `/app/tools/risk_transition.py` exposes `risk_transition(pred, target, names, decisions, factor_dates, factor_returns)` for arrays shaped (N,41,4,2), ordered as return then volatility, with NaN for unobserved responses.\n\nWork in `/app/work` and install the final bundle in `/app/submission`. Its UTF-8 `factors.json` contains `factors`, a list of objects with `id`, `path`, `direction` and `hypothesis`, and `scored_factors`, a list containing exactly one nominated ID. IDs match `[A-Za-z][A-Za-z0-9_-]{0,31}`; `path` is exactly `factors/`, `direction` is numeric 1, and the hypothesis is nonempty. Each registered program is self-contained under its own directory with `main.py`, `report.md`, `provenance.json` and any local dependencies. Include a root `report.md` discussing the research as a whole. A minimal registration is `{\"factors\":[{\"id\":\"research\",\"path\":\"factors/research\",\"direction\":1,\"hypothesis\":\"Explain the proposed mechanism.\"}],\"scored_factors\":[\"research\"]}`. You may register experimental alternatives for public feedback, but nominate one final program.\n\nThe replay command is `python main.py --input /input/snapshot.npz --output /output/prediction.npz`, run with the selected program as the working directory. Read NPZ files with `allow_pickle=False`. The snapshot includes scalar Unicode `asof`, historical `months`, monthly stock arrays, `factor_dates`, daily `factor_returns` and the schema-name arrays. Every time-indexed observation is at or before asof. Each call starts a fresh process, input directory and writable temporary directory; no writable state carries across calls. Fixed local models travel with the program. Return one regular NPZ file with exactly `factor_names`, `return_forecast` and `volatility_forecast`. `factor_names` must equal the input Unicode names in the same order. Each forecast must be a finite real numeric array with shape (41,4); columns follow the four blocks above. Volatility must be nonnegative. Every factor must be present. Boolean, object, complex, NaN, infinite, duplicate, reordered or missing outputs are invalid. No additional output keys are permitted. The output file and the sum of its expanded NPZ members must each be at most 8 MiB. Use stderr for optional logs; stdout is ignored.\n\nSet provenance mode to `fixed_rules`, `online_causal` or `fitted`, and supply a description. An online method must construct fitted statistics and transformations from the chronological prefix and fully matured responses; expanding and rolling transformations must be causal. A fitted program includes `fit.py`, `latest_fit_observation` and `latest_label_exit` as ISO dates. The stored model used for public replay must use observations and matured fitting labels through 2016-12-30. You may refit the same procedure through 2021-12-31 for later decisions by retaining a self-contained `public_validation/` version with development-period model, code, report and provenance. Public replay uses that copy and final replay uses the nominated root version. Document both fits; the inference and fitting procedure must be the same.\n\nThe public 2017–2019 responses and repeated feedback are a research selection sample: you may use them to choose hypotheses, representations and hyperparameters. Disclose those choices, their selection dates, the observations consulted and whether validation results influenced the final choice. Such selected public results are retrospective diagnostics, not an independent out-of-sample performance claim. This permission does not authorize features, stored fitting samples, preprocessing statistics or online training labels from beyond a public replay's decision time, nor a table of date-specific target-derived predictions. Reserve independent temporal or regime checks when making generalization claims. Freeze the final procedure and all selection decisions before final evaluation; all selection information for later evaluation must be available by its prediction decisions. Final inference sees only each supplied prefix, and every training response used at that decision must already be mature.\n\nFor local work, `/app/tools/make_snapshot.py --asof 2018-12-28 --output /app/work/snapshot.npz` creates a public snapshot. `/app/tools/labels.py` and `/app/tools/metrics.py` provide the public response and metric calculations for independent experiments. The public `evaluate` tool accepts `factor_id` and `mode` (`quick` or `full`) and freezes the submitted bundle before replay. The session budget is 60 quick and 30 full feedback requests. Expected candidate errors and timeouts produce structured failure feedback. A failed nominated program receives the declared zero-improvement fallback; a malformed or empty bundle is invalid. Infrastructure faults are reported separately.\n\nThe environment is Linux with Python 3.12, NumPy, pandas, SciPy, PyArrow and scikit-learn, 2 CPU cores, 3 GiB memory and a four-hour research budget. Each replay call has 2 CPU cores, 3 GiB memory, at most 96 processes or threads and a 120-second timeout; the complete evaluation has a 7200-second limit. The submission is limited to 256 MiB, each report to 2 MiB, and all files must be regular files without symbolic or hard links or special devices. `/app/data` and `/app/tools` are read-only. Internet access is prohibited, including direct connections, proxies, external APIs and package repositories. Use the supplied local dependencies and data.\n\n\n## Interpreting crowding and horizon evidence\n\nA zero forecast, fixed risk profile, or persistence forecast is an admissible research answer. Report the limits of its claims. Apply the same fitting and selection rules, information clock, eligible cells and label maturity to the full and stock-channel-removed models; compare each of the four forecast horizons. Trace any carried fitted artifact to its declared public selection period and the actual prediction date. Separate model selection on permitted public observations from label availability for each prediction.\n\nCompare the risk rankings themselves when testing for differences across forecast horizons. The partial-rank diagnostic controls rank-linear association with one current-risk measure. A crowding mechanism requires a matched comparison appropriate to that claim; show weak or negative effects when the frozen program produces them. Do not deduct the quantitative forecasting loss a second time in evidence review.\n\nUse predeclared metric-specific feasible controls on identical eligible coordinates. Return temporal rank compares against zero compounded return. Volatility temporal rank compares against annualized sample standard deviation on the causal trailing 63-session prefix (minimum 42 finite, ddof=1; use frozen pre-2017 factor volatility when insufficient). QLIKE compares against the fixed pre-2017 per-factor volatility profile, broadcast to the same horizons. No blind-period choice of control is allowed. A required empty coordinate group is a host data failure. Keep native continuous QLIKE, report the sensitivity to its volatility floor, both full benchmark predictions and the matched stock-channel ablation. A matched rank improvement of 0.10 is one rank unit. For ratio-form variance QLIKE, one unit is log(2)−0.5, the loss for forecasting twice the true variance. Distinguish doubling the variance from doubling the volatility.\n\n## Market and data conventions\n\nUse the causal 63-session volatility comparator for risk ranks and the fixed development per-factor volatility comparator for QLIKE. Use zero returns for return ranks. Attribute any crowding claim with a matched refit on the same inputs and dates.\n\nDisclose native temporal rank scores and QLIKE, their matched differences and all contributions. A wholly unobserved required official cell is an infrastructure failure. Preserve untruncated QLIKE and the common volatility floor.\n\nPublish eligible and all-three-estimate coverage by month. Identify the risk-model estimation and crowding-panel universes separately. The organizer must document the vintage-specific provider default for unlabelled estimate currency with USD reporting currency, or restrict the affected signal to explicit observation currency and recheck the frozen coverage. Report explicit-currency sensitivity.\n\nGrade the documented timing, matched stock-channel ablation and horizon attribution independently of the objective score. Accept truthful null findings with a traceable final artifact.\n\nReport maturity, observed coordinate counts, calendar deletion, predeclared current-risk regimes and horizon-rank concordance. Treat block intervals as descriptive when independent blocks are sparse.\n\n## Objective score\n\nReturn ranks: zero forecast. Risk ranks: trailing 63-session annualized sample volatility at the origin (ddof=1, minimum 42 finite returns; frozen pre-2017 per-factor fallback). QLIKE: frozen pre-2017 per-factor volatility. Same dates, eligibility, four horizons and weights.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.35 × Δreturn_rank_correlation / 0.1 +0.35 × Δvolatility_rank_correlation / 0.1 −0.30 × Δvolatility_qlike / 0.193147.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Using the supplied factor panel, reconstruct an origin and its four future blocks, their timestamps and observed coordinates. The organizer verifies upstream filings, historical estimate currencies and the broader estimation universe.\n2. Compare static, simple updating and crowding-ablated forecasts separately across the four horizons.\n3. Account for overlapping origins in dependence estimates and exclude immature validation labels.\n"} -{"display_order": 3, "task_id": "B05", "title": "Does a fast exposure belong in the US equity risk model?", "category": "risk_modeling", "instruction": "# Does a fast exposure belong in the US equity risk model?\n\nResearch area: Risk modeling and management.\n\nOur US equity book can pick up a common exposure between industry or balance-sheet updates. If stocks with similar recent trading histories start moving together, our risk reports may attribute too much of that move to individual names. Reacting to every price swing carries a cost as well. A characteristic that changes substantially within a week can force the desk to revise its risk estimates before it has evidence that the exposure travels across stocks.\n\nWe have room for one additional characteristic alongside the market, dated industry and ten style exposures. Develop a program that assigns a real-valued exposure to each eligible stock at the close. The central test is whether factor returns estimated on one group of stocks explain subsequent daily moves in other stocks carrying the same exposure. Factor returns can have either sign. We want to know what the characteristic adds over the next few sessions, how it fares in its weaker months and how much it changes in five sessions.\n\nYour hypothesis determines which histories and current characteristics belong together. Choose how to represent them and how to estimate the exposure. Compare your method with the sample standard deviation of the last 20 daily returns and investigate the assumptions that matter to your result. Support your recommendation with the full public experiment, including material sensitivities and periods when the evidence is mixed.\n\n## Decision clock and research sample\n\nThe decision is made after the close of the last US market session of each month. A second snapshot, taken five observed sessions earlier, measures how much the exposure has changed. Select the historical basket separately at each close from effective S&P 500 membership, then require a positive USD capitalization, a dated industry, ten finite style exposures and 252 consecutive observed daily returns. Order stocks by descending capitalization, breaking ties by security code. The number of eligible stocks varies. Security codes distinguish share classes and persist across verified ticker changes. Future membership and future mark availability have no role in this selection.\n\nAt each decision the program receives the 252 session dates and corresponding stock returns, their equal-weight daily market return for that snapshot's basket, and the current industry, cap and style values. Date strings follow the America/New_York market calendar. A return of 0.01 means one percent. Daily returns include splits and cash distributions. Annual financial reports and dated class observations enter from the next market session. The style columns in order are Size, NonlinearSize, Beta, Momentum, ResidualVolatility, Liquidity, BookToPrice, EarningsYield, Growth and Leverage.\n\nPublic research origins run from January 2016 through November 2022. Use origins before 2019 for initial research. Full public evaluation uses January 2019 through November 2022 and quick evaluation uses the final twelve of those origins. A response window contains the next 20 market sessions and matures after the twentieth close. A missing future return is marked as zero for the attribution ledger and carries a missing-mark flag. This convention measures variation among observed marks. It gives no estimate of the economic loss on exit.\n\nFreeze global choices after public research. The program may fit on the current snapshot using observations available by its decision close. Each invocation starts a fresh process. The provenance mode is `fixed_rules`. Packaged learned weights, stored responses and date or security lookup predictions are inadmissible. Replay repeats predictions on inputs with extra rows dated after the decision. Absolute differences above 1e-8 invalidate the program. The verifier supplies only inference fields to the process, including in hidden replay. It opens the future response window in the separate attribution calculation after obtaining the exposures.\n\n## Program contract\n\nWork in `/app/work`. The field dictionary and public reader are in `/app/tools/data_contract.md` and `/app/tools/panel.py`. Submit `/app/submission/main.py`, `provenance.json`, `experiment_summary.json` and any local code the program imports. The entry point is `python main.py --input /input/snapshot.npz --output /output/prediction.npz` with working directory `/app/submission`. Load arrays with `allow_pickle=False`. The input keys are `asof`, `dates`, `returns`, `market_return`, `codes`, `cap`, `industry` and `styles`. Rows of returns index dates and columns index codes. The current stock-level arrays follow the order in `codes`. The output NPZ contains exactly `codes` in the supplied Unicode order and one finite real `exposure` per code. Magnitudes may be at most 1e6. Integer and floating point arrays are accepted. Booleans, complex numbers and missing entries are invalid. Use a single regular file with one link and at most 8 MiB on disk and uncompressed. Diagnostics may be written to stderr.\n\nGive `provenance.json` a nonempty `description` of the fixed procedure. Use the JSON experiment record to explain the hypothesis, comparisons, full public results, sensitivities and limits of your conclusion. It must be an object with finite numbers within 2 MiB. Keep the entire submission within 256 MiB in ordinary files. The service returns structured invalid feedback for malformed submissions, candidate errors and timeouts.\n\n## Attribution experiment and objectives\n\nAll calculations below use float64. At each snapshot, let w_i = sqrt(cap_i)/sum_j sqrt(cap_j). The background design B contains a dummy for every current industry and the ten current styles. The complete industry dummies span the market intercept. This is the fitted-return space of a market-plus-industry regression with industry-cap-weighted factor returns summing to zero; the two representations give the same fitted stock returns. Least squares uses singular-value cutoff `rcond=1e-10` and objective sum_i w_i residual_i².\n\nNormalize the submitted characteristic x by clipping it to median(x) ± 5*median(abs(x−median(x))). Skip clipping when MAD is at most 1e-12. Regress x on B with the stated weights and retain the residual. Divide that residual by sqrt(sum_i w_i residual_i²), or use a zero vector if this norm is at most 1e-10. Denote the resulting exposure z. Apply this operation independently to the current and five-session-earlier baskets. Overall sign and scale have no scientific meaning. A constant or background-redundant exposure represents no added risk dimension.\n\nWithin each industry, sort stock codes by the hexadecimal SHA256 of their UTF-8 code and assign successive stocks to folds 0, 1, 2 cyclically. For each future session s and each fold, fit stock returns on B using the other two folds and predict the held-out fold. Repeat with [B,z]. Training-fold weights retain their relative values; a common rescaling does not affect the solution. Call the held-out errors e0_si and e1_si. Exposures stay fixed throughout the next 20 sessions. The future returns used to estimate each session’s factor coefficients are evaluation responses: they are never supplied to the exposure program. This measures out-of-sample cross-stock common-return explanation, not forecasting the sign of factor returns.\n\nFor origin t and h in {1,5,20}, define g_t,h = 1 − sum_{s=1..h,i} w_i e1_si² / max(sum_{s=1..h,i} w_i e0_si², 1e-16). The first core metric `short_gain` is the equal-origin mean of g_t,5. Higher is better; it is dimensionless, with 0.01 meaning a one-percent reduction in held-out squared error. To test whether an exposure removes common rather than isolated variation, let sigma_i be max(0.005, the sample standard deviation of the latest 63 historical returns). Define A^k_si = sqrt(w_i)*ek_si/sigma_i and C^k = (A^k)^T A^k/20. Let D_k = sum_{i != j}(C^k_ij)². The second core metric `dependence_gain` is the equal-origin mean of 1 − D_1/max(D_0,1e-16). Higher is better. This is off-diagonal second-moment energy, with no time centering, and is dimensionless. It measures residual dependence after total held-out error has already been assessed.\n\nThe third core metric `lower_quartile_gain` is the 25th percentile of g_t,5 across origins, using NumPy’s linear quantile interpolation. Higher is better, in the same units as `short_gain`. It gives material weight to weak periods rather than measuring only average fit. For the fourth metric, align the normalized current and earlier exposures on common stock codes. Compute their ordinary cosine c_t. If both vector norms are at most 1e-12 use c_t=1; if just one norm is zero use c_t=0. Otherwise use the dot product divided by the product of norms. `refresh_distance` is mean_t(1−min(1,abs(c_t))). Lower is better; it is dimensionless. This sign-invariant exposure refresh measure does not include portfolio turnover or trading costs.\n\nCompute each metric for the candidate and the declared 20-session volatility comparator on identical held-out stock folds and origins. The comparison applies to all four terms including refresh. Average and weak-period gains share a response. Publish both and their correlation. One unit is 10 percentage points of held-out error reduction, 20 points of residual dependence reduction, or one unit of sign-invariant refresh distance.\n\nPublic feedback returns all four raw metrics, origin and calendar-year results, 1/5/20-session gains, positive-gain frequency, and stress diagnostics using each origin’s five largest background-error sessions. It also reports exposure cosine and orthogonality, maximum exposure, missing future marks, 20-session rank IC and decile returns, and full-sample daily factor-return and conventional WLS t-statistic diagnostics. These additional diagnostics carry no numerical weight. They are attribution and association statistics; the task places no orders and makes no assumptions about borrow availability, fees, slippage or executable strategy P&L.\n\nUse the public `evaluate` tool with `mode` equal to `quick` or `full`; `program_id` is implicitly `submission`. The service freezes your current bundle before computing feedback and records the returned measurements. It permits 60 quick and 30 full evaluations per session. A quick evaluation is a shorter diagnostic interval, not a substitute for full validation. `/app/tools/check_output.py` checks one local output, and `/app/tools/prepare_starter.py --dest PATH` writes the declared comparison in the same submission format.\n\n## Resources\n\nThe environment supplies Linux, Python 3.12, NumPy, pandas, SciPy, PyArrow and scikit-learn. Research has 2 CPU cores, 3 GiB memory and four hours. A replay has 2 CPU cores, 3 GiB memory, at most 96 processes/threads and 120 seconds per invocation. Full evaluation, including all fresh invocations and diagnostics, has 3600 seconds. `/app/data` and `/app/tools` are read-only. This task prohibits internet access, including direct connections, proxies, external APIs and package repositories. Use the supplied data, tools and installed dependencies.\n\nFor short error and off-diagonal dependence separately, fix the valid origin mask from the common background model. Exclude origins whose relevant background energy is at most 1e−16, for both the submitted exposure and the 20-session volatility control. Report both counts, retain the published fold identities and maturity rules, and use 0.20 as one unit of common-dependence-energy improvement.\n\n## Market and data conventions\n\nsnapshot.market_return is the equal-weight history of names eligible at that snapshot. The supplied style beta uses a separate daily historical-membership proxy. Keep both distinct from the official S&P 500 return. Report each snapshot’s coverage and the identifiers shared with the five-session-earlier snapshot.\n\nReport zero-mark fractions by origin, industry and test fold, alongside attribution on the common observed cells. State that held-out scores describe the marked-return attribution experiment; economic terminal losses require verified proceeds.\n\n## Objective score\n\n20-session sample volatility supplied through the same exposure normalization, fold assignment, future response and calendar.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.45 × Δshort_gain / 0.1 +0.35 × Δdependence_gain / 0.2 +0.15 × Δlower_quartile_gain / 0.1 −0.05 × Δrefresh_distance / 1.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Keep evaluation stock folds and outcome dates identical for background, 20-day volatility and the proposed exposure.\n2. Ablate or permute the proposed characteristic within industry; distinguish error reduction from lower off-diagonal dependence.\n3. Explain sign-invariant refresh, weak-origin behavior and the limits of any trading interpretation.\n"} -{"display_order": 4, "task_id": "B08", "title": "A daily covariance forecast for the US equity hedge book", "category": "risk_modeling", "instruction": "# A daily covariance forecast for the US equity hedge book\n\nResearch area: Risk modeling and management.\n\nAt month-end we need to hedge each stock in our S&P 500 book with positions in its peers. We have about twice as many eligible names as days in the estimation window. Even an exact fit to the past year leaves many possible hedges for the coming month. Our current estimator pulls each pairwise correlation halfway toward the marketwide average. That stabilizes the inverse, but it can give two stocks with very different industry exposures much the same role in a hedge.\n\nThe same forecast goes to a portfolio manager who must hold the benchmark's sector exposures. A change in the dependence estimate can improve individual hedges and still leave that portfolio with a concentrated short position. A change in the level of all variances can alter our estimate of daily risk while leaving every hedge weight unchanged.\n\nBuild one deterministic program that forecasts the conditional daily covariance matrix for the next calendar month. Decide which relationships in the trailing data deserve weight, how quickly they can change, and how to estimate them with a usable inverse. Assess the forecast on next-month returns and show which part of your method accounts for its performance.\n\n## Decision clock and data\n\nMake the forecast immediately after the last New York exchange close of the month, including early closes. At that point membership, closing bars and the supplied filing-derived observations are available. Inference receives a fresh snapshot of up to 250 sessions ending at that close. A security needs effective historical membership, a verifiable dated industry, a traded close with a valid return at the decision and at least 200 valid returns in that window. All eligible listings require a forecast, including those with zero study-benchmark weight.\n\nThe public panel in `/app/data` begins on January 2, 2013. Develop on the early history. Full public evaluation covers 60 complete return months from January 2016 through December 2020. Quick evaluation covers the final 12. Final evaluation runs the same program on an unseen chronological continuation. The December 2020 close is public. Each next-month observation enters a score only after its close. Only the dated snapshot may enter inference. Fit the rule afresh on every call and preserve the ordering of both matrix axes under a permutation of securities.\n\nDaily inputs include simple close-to-close total returns, high/low ranges, dollar volume, share turnover and the study benchmark return. The snapshot also gives dated industry groups and study-benchmark weights. That benchmark holds eligible names with identifiable reported share counts in proportion to their estimated dollar capitalization at the close. It is an investable research basket with its own coverage. See `/app/tools/data_contract.md` for field definitions, stale observations, class treatment and the distinction between monthly holdings and the daily market series.\n\n## Evaluation\n\nLet $R$ contain the next calendar month’s $H$ daily returns on the $N$ listings in the origin snapshot. Keep that cohort through month-end, including subsequent index exits. For a missing daily observation, record no measured payoff on that leg and use a zero mark solely for the fixed gross marked hedge/GMV calculation; exclude this cell from the QLIKE observation mask. Exclude that stock-day as a hedge target. Missing terminal consideration is unobserved. These conventions define a gross marked-payoff experiment. Short availability, trading costs and a cash rate are outside the portfolio calculation.\n\n1. **Peer-hedge R²** measures the fraction of realized target-stock squared return removed by the implied hedge. With $K=\\hat\\Sigma^{-1}$, the peer coefficient on $j$ for target $i$ is $-K_{ij}/K_{ii}$ and the residual is $e_{ti}=(RK)_{ti}/K_{ii}$. Pool observed target cells across all months and compute $1-\\sum e_{ti}^2/\\sum R_{ti}^2$. Higher is better.\n2. **Gaussian QLIKE** uses the daily marginal Gaussian covariance on actually observed payoffs, averaged by day and then by complete month, as defined below. Lower is better. The Gaussian loss can be negative.\n3. **Constrained GMV Sharpe gain** compares two portfolios formed on the same date. For the security-by-sector indicator matrix $G$ and dated study weights $b$, minimize $w^\\top\\hat\\Sigma w$ subject to $G^\\top w=G^\\top b$. The solution is $w=KG(G^\\top KG)^{-1}G^\\top b$. Signed weights are permitted. Compute daily payoffs $Rw$ at fixed origin exposures. Subtract the annualized Sharpe of the declared baseline portfolio from the forecast portfolio’s Sharpe on the pooled daily series. Sharpe equals $\\sqrt{252}$ times the mean divided by the sample standard deviation, with value zero for fewer than two days or a standard deviation of at most $10^{-12}$. Higher gain is better.\n\nThe baseline centers 250 sessions of daily returns after zero filling, keeps the sample variances, and shrinks the sample correlation matrix 50% toward a constant off-diagonal correlation equal to its average. The exact variance floor, correlation bounds, spectral repair and diagonal normalization are in `/app/tools/estimators.py`.\n\nScore the submitted covariance against the same-date 50%-constant-correlation benchmark on the identical origin cohort, maturity window and observation mask. Pool the peer-hedge residual and target sums of squares for R². Let L be the equal-month mean of each daily observed-marginal Gaussian loss in daily decimal-return units. Use Q=0.60(R²−R²b)/0.50+0.40(Lb−L)/1.00. A unit represents 50 percentage points of additional hedge R² or 1.00 point of per-name Gaussian loss improvement. Negative native losses are valid. Report sector-constrained GMV gross Sharpe gain, exposure, beta, leverage and concentration as diagnostics with no additional score. Report missing, zero-marked and exit observations separately by month; explicitly label results as gross marked payoffs. A full period without positive total target sum of squares or paired finite losses is not gradeable; mark the data window for repair.\n\nCompute Q from the two matched risk-forecast measurements. Keep native values and the paired differences. The gross GMV Sharpe diagnostic has zero objective weight.\n\nIn feedback, `metrics` contains submitted minus baseline R², submitted minus baseline QLIKE, and the native GMV Sharpe gain, respectively. Lower signed QLIKE is better. `diagnostics.scoring` gives the native observations, numeric origins, components after applying direction and unit, and quantitative composite. Yearly results use each year’s matched baseline. Diagnostics also report gross exposure, largest absolute weight, sum of squared weights, market beta, realized risk versus the basket and a diagonal volatility control. Compare dependence estimates at the same marginal variances when attributing gains to peer structure. When attributing a Sharpe gain to risk estimation, inspect yearly Sharpe and exposures. Report sensitivity to an important choice and state the period your conclusion covers.\n\n## Program and research workflow\n\nUse `/app/work` for research. The offline environment has Python 3.12, two CPUs, 4 GiB of memory and four hours of active research time. Internet access is disabled. Install one self-contained program at `/app/submission` with these files:\n\n- `main.py` is the entry point. Additional local Python modules are welcome.\n- `provenance.json` contains `mode` equal to `fixed_rules` and a nonempty `description` of the rule.\n- `experiment_summary.json` records the `mechanism` and `conclusions` as nonempty strings and `experiments` as a list. Include the dated comparisons supporting the main claim.\n\nThe bundle limit is 256 MiB. Use regular files. The entry point is limited to 4 MiB and each required JSON file to 2 MiB. Keep saved predictions, links and fitted binary objects outside the submission. Each fresh process starts in the installed program directory and discards its temporary state after one month-end call. Each call runs `python main.py --input snapshot.npz --output prediction.npz` with a 120-second limit. Write uncompressed `np.savez` output of at most 16 MiB with exactly `codes` (one Unicode ID for each eligible name, unique) and `covariance` (finite real $N\\times N$ daily return covariance). Both axes correspond to the output IDs. Symmetry error must be at most $10^{-5}\\max|\\hat\\Sigma|$, every variance must lie in $(10^{-11},1]$, the minimum eigenvalue must exceed $10^{-11}$ and the spectral condition number must be at most $10^8$. A missing file, bad archive, invalid matrix, failed process or inference timeout produces a structured invalid submission result. A missing evaluation input is an evaluation error. The evaluator repeats inference and permutes security inputs. For both checks every compared entry must differ from the original by at most $10^{-10}+10^{-6}|\\hat\\Sigma_{ij}|$. The permutation check first realigns both axes and also requires a flattened correlation of at least 0.999. The repeat check uses only the entrywise test.\n\nTo exercise the starter in an empty submission directory:\n\n```bash\ncd /app/work\npython /app/tools/make_starter.py --dest /app/submission\npython /app/tools/make_snapshot.py --mode quick --output snapshots\nmkdir -p forecasts\nfor s in snapshots/*.npz; do\n python /app/submission/main.py --input \"$s\" --output \"forecasts/${s##*/}\"\ndone\npython /app/tools/local_check.py --mode quick --predictions forecasts --output quick.json\n```\n\nUse `--asof 2018-06-29 --output snapshot.npz` for an individual snapshot. The local scoring check in `/app/tools/test_scoring.py` compares the closed-form constrained weights with a direct optimization-system solve. Local checks are unlimited. Call the workspace `evaluate` tool with `{\"mode\":\"quick\"}` or `{\"mode\":\"full\"}` to replay the executable. You have 60 quick and 30 full evaluations. Each complete replay has a 7,200-second limit. Check the final program in full mode.\n\nFor each realized session d, freeze O_d, the listings with an observed economically valid payoff, before reading a forecast. For O_d nonempty, take the principal covariance submatrix Σ[O_d,O_d] (not the corresponding block of full precision) and compute [logdet Σ_O + r_O' solve(Σ_O,r_O)]/|O_d|. Average valid days equally within each complete month and weight months equally. If a required month has no measurable day, record an incomplete evaluation and withhold the full-split reward. Use the same O_d for the frozen benchmark, report per-day observed counts, and verify equality to the original full-matrix loss on complete panels. Keep zero terminal consideration when economically documented.\n\n## Market and data conventions\n\nThe historical S&P 500 supplies the member universe. Industry targets and the daily market proxy use our eligible, dated study-capitalization weights; neither is the official index portfolio or index return. GMV results are gross marked payoffs with signed positions. Report leverage, turnover or rebalancing assumptions, and terminal/missing-return coverage before interpreting Sharpe.\n\nUse only complete next-calendar-month holding periods. Check the last observed session against a frozen exchange calendar and verify expected session coverage; if a final shard ends early, omit that origin and log the omitted dates.\n\n## Objective score\n\nBaseline 250-session sample variances with 50% constant-correlation shrinkage; the same months, names and observed hedge targets on both sides.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.60 × Δpeer_hedge_r2 / 0.5 −0.40 × Δqlike_loss / 1.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Validate matrix order and SPD; compare the same observed target cells against the shrinkage baseline.\n2. Hold marginal variances fixed when attributing changes to correlation; reconcile hedge error, logdet and trace terms.\n3. Disclose missing marks, exit sensitivity, leverage and sector residuals; qualify conclusions about investability.\n"} -{"display_order": 5, "task_id": "B22", "title": "When should a fixed order trade?", "category": "Quantitative trading and execution", "instruction": "# When should a fixed order trade?\n\nResearch area: Quantitative trading and execution.\n\nA portfolio manager has signed off on the stock, side, quantity and deadline. The execution desk still has a choice at each quarter hour: cross the spread while shares are available, or leave some of the order working into a later window. A stock can print plenty of volume over the day and offer very little size when the desk needs it. Waiting also leaves the portfolio exposed to a position it was supposed to change.\n\nBuild one policy that updates a distribution for trade volume and decides how much of the outstanding order to request now. Establish how much a change in the forecast saves when the scheduling rule stays fixed, and how much the scheduling rule contributes with the same forecast. The desk cares about the expensive parents as well as the average one.\n\n## Orders and information clock\n\nThe panel covers USD common shares in US regular trading hours, New York time. Each stock-date generates two independent parent sizes, 0.2% and 1% of its mean **eligible regular-session share volume** over the previous 20 complete sessions, rounded down with a one-share minimum. The desk releases the order at 09:45 against the then-visible midpoint. Decisions begin at 10:00 and recur every 15 minutes. Some orders expire at that close and the others at the next session's close. There are 24 or 50 decisions. The second session starts at 09:30. Its opening time and the deadline are known at release. Market holidays follow the tape's exchange sessions. The panel uses full sessions.\n\nFixed orders require a usable release quote, matched recorded tape through cleanup and 20 sessions of history in a common share unit. A recorded slot with no qualifying trade has zero volume. A split during the history or order window breaks comparability. USD prices and share counts use the traded units on the tape. The dated USD common-stock directory is checked against the legal instrument name and contemporaneous security identity before orders are formed. The two size scenarios and the two sides each draw on their own copy of external liquidity.\n\nEach buy/sell pair receives the same anonymous snapshot and submits one fraction of its remaining balance. The desk's position instruction is fixed outside the policy. Public progress advances using the smaller of bid and ask capacity. Actual side-specific balances, fill prices, returns and fees stay in separate ledgers. After a slot closes, its external volume and its effect on the common balance become visible. Continue forecasting through expiry even when the common balance reaches zero.\n\n## Policy interface\n\nPlace a self-contained Python module at `/app/submission/main.py`. Implement `forecast(snapshot)` and `allocate(snapshot, quantiles)`. With B parent sizes and H remaining slots including the current one, return finite NumPy-compatible arrays of shape (B,H,3) and (B,), respectively. The forecast gives ordered, nonnegative 10th, 50th and 90th percentiles in shares for each slot. The allocation is a fraction in [0,1]. The ledger rounds the fraction times each side's actual remaining quantity down to whole shares. Each call receives a dictionary of arrays. For example, with two sizes and 24 slots, forecast returns (2,24,3) and allocate returns (2,). Use real integer or floating-point outputs. Boolean, missing and infinite values and incorrect shapes are invalid. Each callback receives its own writable copies of its arguments. The evaluator scores the forecast returned by the forecast callback. Rows stay aligned within an issue session.\n\n| Field | Shape and meaning at the decision |\n|---|---|\n| `asof`, `slot` | Each has shape (1,). UTC Unix seconds and the current regular-session slot index, 0 through 25. |\n| `quantity`, `remaining`, `low_liquidity` | (B,). Original shares, neutral remaining shares, and a release-time flag for eligible ADV below 200,000 shares. |\n| `spread_bp`, `depth`, `quote_age` | (B,). Full spread of the latest quote update in bp of midpoint, smaller displayed side in shares, age in seconds. An ineligible, missing or over-15-minute-old update has values −1, 0, −1. |\n| `today_volume`, `history_volume` | (B,26) and (B,20,26), in shares. Today's completed slots followed by zeros, and the 20 completed session paths oldest first. |\n| `mean_volume`, `curve_quantiles` | (B,H) and (B,H,3). Same-clock historical mean and empirical quantiles from those paths, repeated by clock for a second day. |\n| `spread_profile`, `depth_profile` | (B,H). Historical mean executable full spread in bp conditional on a qualifying first quote, and mean smaller displayed size in shares including zero-capacity slots. Unobserved spread history uses 100 bp. |\n| `risk_mass`, `bar_variance` | (B,H). Frozen release-time variance times duration for the remaining slots, and a rolling historical mean squared log price change from first open to last close of available minute bars in each slot. Missing bar history falls back to the slot midpoint variance. |\n| `consolidated_adv`, `ex_today`, `ex_next` | (B,). Mean reported whole-day volume over available observations in the prior 20 sessions (zero if absent), and dividend ex-date flags for this and the next session using declarations strictly before today. |\n\nDevelopment history runs from 2026-06-01 through 2026-10-06, with 584 paired parents issued from 2026-06-30 through 2026-10-02. The development file at `/app/data/market.npz` includes outcomes for local experiments. Its `days` and `names` index the daily arrays, whose last axis is the 26 regular-session slots. `orders` lists issue-day and stock index pairs. The public replay code in `/opt/execution/market.py` constructs snapshots and ledgers. From Python, add `/opt/execution` to the import path, load the file with `market.load`, iterate `market.episodes(tape)` and call `episode.run(your_module)`. Develop in `/app/work` without internet access. The research environment provides two CPUs, 3 GiB of memory and four hours.\n\nUse fixed rules or fit within the supplied historical snapshot. Keep persistent fitted artifacts and issuer/date-specific outcome lookups out of inference. The evaluator starts a fresh offline process for each issue date and replay path. Each process starts in the installed submission directory with Python and NumPy. Module state may persist within a path. Each function must also work when the other component is supplied by the desk. A callback has 15 seconds, including the submission import on its first call. Across a replay, all worker requests share 1,380 seconds of response time, including component swaps and stress runs. The evaluator has 1,500 seconds overall. The bundle limit is 256 MiB. Invalid files, outputs and candidate timeouts receive a structured failure and zero improvement. A missing evaluation input interrupts replay. Full feedback evaluates the complete development panel and the two component swaps. Quick feedback uses every sixth issue session and the joint policy. Request either with the public evaluate tool and `mode` set to `quick` or `full`. Final replay uses different securities on later dates.\n\n## Fill and settlement ledger\n\nEligible trades have positive size and price, an uncorrected record and regular execution conditions. Eligible two-sided SIP quotes have positive prices and displayed size, ask at least bid and firm quote conditions. Eligible trades have empty conditions or a subset of 0, 3, 14, 37, 41. A quote must carry the regular two-sided condition 1. It may also carry CQS-generated flag 94 on tapes 1 and 2 or SIP-generated flag 82 on tape 3. These rules apply to snapshots, fills and terminal prices. Sequence number resolves equal quote receipt times. No executions take place outside the regular session.\n\nUse the first qualifying quote at least one second after the decision and before slot end. A buy pays the ask and a sell receives the bid. Fill up to the requested shares, displayed size on that side and 5% of eligible tape volume from that quote through slot end, rounded down. A missing fill quote gives zero capacity. The book charges 0.5 bp of actual fill value. Displayed liquidity is taken once per side and slot. Impact is represented by the spread and capacity constraints on an exogenous tape.\n\nAt expiry charge 25 bp on every late share valued at the release midpoint, once. Carry all late shares into the next trading day's opening two slots with the same fill, capacity and fee rules and a request for the entire balance each time. Mark any shares still outstanding at the last observed eligible side price through cleanup, multiplied by exp(3sσ), where s is +1 for buys and −1 for sells. Here σ is the release estimate of half-hour volatility, the square root of the sum of the first two slot variances. This terminal mark has no fill fee. Report the valuation interval using exp(−3sσ) for the other endpoint.\n\n## Measurements\n\nThe comparison schedules in proportion to the previous 20 sessions' mean same-slot volumes over the remaining window. Its three forecasts are the corresponding linearly interpolated historical quantiles. For the forecast-only replay, the same scheduler tilts each historical mean by (submitted median + 1)/(historical median + 1) before normalizing. A zero weight sum uses equal time. For the schedule-only replay, your allocator receives the historical quantiles. All methods face identical fixed orders and settlement rules.\n\nFor each metric the evaluator reports the policy's native loss and its matched baseline loss. Smaller is better. Its scoring metric is policy loss minus baseline loss. The quantitative raw score sums the **negative** of each such difference divided by the unit below, multiplied by the weight. Each parent size counts once. Average the two side results before aggregating across parents.\n\n| Metric | Native loss | Unit | Weight |\n|---|---|---:|---:|\n| `shortfall_bp` | For side s, 10,000 × [s Σ q(P−P₀) + dollar fees including the late charge] / (QP₀). P₀ is the release midpoint and Q includes every share, including cleanup and terminal valuation. Average the signed shortfalls. | 200 bp | 0.50 |\n| `tail_bp` | Pool large parents and those flagged low liquidity, counting each once. Average the largest ceil(N/5) paired parent costs in that pool. Each policy has its own upper tail. | 600 bp | 0.20 |\n| `risk_ratio` | Sum (remaining side shares/Q)² times slot risk mass through the deadline and divide by the same sum of risk masses for a fully unexecuted order. Include full exposure between release and first decision. Use post-fill inventory for each decision slot. | 0.50 | 0.20 |\n| `volume_pinball` | For level p and e = (realized shares − forecast shares)/max(1, historical same-slot mean shares at decision), use max(pe,(p−1)e). Average equally over levels and remaining slots at each decision, then decisions within each parent and finally parents. | 0.08 | 0.10 |\n\nRisk masses are integrated 15-minute variances estimated from valid same-clock squared log midpoint changes in the 20 sessions before release. The first slot uses the second slot's variance. A missing estimate falls back to the stock's pooled intraday variance, with a floor of 10⁻¹⁰ per slot. For a cross-session order, add the historical mean squared overnight change from final-slot midpoint to next opening quote to the closing inventory's risk mass. Missing overnight history uses the mean slot variance. The risk clock and its denominator stay fixed for the order.\n\n## Research record\n\nSubmit `provenance.json` with `mode` equal to `fixed_rules`, `model_files` equal to an empty array, and a description of the inputs and their availability. Include one `experiment_summary.json` object that explains the policy, reports dated validation, and relates forecast improvements to money saved under the component swaps. Use the side, large-order tail, low-liquidity, same-session, overnight and volume-drought results to explain where the policy left shares outstanding. The drought diagnostic flags a future slot with volume below one tenth of its decision-time historical mean. The assigned-side diagnostic uses one predetermined simulated parent direction per stock, date and size. Quantify the sensitivity of the conclusion to timing or capacity. Full feedback also reports a 60-second delay and a 2.5% participation cap separately on the quick sample. Supply your final files in `/app/submission`.\n\n## Final scientific review\n\nFinal review uses the frozen executable code, fitted artifacts, validation materials and submitted explanations. The quantitative composite Q retains its full declared weights. Review severity S weights task alignment at 0.55, metric integrity at 0.15 and the consistency of final research evidence at 0.30. Each severity lies in [0,1], with 0 for no evidenced defect, 0.25 for a localized material defect, 0.5 for a substantial defect, and 1 for a fundamental defect. For each nominated answer use Q_adjusted = Q - 0.3*S, average adjusted raw scores equally across answers, then apply the common reward mapping once. Baseline, reference and model submissions use the same criteria. Critical invalidity concerns demonstrated prediction-time information leakage in the final executed path or final fitted artifact, or evaluator tampering. The affected answer receives the declared zero-improvement fallback. The review checks the forecast and plan against the anonymous decision history, reconciles claims to both full-parent ledgers, and compares the dated component swaps and execution stresses cited in the research record.\n"} +{"display_order": 1, "task_id": "B01", "title": "What does a broker revision add to the price?", "category": "factor_data", "instruction": "# What does a broker revision add to the price?\n\nResearch area: Factor and data research.\n\nWhen a broker raises next year’s earnings estimate after a stock has rallied, the upgrade can mean two different things for our portfolio. The analyst may have learned something the market has yet to absorb, or the new forecast may simply put a number on news investors have already traded. At month-end we want to know whether that distinction is useful for ranking US stocks over the following month.\n\nThe forecast history gives us a way to ask that question. One broker may be changing its view while another is publishing its first estimate for that fiscal period. Even for the same broker, a lower number after a stock split need not mean a worse outlook. Treating every new estimate as a fresh opinion could give us a signal about who publishes and when, rather than about earnings.\n\nDevelop one monthly stock-ranking signal from the dated broker forecasts. You decide which changes carry information, how to compare them across brokers and fiscal periods, and what the preceding price history tells you about those changes. Compare your signal with the simple share of upgrades after controlling for industry, size and recent momentum. In your experiment record, show what happens when you remove or perturb the forecast information on the same stocks and dates. Use the period and coverage results to say where you would trust the ranking and where you would not.\n\n## Data and clocks\n\nThe public file `/app/data/history.npz` contains real US market observations from 2019-01-02 through 2023-12-29 and a forecast-event history beginning in 2019. Use the observations through 2021 for initial development and the scored origins from January 2022 through October 2023 for public validation. Public labels exist only when their exit observation has matured by 2023-12-29. Full feedback uses all 22 public validation origins; quick feedback uses the last eight. These public results can inform method selection and are therefore post-selection diagnostics. Final evaluation executes the frozen program on fresh chronological inputs. Hidden dates, securities, labels and scores are withheld.\n\nBusiness dates use America/New_York and the actual US session calendar. Decisions follow the last close of the calendar month. An annual estimate has a target period end, fiscal horizon, announcement, activation and review time. We assign the exact retained value to the first session strictly after the latest of those three dates. Activation cannot precede announcement by date; the latest date must lie within seven calendar days of announcement and no later than fiscal period end. Unmatched values, indeterminate same-time replacements, missing clocks and incompatible units do not enter the stream. The retained observations are a timely subset of the archive, not a complete history of broker coverage.\n\nThe forecaster identifier denotes a brokerage, not an individual analyst. Annual forecasts cover fiscal horizons one through three; two denotes the next fiscal year. Compare the exact fiscal period end, not an announcement-year approximation. The forecast is diluted USD earnings per share, in constant share units from the start of the price history. Multiply an unadjusted estimate by the cumulative new-to-old share ratio effective by publication. A split-day publication or a split between publication and review is excluded. Negative values are forecast losses. Rows on one availability day do not enter one another’s prior information; the latest original publication breaks ties for updating the following day’s state. The archived source admits rows with USD reporting currency and either blank or USD observation currency under the documented provider convention. The supplied coverage summary describes currency status. The organizer documents that convention and the explicit-currency sensitivity; contestants use the released causal event fields.\n\nThe universe at the decision close consists of observed historical S&P 500 constituents with a dated class identity, at least 365 calendar days since listing, a positive closing price and volume, positive finite class capitalization, known dated industry and finite 63-session price return. A stock must also have at least two retained next-fiscal-year forecast rows available in the preceding three calendar months. We use actual membership intervals, not the present index. Future label availability never determines signal eligibility.\n\nAdjusted prices are raw session prices on a common historical share basis: raw price times the cumulative effective split ratio. Returns and holding payoffs exclude cash dividends. A missing closing mark carries forward; daily returns require both consecutive closing observations. Raw prices are USD/share, volume is estimated contemporaneous shares, and amount and class capitalization are USD. Capitalization uses the most recent strictly prior observed class share count rolled across effective splits, times the current marked close. Industry is the strictly prior observed two-digit SIC. The dictionary in `/app/tools/data_contract.md` specifies every array.\n\nFor decision T and the next scheduled month-end U, the label is `adjusted_open(U+1)/adjusted_open(T+1)-1`, where +1 means the next market session. An unavailable exit open uses the last marked adjusted close at U. An unavailable or nonpositive entry gives an undefined label but still requires a score. An index deletion is not a worthless delisting. The series has no independently dated liquidation-proceeds feed; stale exit marks need not capture a corporate-action settlement. These are gross forecast-attribution payoffs, not executable portfolio returns. Any submitted trading experiment must separately state costs, capacity and executable fills after the decision.\n\n## Inference and deliverables\n\nUse `/app/work` for research and `/app/submission` for the final bundle. Submit `factors.json` with exactly one nominated entry, such as `{\"factors\":[{\"id\":\"revisions\",\"path\":\"factors/revisions\",\"direction\":1,\"hypothesis\":\"your economic hypothesis\"}],\"scored_factors\":[\"revisions\"]}`. The nominated directory contains self-contained `main.py`, `provenance.json`, and any local source modules or plain-text parameters. At the root provide UTF-8 `experiment_summary.json`, at most 2 MiB, containing the hypothesis, method description, validation measurements with their periods, relevant comparisons and sensitivity, and conclusions. It may reference included CSV validation tables. Code and parameter evidence must support its substantive claims. The bundle is at most 256 MiB; only ordinary unlinked `.py`, `.json`, `.md`, `.csv` and `.txt` files are supported. Helper modules must live inside the nominated program directory. No hidden dependencies or stored fitted models are transported.\n\nThe command is `python main.py --input /input/snapshot.npz --output /output/prediction.npz`, launched from the nominated program directory. Each origin starts a new isolated process and fresh temporary/output directories. There is no retained process state or data from a previous origin. Inference must be deterministic for an identical snapshot; use fixed seeds for stochastic estimation. Load NPZ files with `allow_pickle=False`. Each input contains scalar `asof`, Unicode `codes`, Boolean `eligible`, a chronological market window of at most 253 sessions, contemporaneous industry and momentum, and up to 730 calendar days of available forecast events. Event stock indices refer to that snapshot's codes. Brokerage integers are categorical within the snapshot and may be remapped on another call. They are not magnitudes or stable cross-call identities. No labels are in inference snapshots.\n\nWrite an NPZ with exactly `codes` and `values`, each one dimensional. `codes` must equal the input `codes[eligible]` in its supplied order; emit every eligible stock once, including stocks lacking a label. `values` must be finite real scores with absolute value at most 1e6 and larger values predicting higher returns. Boolean, complex, NaN, infinite, missing, extra, reordered or duplicate rows are invalid. Output must be one regular unlinked file no larger than 8 MiB, including the total expanded NPZ members. No stdout protocol is required; stderr is for concise diagnostics.\n\nUse provenance `{\"mode\":\"fixed_rules\",\"description\":\"explain inputs, estimation and parameter choices\"}`. Final inference computes from the supplied causal snapshot and frozen research-selected configuration. Estimation within a snapshot is allowed; any internally constructed outcome must have matured by `asof`. Carried fitted coefficients or learned model weights, including ones encoded in text or code, are not supported; perform numerical model estimation inside the snapshot process. Public experiments may select the frozen algorithm configuration and hyperparameters. Features, standardization, imputation and selection obey the same availability boundary. Stored models fitted to future decision information, security/date lookup tables of historical answers and access to hidden targets are prohibited. Describe public-data selection of constants. A future-row probe may append records dated after `asof`; ignore those rows in every operation. The ordinary replay supplies only the causal prefix.\n\nFor quick research, you may place UTF-8 `factor.csv` inside the nominated directory with exactly `time,symbol,value` columns, unique decision-date/security rows and finite numbers. It must cover every eligible security at each requested public origin. Within each date, rows follow the supplied eligible-code order. Public table feedback measures those values and does not certify causal computation. The final deliverable contains executable inference code; public-table adapters and lookup-based final answers are invalid in hidden replay. This task uses table-then-replay with fixed rules and snapshot-local estimation, not stored fitted-model replay.\n\n## Objective and public feedback\n\nThe declared simple comparison is the fraction of retained next-fiscal-year forecasts available in the preceding three calendar months that increase the same brokerage's immediately preceding available forecast for the same stock and fiscal year. A predecessor must be on a strictly earlier availability day and no more than 365 calendar days old. If multiple predecessor rows share that availability day, use the latest original publication date. All retained next-year rows in the window enter the denominator, including first observations and unchanged or missing-predecessor forecasts; only a strict increase enters the numerator. No broker, skill or innovation filter is used. This is the sole admission comparison. Other controls are research diagnostics.\n\nAt each origin use the complete eligible universe. Winsorize submitted scores at the 1st and 99th percentiles using NumPy's linear quantile interpolation. Center the winsorized scores and divide by their maximum absolute centered value (use zeros for a constant vector). Regress these dimensionless values by unweighted least squares on an intercept, separately winsorized and population-standardized log share-class capitalization and 63-session cumulative return, and historical-industry dummies with one omitted category. Treat residual standard deviation at or below 1e-10 as constant. Round the dimensionless residuals to 12 decimal places before assigning average ranks to ties. All prediction values are required even for stocks subsequently excluded for undefined labels.\n\nLet `r_i` be a residual score's average rank among the N eligible stocks. Its group is `min(9, floor(10*(r_i-1)/N))`; ties therefore stay together. Compute group means from stocks with finite labels. The origin IC `c_t` is Pearson correlation of residual-score ranks with average ranks of the finite holding returns. The origin spread `d_t` is group 9's mean return minus group 0's mean return, or zero if either is empty. The origin group monotonicity `g_t` is Spearman correlation between the indices of nonempty groups and their mean returns, or zero with fewer than three nonempty groups. A constant signal or fewer than 30 labeled stocks gives all three origin metrics zero. Correlations with zero denominator are zero.\n\nThe four core metrics are mean `c_t` (neutralized RankIC), `sqrt(12)*mean(c_t)/sample_std(c_t)` with ddof=1 (RankICIR), mean `d_t` (monthly gross decile spread), and mean `g_t` (group monotonicity). RankICIR is zero for fewer than two origins or standard deviation at most 1e-12. All metrics are larger-is-better. Returns and correlations use fractional units. Every origin has equal weight. RankICIR is a diagnostic and has zero objective weight. The remaining three metrics enter as differences from the frozen strict-upward-revision comparator on exactly the same dates, eligible symbols and observed labels.\n\nAn improvement of 0.05 in mean neutralized rank IC is worth 0.65 raw improvement units. A 0.02 monthly gross spread improvement is worth 0.25; a 0.50 group-monotonicity improvement is worth 0.10.\n\nThe metrics measure ranking quality, temporal stability, tail payoff magnitude and whether the payoff extends across the ranking. Public feedback returns all four raw metrics, origin and annual breakdowns, group returns, coverage and label completeness, IC dispersion and positive fraction, a three-origin circular-block bootstrap 90% interval using 500 draws, gross-spread downside and positive fraction, top-group membership turnover, ordinary RankIC, remaining control exposure and runtime. These additional diagnostics are not extra weighted metrics. Publish the four raw measurements, signed paired contributions and research evidence. Public guidance and private scoring use the same declared units. The final objective uses the prespecified reward mapping below.\n\nRequest `evaluate` with the nominated `factor_id` and `mode` equal to `quick` or `full`. There are at most 60 quick and 30 full calls. The service freezes the bundle and returns feedback before continued research. Infrastructure failures do not consume a scientific call allowance. Use full feedback for the final nominated signal. `/app/tools/make_snapshot.py --asof YYYY-MM-DD --output PATH` constructs an identical public snapshot. `/app/tools/core.py` contains the public numerical definitions for independent local diagnostics; `/app/tools/example.py` demonstrates the output schema with a constant signal.\n\n## Resources\n\nLinux, Python 3.12, NumPy, pandas, SciPy, PyArrow and scikit-learn are installed. Research has 2 CPU cores, 3 GiB memory and four hours. Each replay process has a 120-second limit, at most 96 processes/threads, and shares a 2-core, 3-GiB evaluation container. A complete evaluation has a 7,200-second execution limit, including startup, replay and cleanup. `/app/data` and `/app/tools` are read-only. Internet access is prohibited, including direct connections, proxies, external APIs and package repositories. Use only the supplied data and installed dependencies.\n\nTask-specific scientific review checks whether forecast information actually contributes to the implemented mechanism; whether stock, brokerage and fiscal-year comparisons retain their stated meaning; whether evidence distinguishes new information from public price history under the common protocol; and whether sensitivity and temporal evidence support the scope claimed. A relevant alternative representation is valid. Using price context nonlinearly is permitted; the evaluator's fixed regression controls do not restrict all candidate features. An implementation that ignores forecasts entirely is a fundamental task-alignment defect. A noisy but honest result or an equivalent numerical implementation is not a defect. Documentation length, algorithmic complexity and abandoned experiments do not earn points or deductions.\n\n\n\n## Objective score\n\nNumber of comparable strict upward revisions divided by all retained next-fiscal-year forecast events in the previous three calendar months, using a strictly earlier forecast by the same broker on the same fiscal period and share basis. Replay the comparator on the same eligible issuer-months.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.65 × Δneutralized_rank_ic / 0.05 +0.25 × Δdecile_spread / 0.02 +0.10 × Δgroup_monotonicity / 0.5.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Trace the events used by the program to the released stock, broker, fiscal period and first usable timestamp. Identify the common share and currency basis from the published field contract; verify event timestamps against the supplied records.\n2. Ablate broker revisions on the same issuer-months while retaining price and consensus controls.\n3. Report residual IC and coverage by period and retain a null result if the evidence warrants it.\n", "rubric_path": "tasks/B01/rubric.json"} +{"display_order": 2, "task_id": "B04", "title": "Crowding and the term structure of US factor returns and risk", "category": "factor_data", "instruction": "# Crowding and the term structure of US factor returns and risk\n\nResearch area: Factor and data research.\n\nAt month end, a risk manager must decide whether to raise the volatility forecast for a US equity exposure now or reserve that adjustment for later. A factor can rally while its stocks become more dependent on the same buyers. The rally may persist while those buyers are adding risk; if they sell together, much of the risk may arrive after the rally. A factor whose volatility is already high poses a different question: how much of the move has already happened?\n\nDevelop one forecasting program for the market, ten styles and thirty industries. At each month end, forecast the compounded return and annualized daily volatility of each exposure in four successive six-month blocks. Determine whether the state of the stocks behind an exposure changes that outlook beyond what is evident in its own return history and broad market conditions. Define the stock evidence you find economically relevant. A signal that helps size a risk forecast need not tell us when risk will rise, or what return to expect.\n\nShow where your conclusions hold up when the calendar period or market risk state changes. If you attribute an improvement to stock-level information, compare your final procedure with one that removes that information while keeping the decision dates, available labels and fitting rules the same. We want to know which forecast you would change on that evidence, including when you would leave the unconditional forecast alone.\n\n## Forecasting contract\n\nSubmit exactly one integrated forecasting program. It must forecast both compounded factor return and annualized daily factor volatility in four successive six-month blocks: months 1–6, 7–12, 13–18 and 19–24 following each decision. These are eight outputs of the same research program. Explain the mechanisms you investigated, alternatives you rejected, component ablations, sensitivity to material modeling choices and uncertainty from overlapping response windows. Use the complete public evaluation set to assess your final method. Separate observations used to select a hypothesis from independent evidence supporting it, and document the actual chronology of selection and fitting. Repeated feedback on the same dates does not provide a fresh validation sample. Investigate how much each response's apparent timing skill depends on a few calendar regimes or on broad slow-moving paths. For any claim of incremental stock-state information, compare the final procedure with a matched information-removal experiment that removes the claimed stock-state channel while preserving the remaining inputs, decision dates, response construction, training-label maturity, fitting and model-selection rules. Refit both procedures causally when fitting is part of the method. Report all three metrics on the same dates and distinguish changes in return timing, risk timing and risk magnitude. This is evidence for the claim, not an additional scored baseline or a prescribed forecasting method. If the evidence is mixed or negative, retain that result and limit the conclusion; a truthful null result is valid. For any claim that a normalization preserves the scored order, check temporal ranks within each factor: a positive divisor that changes over dates can change those ranks. Documentation must connect the delivered forecasts to the research conclusion; the three declared metrics determine the objective score and the sourced research evidence receives a separate grade. Different risk levels at different horizons need not imply different timing: monotone transformations of one state can preserve the same ordering of decision dates. If you claim to locate the buildup or decay of risk across horizons, check both the horizon profile and the temporal ordering actually produced by the final code. Examine whether an apparent timing relation is already explained by risk observable at the decision. The supplied current-risk and horizon diagnostics support this investigation; their limitations do not require a particular conditioning model or a new comparison program. Report useful level forecasts and the measured incremental contribution of crowding, including a null finding.\n\nFor return ranks, use zero expected compounded return. For risk ranks, use annualized sample standard deviation of the trailing 63 sessions through the origin (ddof=1, sqrt(252), minimum 42 finite returns; use the frozen pre-2017 per-factor volatility when history is short). For QLIKE, use the original fixed pre-2017 per-factor volatility profile to evaluate improvements in the level of risk. Broadcast each benchmark to all four horizons, on the same eligible coordinates. Publish the native measurements of both complete controls and preserve the 126-session diagnostic. The metric-specific benchmarks are fixed before blind submissions.\n\nPublic observations are in `/app/data/history.npz`. Monthly stock panels, including trailing daily total and specific returns, span June 2014 through December 2021; daily realized factor returns start on 2014-01-02 and end on 2021-12-31. Use observations and matured responses through 2016-12-30 for initial offline fitting. Full public feedback evaluates the 36 month-end decisions in 2017–2019; quick feedback evaluates their latest 18 decisions. Responses may mature through the end of the public data. At each replay decision, the program receives only the historical prefix available at that close. It may train or update models using that prefix, provided every training response has fully matured. Final evaluation runs the frozen program on fresh chronological inputs with the same field definitions.\n\nThe stock panel contains up to 800 securities selected independently at each month-end by descending class capitalization within the historical US large-cap risk-model universe. Unused slots have empty codes. Eligibility requires effective membership, positive observed price and capitalization, all ten finite style exposures and at least 50 observed specific returns in the last 63 market sessions. Ties use the stable security identifier. New listings enter only after the necessary descriptor and residual histories become available; historical exits and changes in membership remain in the data. No present-day constituent list is backfilled. The broad risk model's realized factor returns use its own complete-case estimation universe; the stock panel is a liquid-universe view for researching crowding. This difference in scope is part of the research setting.\n\nA decision occurs after the final observed market close of a calendar month. All dates use the US equity market calendar and America/New_York time. Month-end stock exposures and market descriptors use observations through that close. Financial fields use reports strictly after their announcement dates; analyst-derived fields use publications strictly earlier than the decision date and expire after 180 calendar days. A realized factor or specific return dated t is estimated using the most recent month-end exposures available at t−1 and is known after close t. The supplied segment starts after the risk model has accumulated its lookbacks. The field dictionary in `/app/tools/data_contract.md` gives array axes, units, missingness and examples.\n\nFor a decision at the end of month m and block h=0,1,2,3, use daily factor returns strictly after the last session of month m+6h through the final session of month m+6(h+1), inclusive. The return response is product(1+r)−1 and the volatility response is sqrt(252) times sample standard deviation of daily r, with ddof=1. A response requires at least 90 daily observations and all daily values finite for that factor. A block becomes available for training only after its final close. Returns are dimensionless regression-factor returns from the documented project model, not the return on an executable long-short portfolio. The scored program produces forecasts only: it does not create positions or orders, simulate execution or fills, or report strategy net P&L. The evaluator scores forecast accuracy against the realized factor-return and volatility labels and applies no transaction costs; do not interpret a factor return as an earned portfolio return. If your report adds an optional portfolio simulation or makes an executable-trading claim, state the signal and order timestamps and earliest eligible execution (a signal computed after a close cannot fill at that already-observed close); the order type and exact fill, partial-fill, rejection, trading halt, price-band and execution-price rules; each commission, tax, exchange or transfer fee, slippage and market-impact formula with numerical parameters; and apply the same execution and cost protocol to every benchmark and comparison. Report gross and net results separately. Such optional portfolio results do not change the forecast score.\n\nThree quantitative metrics determine the raw composite, with predeclared matched-improvement units of 0.10 for each rank metric and log(2)−0.5 for ratio-form variance QLIKE. `return_rank_correlation` and `volatility_rank_correlation` each have weight 0.35 and higher values are preferred. For each factor, horizon and response, keep dates with finite observed responses, rank forecasts and responses using average ranks for ties, and compute the Pearson correlation of those ranks. A constant vector or fewer than 12 observed responses yields zero. Average these correlations equally across factors within each of the three classes (market, style, industry), then equally across the classes and four horizons. Each rank metric lies in [−1,1]. This measures temporal forecasting within each factor; differences in average return or risk between factors do not create timing skill. There is no extra rank neutralization.\n\n`volatility_qlike` has weight 0.30, is dimensionless, lies in [0,infinity), and lower values are preferred. For each observed volatility v and forecast v_hat, both in annual fractional units, set q = max(v,10^−6)^2 / max(v_hat,10^−6)^2 and loss = q − log(q) − 1 (natural logarithm). For each factor and horizon, average loss over its observed decision dates. Then average equally across factors within each class and equally across the three classes and four horizons. Omit factor/horizon coordinates without observed responses and entirely empty class/horizon cells. A wholly unobserved diagnostic sample uses zero as the placeholder and available=false as its coverage flag. The fixed 10^−6 volatility floor only defines the loss at zero. This loss tests risk magnitude: its population target above the floor is conditional mean variance, whose square root is the corresponding volatility forecast. It penalizes severe risk underprediction more strongly than comparable multiplicative overprediction. For an official split require defined matched results for all four horizons in all three classes; a required empty cell is a data failure. Reserve available=false for optional diagnostics.\n\nCompute 35% return rank, 35% volatility rank and 30% variance loss on matched origins, in the declared units. The two rank terms give equal emphasis to return and risk timing; the variance loss adds a separate risk-magnitude requirement. No forecast scale is fitted by the evaluator. Return magnitudes are not calibrated by these metrics, and Q does not measure executable portfolio profit. Raw program composites are averaged equally before one final reward mapping. Public feedback returns all three raw metrics, factor-by-horizon correlations and losses, observation counts, predictions, realized responses and their missingness mask, yearly diagnostics and replay times. Risk diagnostics include mean log(max(v_hat,10^−6)/max(v,10^−6)) by class and horizon; positive values indicate overprediction and negative values underprediction. These bias summaries are unscored. Yearly metrics follow the same formulas; yearly correlations are zero with fewer than 12 observations, while variance loss can still be measured. Public feedback does not return a normalized reward.\n\nPublic feedback also returns `temporal_robustness`, an unscored dependence diagnostic for the two rank metrics. For each block length L of 6 and 12 months, use NumPy default_rng with seed 2718+L to draw 200 paired circular moving-block samples of the N evaluated decisions. Each sample draws ceil(N/L) starting indices uniformly with replacement from 0 through N−1, joins their consecutive L indices modulo N, and truncates to N rows. Predictions and responses share these indices across every factor, horizon and response; rerank and aggregate each sample by the same metric rule. Feedback includes all metric samples, their means, 2.5th and 97.5th percentiles with linear interpolation, and fractions above zero. It also reports both metrics after circularly shifting predictions by each integer s from 6 through N−6 while keeping response dates fixed: shifted prediction at row t equals the original at (t−s) modulo N. Fewer than 12 decisions makes these diagnostics unavailable. The helper `/app/tools/robustness.py` accepts paired arrays of shape (N,41,4,2), ordered as return then volatility, with NaN for unobserved responses.\n\nThese summaries describe frozen forecasts; they neither refit the program nor correct for adaptive model selection. Bootstrap draws contain repeated observations, not new independent evidence. Circular blocks assume local stationarity, create wraparound seams and may miss longer regime dependence; adjacent decisions and horizons share outcomes. The displayed percentile intervals are descriptive uncertainty summaries, not guaranteed coverage. Circular shifts are alignment stress tests, not exchangeable null draws or valid p-values. Similar shifted and unshifted measurements may indicate slow-moving paths. Use the matched comparison to assess the crowding mechanism. Neither diagnostic changes the score, the forecast requirements or the primary comparison.\n\nFeedback also returns unscored `regime_sensitivity` summaries of the frozen forecasts. For every calendar year represented in the evaluated decision dates, remove that year and recompute all three metrics with their existing response masks and aggregation rules; do not refit or modify labels. A second partition uses the market factor (column zero): at every historical month end, compute sqrt(252) times the sample standard deviation (ddof=1) of the most recent 126 daily market returns through that close, requiring all 126 to be finite. Compare this risk with the median of finite risks at strictly earlier supplied month ends, requiring at least 12 such earlier months. Label the decision high if its current risk strictly exceeds the prior median and low otherwise; absent history is unavailable. Recompute all three metrics separately for low, high and unavailable decisions, keeping the same factor/class/horizon rules. Feedback includes decision states, prior counts, per-coordinate response counts, class/horizon correlations and risk losses. An empty partition returns available=false with the metrics omitted. For coordinates with fewer than 12 responses, record rank correlation as zero by convention. The helper `/app/tools/regime_diagnostics.py` implements these definitions. Calendar deletion and the risk partition are sensitivity summaries, not new independent samples, significance tests or proof of a crowding channel. They retain overlapping labels and do not correct model selection. Use them to qualify claims of stability, along with any stronger independent checks your claim requires.\n\nThe unscored `risk_transition` feedback separates current-risk dependence from the forecast horizon profile. At each decision and for each factor, current risk is sqrt(252) times the sample standard deviation (ddof=1) of exactly the last 126 daily factor returns through that close; fewer observations or any nonfinite return makes that state unavailable. For each factor and horizon, use dates with both a finite realized volatility and an available current-risk state, requiring at least 12 dates. Separately rank forecast volatility, realized volatility and current risk with average ranks for ties; center each rank vector and divide by its Euclidean norm (a norm at or below 10^−12 yields the zero vector). Call these vectors a, b and c. Feedback reports a·b, a·c and b·c. Its partial rank diagnostic is the normalized dot product of a−(a·c)c and b−(b·c)c; if either residual norm is at or below 10^−12, it is zero. Numerical correlations are clipped to [−1,1]. Short or missing cells are unavailable, not zero observations. Partial ranks remove only a linear relation in rank space with this one current-risk state. Interpret these unweighted diagnostics as conditional associations. Nonlinear dependence, other market effects and selection bias can still contribute.\n\nThe same feedback reports forecast rank concordance for each of the six horizon pairs: the dot product of their centered unit rank vectors over all evaluated decisions, requiring at least 12 dates and using the same constant-vector rule. A value of one means identical date ordering, regardless of differences in risk levels. Horizon shape is summarized by the mean absolute error in adjacent log volatility ratios. For adjacent blocks h and h+1, each observed pair contributes abs([log(max(v_hat[h+1],10^−6))−log(max(v_hat[h],10^−6))]−[log(max(v[h+1],10^−6))−log(max(v[h],10^−6))]). Average over dates with both realized blocks observed, then equally over observed factors within each class, then equally over nonempty class/pair cells; associations use the corresponding class/horizon rule. Feedback retains per-factor results, counts and class breakdowns. An entirely unavailable summary has mean=null. Shape error is unchanged by a common per-date multiplier on all four risk forecasts, so it cannot replace the scored variance loss. Use matched comparisons to interpret high partial association or low shape error in terms of crowding. Compute these diagnostics on frozen forecasts with overlapping labels; retain the original benchmark and fitting window. `/app/tools/risk_transition.py` exposes `risk_transition(pred, target, names, decisions, factor_dates, factor_returns)` for arrays shaped (N,41,4,2), ordered as return then volatility, with NaN for unobserved responses.\n\nWork in `/app/work` and install the final bundle in `/app/submission`. Its UTF-8 `factors.json` contains `factors`, a list of objects with `id`, `path`, `direction` and `hypothesis`, and `scored_factors`, a list containing exactly one nominated ID. IDs match `[A-Za-z][A-Za-z0-9_-]{0,31}`; `path` is exactly `factors/`, `direction` is numeric 1, and the hypothesis is nonempty. Each registered program is self-contained under its own directory with `main.py`, `report.md`, `provenance.json` and any local dependencies. Include a root `report.md` discussing the research as a whole. A minimal registration is `{\"factors\":[{\"id\":\"research\",\"path\":\"factors/research\",\"direction\":1,\"hypothesis\":\"Explain the proposed mechanism.\"}],\"scored_factors\":[\"research\"]}`. You may register experimental alternatives for public feedback, but nominate one final program.\n\nThe replay command is `python main.py --input /input/snapshot.npz --output /output/prediction.npz`, run with the selected program as the working directory. Read NPZ files with `allow_pickle=False`. The snapshot includes scalar Unicode `asof`, historical `months`, monthly stock arrays, `factor_dates`, daily `factor_returns` and the schema-name arrays. Every time-indexed observation is at or before asof. Each call starts a fresh process, input directory and writable temporary directory; no writable state carries across calls. Fixed local models travel with the program. Return one regular NPZ file with exactly `factor_names`, `return_forecast` and `volatility_forecast`. `factor_names` must equal the input Unicode names in the same order. Each forecast must be a finite real numeric array with shape (41,4); columns follow the four blocks above. Volatility must be nonnegative. Every factor must be present. Boolean, object, complex, NaN, infinite, duplicate, reordered or missing outputs are invalid. No additional output keys are permitted. The output file and the sum of its expanded NPZ members must each be at most 8 MiB. Use stderr for optional logs; stdout is ignored.\n\nSet provenance mode to `fixed_rules`, `online_causal` or `fitted`, and supply a description. An online method must construct fitted statistics and transformations from the chronological prefix and fully matured responses; expanding and rolling transformations must be causal. A fitted program includes `fit.py`, `latest_fit_observation` and `latest_label_exit` as ISO dates. The stored model used for public replay must use observations and matured fitting labels through 2016-12-30. You may refit the same procedure through 2021-12-31 for later decisions by retaining a self-contained `public_validation/` version with development-period model, code, report and provenance. Public replay uses that copy and final replay uses the nominated root version. Document both fits; the inference and fitting procedure must be the same.\n\nThe public 2017–2019 responses and repeated feedback are a research selection sample: you may use them to choose hypotheses, representations and hyperparameters. Disclose those choices, their selection dates, the observations consulted and whether validation results influenced the final choice. Such selected public results are retrospective diagnostics, not an independent out-of-sample performance claim. This permission does not authorize features, stored fitting samples, preprocessing statistics or online training labels from beyond a public replay's decision time, nor a table of date-specific target-derived predictions. Reserve independent temporal or regime checks when making generalization claims. Freeze the final procedure and all selection decisions before final evaluation; all selection information for later evaluation must be available by its prediction decisions. Final inference sees only each supplied prefix, and every training response used at that decision must already be mature.\n\nFor local work, `/app/tools/make_snapshot.py --asof 2018-12-28 --output /app/work/snapshot.npz` creates a public snapshot. `/app/tools/labels.py` and `/app/tools/metrics.py` provide the public response and metric calculations for independent experiments. The public `evaluate` tool accepts `factor_id` and `mode` (`quick` or `full`) and freezes the submitted bundle before replay. The session budget is 60 quick and 30 full feedback requests. Expected candidate errors and timeouts produce structured failure feedback. A failed nominated program receives the declared zero-improvement fallback; a malformed or empty bundle is invalid. Infrastructure faults are reported separately.\n\nThe environment is Linux with Python 3.12, NumPy, pandas, SciPy, PyArrow and scikit-learn, 2 CPU cores, 3 GiB memory and a four-hour research budget. Each replay call has 2 CPU cores, 3 GiB memory, at most 96 processes or threads and a 120-second timeout; the complete evaluation has a 7200-second limit. The submission is limited to 256 MiB, each report to 2 MiB, and all files must be regular files without symbolic or hard links or special devices. `/app/data` and `/app/tools` are read-only. Internet access is prohibited, including direct connections, proxies, external APIs and package repositories. Use the supplied local dependencies and data.\n\n\n## Interpreting crowding and horizon evidence\n\nA zero forecast, fixed risk profile, or persistence forecast is an admissible research answer. Report the limits of its claims. Apply the same fitting and selection rules, information clock, eligible cells and label maturity to the full and stock-channel-removed models; compare each of the four forecast horizons. Trace any carried fitted artifact to its declared public selection period and the actual prediction date. Separate model selection on permitted public observations from label availability for each prediction.\n\nCompare the risk rankings themselves when testing for differences across forecast horizons. The partial-rank diagnostic controls rank-linear association with one current-risk measure. A crowding mechanism requires a matched comparison appropriate to that claim; show weak or negative effects when the frozen program produces them. Do not deduct the quantitative forecasting loss a second time in evidence review.\n\nUse predeclared metric-specific feasible controls on identical eligible coordinates. Return temporal rank compares against zero compounded return. Volatility temporal rank compares against annualized sample standard deviation on the causal trailing 63-session prefix (minimum 42 finite, ddof=1; use frozen pre-2017 factor volatility when insufficient). QLIKE compares against the fixed pre-2017 per-factor volatility profile, broadcast to the same horizons. No blind-period choice of control is allowed. A required empty coordinate group is a host data failure. Keep native continuous QLIKE, report the sensitivity to its volatility floor, both full benchmark predictions and the matched stock-channel ablation. A matched rank improvement of 0.10 is one rank unit. For ratio-form variance QLIKE, one unit is log(2)−0.5, the loss for forecasting twice the true variance. Distinguish doubling the variance from doubling the volatility.\n\n## Market and data conventions\n\nUse the causal 63-session volatility comparator for risk ranks and the fixed development per-factor volatility comparator for QLIKE. Use zero returns for return ranks. Attribute any crowding claim with a matched refit on the same inputs and dates.\n\nDisclose native temporal rank scores and QLIKE, their matched differences and all contributions. A wholly unobserved required official cell is an infrastructure failure. Preserve untruncated QLIKE and the common volatility floor.\n\nPublish eligible and all-three-estimate coverage by month. Identify the risk-model estimation and crowding-panel universes separately. The organizer must document the vintage-specific provider default for unlabelled estimate currency with USD reporting currency, or restrict the affected signal to explicit observation currency and recheck the frozen coverage. Report explicit-currency sensitivity.\n\nGrade the documented timing, matched stock-channel ablation and horizon attribution independently of the objective score. Accept truthful null findings with a traceable final artifact.\n\nReport maturity, observed coordinate counts, calendar deletion, predeclared current-risk regimes and horizon-rank concordance. Treat block intervals as descriptive when independent blocks are sparse.\n\n## Objective score\n\nReturn ranks: zero forecast. Risk ranks: trailing 63-session annualized sample volatility at the origin (ddof=1, minimum 42 finite returns; frozen pre-2017 per-factor fallback). QLIKE: frozen pre-2017 per-factor volatility. Same dates, eligibility, four horizons and weights.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.35 × Δreturn_rank_correlation / 0.1 +0.35 × Δvolatility_rank_correlation / 0.1 −0.30 × Δvolatility_qlike / 0.193147.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Using the supplied factor panel, reconstruct an origin and its four future blocks, their timestamps and observed coordinates. The organizer verifies upstream filings, historical estimate currencies and the broader estimation universe.\n2. Compare static, simple updating and crowding-ablated forecasts separately across the four horizons.\n3. Account for overlapping origins in dependence estimates and exclude immature validation labels.\n", "rubric_path": "tasks/B04/rubric.json"} +{"display_order": 3, "task_id": "B05", "title": "Does a fast exposure belong in the US equity risk model?", "category": "risk_modeling", "instruction": "# Does a fast exposure belong in the US equity risk model?\n\nResearch area: Risk modeling and management.\n\nOur US equity book can pick up a common exposure between industry or balance-sheet updates. If stocks with similar recent trading histories start moving together, our risk reports may attribute too much of that move to individual names. Reacting to every price swing carries a cost as well. A characteristic that changes substantially within a week can force the desk to revise its risk estimates before it has evidence that the exposure travels across stocks.\n\nWe have room for one additional characteristic alongside the market, dated industry and ten style exposures. Develop a program that assigns a real-valued exposure to each eligible stock at the close. The central test is whether factor returns estimated on one group of stocks explain subsequent daily moves in other stocks carrying the same exposure. Factor returns can have either sign. We want to know what the characteristic adds over the next few sessions, how it fares in its weaker months and how much it changes in five sessions.\n\nYour hypothesis determines which histories and current characteristics belong together. Choose how to represent them and how to estimate the exposure. Compare your method with the sample standard deviation of the last 20 daily returns and investigate the assumptions that matter to your result. Support your recommendation with the full public experiment, including material sensitivities and periods when the evidence is mixed.\n\n## Decision clock and research sample\n\nThe decision is made after the close of the last US market session of each month. A second snapshot, taken five observed sessions earlier, measures how much the exposure has changed. Select the historical basket separately at each close from effective S&P 500 membership, then require a positive USD capitalization, a dated industry, ten finite style exposures and 252 consecutive observed daily returns. Order stocks by descending capitalization, breaking ties by security code. The number of eligible stocks varies. Security codes distinguish share classes and persist across verified ticker changes. Future membership and future mark availability have no role in this selection.\n\nAt each decision the program receives the 252 session dates and corresponding stock returns, their equal-weight daily market return for that snapshot's basket, and the current industry, cap and style values. Date strings follow the America/New_York market calendar. A return of 0.01 means one percent. Daily returns include splits and cash distributions. Annual financial reports and dated class observations enter from the next market session. The style columns in order are Size, NonlinearSize, Beta, Momentum, ResidualVolatility, Liquidity, BookToPrice, EarningsYield, Growth and Leverage.\n\nPublic research origins run from January 2016 through November 2022. Use origins before 2019 for initial research. Full public evaluation uses January 2019 through November 2022 and quick evaluation uses the final twelve of those origins. A response window contains the next 20 market sessions and matures after the twentieth close. A missing future return is marked as zero for the attribution ledger and carries a missing-mark flag. This convention measures variation among observed marks. It gives no estimate of the economic loss on exit.\n\nFreeze global choices after public research. The program may fit on the current snapshot using observations available by its decision close. Each invocation starts a fresh process. The provenance mode is `fixed_rules`. Packaged learned weights, stored responses and date or security lookup predictions are inadmissible. Replay repeats predictions on inputs with extra rows dated after the decision. Absolute differences above 1e-8 invalidate the program. The verifier supplies only inference fields to the process, including in hidden replay. It opens the future response window in the separate attribution calculation after obtaining the exposures.\n\n## Program contract\n\nWork in `/app/work`. The field dictionary and public reader are in `/app/tools/data_contract.md` and `/app/tools/panel.py`. Submit `/app/submission/main.py`, `provenance.json`, `experiment_summary.json` and any local code the program imports. The entry point is `python main.py --input /input/snapshot.npz --output /output/prediction.npz` with working directory `/app/submission`. Load arrays with `allow_pickle=False`. The input keys are `asof`, `dates`, `returns`, `market_return`, `codes`, `cap`, `industry` and `styles`. Rows of returns index dates and columns index codes. The current stock-level arrays follow the order in `codes`. The output NPZ contains exactly `codes` in the supplied Unicode order and one finite real `exposure` per code. Magnitudes may be at most 1e6. Integer and floating point arrays are accepted. Booleans, complex numbers and missing entries are invalid. Use a single regular file with one link and at most 8 MiB on disk and uncompressed. Diagnostics may be written to stderr.\n\nGive `provenance.json` a nonempty `description` of the fixed procedure. Use the JSON experiment record to explain the hypothesis, comparisons, full public results, sensitivities and limits of your conclusion. It must be an object with finite numbers within 2 MiB. Keep the entire submission within 256 MiB in ordinary files. The service returns structured invalid feedback for malformed submissions, candidate errors and timeouts.\n\n## Attribution experiment and objectives\n\nAll calculations below use float64. At each snapshot, let w_i = sqrt(cap_i)/sum_j sqrt(cap_j). The background design B contains a dummy for every current industry and the ten current styles. The complete industry dummies span the market intercept. This is the fitted-return space of a market-plus-industry regression with industry-cap-weighted factor returns summing to zero; the two representations give the same fitted stock returns. Least squares uses singular-value cutoff `rcond=1e-10` and objective sum_i w_i residual_i².\n\nNormalize the submitted characteristic x by clipping it to median(x) ± 5*median(abs(x−median(x))). Skip clipping when MAD is at most 1e-12. Regress x on B with the stated weights and retain the residual. Divide that residual by sqrt(sum_i w_i residual_i²), or use a zero vector if this norm is at most 1e-10. Denote the resulting exposure z. Apply this operation independently to the current and five-session-earlier baskets. Overall sign and scale have no scientific meaning. A constant or background-redundant exposure represents no added risk dimension.\n\nWithin each industry, sort stock codes by the hexadecimal SHA256 of their UTF-8 code and assign successive stocks to folds 0, 1, 2 cyclically. For each future session s and each fold, fit stock returns on B using the other two folds and predict the held-out fold. Repeat with [B,z]. Training-fold weights retain their relative values; a common rescaling does not affect the solution. Call the held-out errors e0_si and e1_si. Exposures stay fixed throughout the next 20 sessions. The future returns used to estimate each session’s factor coefficients are evaluation responses: they are never supplied to the exposure program. This measures out-of-sample cross-stock common-return explanation, not forecasting the sign of factor returns.\n\nFor origin t and h in {1,5,20}, define g_t,h = 1 − sum_{s=1..h,i} w_i e1_si² / max(sum_{s=1..h,i} w_i e0_si², 1e-16). The first core metric `short_gain` is the equal-origin mean of g_t,5. Higher is better; it is dimensionless, with 0.01 meaning a one-percent reduction in held-out squared error. To test whether an exposure removes common rather than isolated variation, let sigma_i be max(0.005, the sample standard deviation of the latest 63 historical returns). Define A^k_si = sqrt(w_i)*ek_si/sigma_i and C^k = (A^k)^T A^k/20. Let D_k = sum_{i != j}(C^k_ij)². The second core metric `dependence_gain` is the equal-origin mean of 1 − D_1/max(D_0,1e-16). Higher is better. This is off-diagonal second-moment energy, with no time centering, and is dimensionless. It measures residual dependence after total held-out error has already been assessed.\n\nThe third core metric `lower_quartile_gain` is the 25th percentile of g_t,5 across origins, using NumPy’s linear quantile interpolation. Higher is better, in the same units as `short_gain`. It gives material weight to weak periods rather than measuring only average fit. For the fourth metric, align the normalized current and earlier exposures on common stock codes. Compute their ordinary cosine c_t. If both vector norms are at most 1e-12 use c_t=1; if just one norm is zero use c_t=0. Otherwise use the dot product divided by the product of norms. `refresh_distance` is mean_t(1−min(1,abs(c_t))). Lower is better; it is dimensionless. This sign-invariant exposure refresh measure does not include portfolio turnover or trading costs.\n\nCompute each metric for the candidate and the declared 20-session volatility comparator on identical held-out stock folds and origins. The comparison applies to all four terms including refresh. Average and weak-period gains share a response. Publish both and their correlation. One unit is 10 percentage points of held-out error reduction, 20 points of residual dependence reduction, or one unit of sign-invariant refresh distance.\n\nPublic feedback returns all four raw metrics, origin and calendar-year results, 1/5/20-session gains, positive-gain frequency, and stress diagnostics using each origin’s five largest background-error sessions. It also reports exposure cosine and orthogonality, maximum exposure, missing future marks, 20-session rank IC and decile returns, and full-sample daily factor-return and conventional WLS t-statistic diagnostics. These additional diagnostics carry no numerical weight. They are attribution and association statistics; the task places no orders and makes no assumptions about borrow availability, fees, slippage or executable strategy P&L.\n\nUse the public `evaluate` tool with `mode` equal to `quick` or `full`; `program_id` is implicitly `submission`. The service freezes your current bundle before computing feedback and records the returned measurements. It permits 60 quick and 30 full evaluations per session. A quick evaluation is a shorter diagnostic interval, not a substitute for full validation. `/app/tools/check_output.py` checks one local output, and `/app/tools/prepare_starter.py --dest PATH` writes the declared comparison in the same submission format.\n\n## Resources\n\nThe environment supplies Linux, Python 3.12, NumPy, pandas, SciPy, PyArrow and scikit-learn. Research has 2 CPU cores, 3 GiB memory and four hours. A replay has 2 CPU cores, 3 GiB memory, at most 96 processes/threads and 120 seconds per invocation. Full evaluation, including all fresh invocations and diagnostics, has 3600 seconds. `/app/data` and `/app/tools` are read-only. This task prohibits internet access, including direct connections, proxies, external APIs and package repositories. Use the supplied data, tools and installed dependencies.\n\nFor short error and off-diagonal dependence separately, fix the valid origin mask from the common background model. Exclude origins whose relevant background energy is at most 1e−16, for both the submitted exposure and the 20-session volatility control. Report both counts, retain the published fold identities and maturity rules, and use 0.20 as one unit of common-dependence-energy improvement.\n\n## Market and data conventions\n\nsnapshot.market_return is the equal-weight history of names eligible at that snapshot. The supplied style beta uses a separate daily historical-membership proxy. Keep both distinct from the official S&P 500 return. Report each snapshot’s coverage and the identifiers shared with the five-session-earlier snapshot.\n\nReport zero-mark fractions by origin, industry and test fold, alongside attribution on the common observed cells. State that held-out scores describe the marked-return attribution experiment; economic terminal losses require verified proceeds.\n\n## Objective score\n\n20-session sample volatility supplied through the same exposure normalization, fold assignment, future response and calendar.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.45 × Δshort_gain / 0.1 +0.35 × Δdependence_gain / 0.2 +0.15 × Δlower_quartile_gain / 0.1 −0.05 × Δrefresh_distance / 1.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Keep evaluation stock folds and outcome dates identical for background, 20-day volatility and the proposed exposure.\n2. Ablate or permute the proposed characteristic within industry; distinguish error reduction from lower off-diagonal dependence.\n3. Explain sign-invariant refresh, weak-origin behavior and the limits of any trading interpretation.\n", "rubric_path": "tasks/B05/rubric.json"} +{"display_order": 4, "task_id": "B08", "title": "A daily covariance forecast for the US equity hedge book", "category": "risk_modeling", "instruction": "# A daily covariance forecast for the US equity hedge book\n\nResearch area: Risk modeling and management.\n\nAt month-end we need to hedge each stock in our S&P 500 book with positions in its peers. We have about twice as many eligible names as days in the estimation window. Even an exact fit to the past year leaves many possible hedges for the coming month. Our current estimator pulls each pairwise correlation halfway toward the marketwide average. That stabilizes the inverse, but it can give two stocks with very different industry exposures much the same role in a hedge.\n\nThe same forecast goes to a portfolio manager who must hold the benchmark's sector exposures. A change in the dependence estimate can improve individual hedges and still leave that portfolio with a concentrated short position. A change in the level of all variances can alter our estimate of daily risk while leaving every hedge weight unchanged.\n\nBuild one deterministic program that forecasts the conditional daily covariance matrix for the next calendar month. Decide which relationships in the trailing data deserve weight, how quickly they can change, and how to estimate them with a usable inverse. Assess the forecast on next-month returns and show which part of your method accounts for its performance.\n\n## Decision clock and data\n\nMake the forecast immediately after the last New York exchange close of the month, including early closes. At that point membership, closing bars and the supplied filing-derived observations are available. Inference receives a fresh snapshot of up to 250 sessions ending at that close. A security needs effective historical membership, a verifiable dated industry, a traded close with a valid return at the decision and at least 200 valid returns in that window. All eligible listings require a forecast, including those with zero study-benchmark weight.\n\nThe public panel in `/app/data` begins on January 2, 2013. Develop on the early history. Full public evaluation covers 60 complete return months from January 2016 through December 2020. Quick evaluation covers the final 12. Final evaluation runs the same program on an unseen chronological continuation. The December 2020 close is public. Each next-month observation enters a score only after its close. Only the dated snapshot may enter inference. Fit the rule afresh on every call and preserve the ordering of both matrix axes under a permutation of securities.\n\nDaily inputs include simple close-to-close total returns, high/low ranges, dollar volume, share turnover and the study benchmark return. The snapshot also gives dated industry groups and study-benchmark weights. That benchmark holds eligible names with identifiable reported share counts in proportion to their estimated dollar capitalization at the close. It is an investable research basket with its own coverage. See `/app/tools/data_contract.md` for field definitions, stale observations, class treatment and the distinction between monthly holdings and the daily market series.\n\n## Evaluation\n\nLet $R$ contain the next calendar month’s $H$ daily returns on the $N$ listings in the origin snapshot. Keep that cohort through month-end, including subsequent index exits. For a missing daily observation, record no measured payoff on that leg and use a zero mark solely for the fixed gross marked hedge/GMV calculation; exclude this cell from the QLIKE observation mask. Exclude that stock-day as a hedge target. Missing terminal consideration is unobserved. These conventions define a gross marked-payoff experiment. Short availability, trading costs and a cash rate are outside the portfolio calculation.\n\n1. **Peer-hedge R²** measures the fraction of realized target-stock squared return removed by the implied hedge. With $K=\\hat\\Sigma^{-1}$, the peer coefficient on $j$ for target $i$ is $-K_{ij}/K_{ii}$ and the residual is $e_{ti}=(RK)_{ti}/K_{ii}$. Pool observed target cells across all months and compute $1-\\sum e_{ti}^2/\\sum R_{ti}^2$. Higher is better.\n2. **Gaussian QLIKE** uses the daily marginal Gaussian covariance on actually observed payoffs, averaged by day and then by complete month, as defined below. Lower is better. The Gaussian loss can be negative.\n3. **Constrained GMV Sharpe gain** compares two portfolios formed on the same date. For the security-by-sector indicator matrix $G$ and dated study weights $b$, minimize $w^\\top\\hat\\Sigma w$ subject to $G^\\top w=G^\\top b$. The solution is $w=KG(G^\\top KG)^{-1}G^\\top b$. Signed weights are permitted. Compute daily payoffs $Rw$ at fixed origin exposures. Subtract the annualized Sharpe of the declared baseline portfolio from the forecast portfolio’s Sharpe on the pooled daily series. Sharpe equals $\\sqrt{252}$ times the mean divided by the sample standard deviation, with value zero for fewer than two days or a standard deviation of at most $10^{-12}$. Higher gain is better.\n\nThe baseline centers 250 sessions of daily returns after zero filling, keeps the sample variances, and shrinks the sample correlation matrix 50% toward a constant off-diagonal correlation equal to its average. The exact variance floor, correlation bounds, spectral repair and diagonal normalization are in `/app/tools/estimators.py`.\n\nScore the submitted covariance against the same-date 50%-constant-correlation benchmark on the identical origin cohort, maturity window and observation mask. Pool the peer-hedge residual and target sums of squares for R². Let L be the equal-month mean of each daily observed-marginal Gaussian loss in daily decimal-return units. Use Q=0.60(R²−R²b)/0.50+0.40(Lb−L)/1.00. A unit represents 50 percentage points of additional hedge R² or 1.00 point of per-name Gaussian loss improvement. Negative native losses are valid. Report sector-constrained GMV gross Sharpe gain, exposure, beta, leverage and concentration as diagnostics with no additional score. Report missing, zero-marked and exit observations separately by month; explicitly label results as gross marked payoffs. A full period without positive total target sum of squares or paired finite losses is not gradeable; mark the data window for repair.\n\nCompute Q from the two matched risk-forecast measurements. Keep native values and the paired differences. The gross GMV Sharpe diagnostic has zero objective weight.\n\nIn feedback, `metrics` contains submitted minus baseline R², submitted minus baseline QLIKE, and the native GMV Sharpe gain, respectively. Lower signed QLIKE is better. `diagnostics.scoring` gives the native observations, numeric origins, components after applying direction and unit, and quantitative composite. Yearly results use each year’s matched baseline. Diagnostics also report gross exposure, largest absolute weight, sum of squared weights, market beta, realized risk versus the basket and a diagonal volatility control. Compare dependence estimates at the same marginal variances when attributing gains to peer structure. When attributing a Sharpe gain to risk estimation, inspect yearly Sharpe and exposures. Report sensitivity to an important choice and state the period your conclusion covers.\n\n## Program and research workflow\n\nUse `/app/work` for research. The offline environment has Python 3.12, two CPUs, 4 GiB of memory and four hours of active research time. Internet access is disabled. Install one self-contained program at `/app/submission` with these files:\n\n- `main.py` is the entry point. Additional local Python modules are welcome.\n- `provenance.json` contains `mode` equal to `fixed_rules` and a nonempty `description` of the rule.\n- `experiment_summary.json` records the `mechanism` and `conclusions` as nonempty strings and `experiments` as a list. Include the dated comparisons supporting the main claim.\n\nThe bundle limit is 256 MiB. Use regular files. The entry point is limited to 4 MiB and each required JSON file to 2 MiB. Keep saved predictions, links and fitted binary objects outside the submission. Each fresh process starts in the installed program directory and discards its temporary state after one month-end call. Each call runs `python main.py --input snapshot.npz --output prediction.npz` with a 120-second limit. Write uncompressed `np.savez` output of at most 16 MiB with exactly `codes` (one Unicode ID for each eligible name, unique) and `covariance` (finite real $N\\times N$ daily return covariance). Both axes correspond to the output IDs. Symmetry error must be at most $10^{-5}\\max|\\hat\\Sigma|$, every variance must lie in $(10^{-11},1]$, the minimum eigenvalue must exceed $10^{-11}$ and the spectral condition number must be at most $10^8$. A missing file, bad archive, invalid matrix, failed process or inference timeout produces a structured invalid submission result. A missing evaluation input is an evaluation error. The evaluator repeats inference and permutes security inputs. For both checks every compared entry must differ from the original by at most $10^{-10}+10^{-6}|\\hat\\Sigma_{ij}|$. The permutation check first realigns both axes and also requires a flattened correlation of at least 0.999. The repeat check uses only the entrywise test.\n\nTo exercise the starter in an empty submission directory:\n\n```bash\ncd /app/work\npython /app/tools/make_starter.py --dest /app/submission\npython /app/tools/make_snapshot.py --mode quick --output snapshots\nmkdir -p forecasts\nfor s in snapshots/*.npz; do\n python /app/submission/main.py --input \"$s\" --output \"forecasts/${s##*/}\"\ndone\npython /app/tools/local_check.py --mode quick --predictions forecasts --output quick.json\n```\n\nUse `--asof 2018-06-29 --output snapshot.npz` for an individual snapshot. The local scoring check in `/app/tools/test_scoring.py` compares the closed-form constrained weights with a direct optimization-system solve. Local checks are unlimited. Call the workspace `evaluate` tool with `{\"mode\":\"quick\"}` or `{\"mode\":\"full\"}` to replay the executable. You have 60 quick and 30 full evaluations. Each complete replay has a 7,200-second limit. Check the final program in full mode.\n\nFor each realized session d, freeze O_d, the listings with an observed economically valid payoff, before reading a forecast. For O_d nonempty, take the principal covariance submatrix Σ[O_d,O_d] (not the corresponding block of full precision) and compute [logdet Σ_O + r_O' solve(Σ_O,r_O)]/|O_d|. Average valid days equally within each complete month and weight months equally. If a required month has no measurable day, record an incomplete evaluation and withhold the full-split reward. Use the same O_d for the frozen benchmark, report per-day observed counts, and verify equality to the original full-matrix loss on complete panels. Keep zero terminal consideration when economically documented.\n\n## Market and data conventions\n\nThe historical S&P 500 supplies the member universe. Industry targets and the daily market proxy use our eligible, dated study-capitalization weights; neither is the official index portfolio or index return. GMV results are gross marked payoffs with signed positions. Report leverage, turnover or rebalancing assumptions, and terminal/missing-return coverage before interpreting Sharpe.\n\nUse only complete next-calendar-month holding periods. Check the last observed session against a frozen exchange calendar and verify expected session coverage; if a final shard ends early, omit that origin and log the omitted dates.\n\n## Objective score\n\nBaseline 250-session sample variances with 50% constant-correlation shrinkage; the same months, names and observed hedge targets on both sides.\n\nFor each metric, Δ denotes the candidate native observation minus the matched control observation in the same unit and on the same sample. Metrics already supplied as paired improvements use zero as their control input.\n\nQ = 0.60 × Δpeer_hedge_r2 / 0.5 −0.40 × Δqlike_loss / 1.\n\nAll units are decimal fractions or the native dimensionless statistics specified above. Weights express marginal utility for one declared unit. Report native values, baseline values and each term.\n\n## Research evidence and final score\n\nEach objective term compares your program with its designated control on the same observations. The signed sum of these terms is Q. We assess the same-window baseline and the submitted program under the same research criteria. For each, the maximum deduction is 0.30 raw units. The final score is Q minus the submission deduction plus the baseline deduction. Report the signed result at full precision. An invalid final submission receives zero.\n\nThe review covers alignment with the economic task (55%), integrity of the measured improvement (15%), and consistency and rigor of the final research evidence (30%). Ground each claim in the submitted program, observations or reproducible calculations. The review gives full consideration to supported negative findings and alternative methods. Verified prediction-time leakage or interference with evaluation invalidates the affected final answer.\n\n1. Validate matrix order and SPD; compare the same observed target cells against the shrinkage baseline.\n2. Hold marginal variances fixed when attributing changes to correlation; reconcile hedge error, logdet and trace terms.\n3. Disclose missing marks, exit sensitivity, leverage and sector residuals; qualify conclusions about investability.\n", "rubric_path": "tasks/B08/rubric.json"} +{"display_order": 5, "task_id": "B22", "title": "When should a fixed order trade?", "category": "Quantitative trading and execution", "instruction": "# When should a fixed order trade?\n\nResearch area: Quantitative trading and execution.\n\nA portfolio manager has signed off on the stock, side, quantity and deadline. The execution desk still has a choice at each quarter hour: cross the spread while shares are available, or leave some of the order working into a later window. A stock can print plenty of volume over the day and offer very little size when the desk needs it. Waiting also leaves the portfolio exposed to a position it was supposed to change.\n\nBuild one policy that updates a distribution for trade volume and decides how much of the outstanding order to request now. Establish how much a change in the forecast saves when the scheduling rule stays fixed, and how much the scheduling rule contributes with the same forecast. The desk cares about the expensive parents as well as the average one.\n\n## Orders and information clock\n\nThe panel covers USD common shares in US regular trading hours, New York time. Each stock-date generates two independent parent sizes, 0.2% and 1% of its mean **eligible regular-session share volume** over the previous 20 complete sessions, rounded down with a one-share minimum. The desk releases the order at 09:45 against the then-visible midpoint. Decisions begin at 10:00 and recur every 15 minutes. Some orders expire at that close and the others at the next session's close. There are 24 or 50 decisions. The second session starts at 09:30. Its opening time and the deadline are known at release. Market holidays follow the tape's exchange sessions. The panel uses full sessions.\n\nFixed orders require a usable release quote, matched recorded tape through cleanup and 20 sessions of history in a common share unit. A recorded slot with no qualifying trade has zero volume. A split during the history or order window breaks comparability. USD prices and share counts use the traded units on the tape. The dated USD common-stock directory is checked against the legal instrument name and contemporaneous security identity before orders are formed. The two size scenarios and the two sides each draw on their own copy of external liquidity.\n\nEach buy/sell pair receives the same anonymous snapshot and submits one fraction of its remaining balance. The desk's position instruction is fixed outside the policy. Public progress advances using the smaller of bid and ask capacity. Actual side-specific balances, fill prices, returns and fees stay in separate ledgers. After a slot closes, its external volume and its effect on the common balance become visible. Continue forecasting through expiry even when the common balance reaches zero.\n\n## Policy interface\n\nPlace a self-contained Python module at `/app/submission/main.py`. Implement `forecast(snapshot)` and `allocate(snapshot, quantiles)`. With B parent sizes and H remaining slots including the current one, return finite NumPy-compatible arrays of shape (B,H,3) and (B,), respectively. The forecast gives ordered, nonnegative 10th, 50th and 90th percentiles in shares for each slot. The allocation is a fraction in [0,1]. The ledger rounds the fraction times each side's actual remaining quantity down to whole shares. Each call receives a dictionary of arrays. For example, with two sizes and 24 slots, forecast returns (2,24,3) and allocate returns (2,). Use real integer or floating-point outputs. Boolean, missing and infinite values and incorrect shapes are invalid. Each callback receives its own writable copies of its arguments. The evaluator scores the forecast returned by the forecast callback. Rows stay aligned within an issue session.\n\n| Field | Shape and meaning at the decision |\n|---|---|\n| `asof`, `slot` | Each has shape (1,). UTC Unix seconds and the current regular-session slot index, 0 through 25. |\n| `quantity`, `remaining`, `low_liquidity` | (B,). Original shares, neutral remaining shares, and a release-time flag for eligible ADV below 200,000 shares. |\n| `spread_bp`, `depth`, `quote_age` | (B,). Full spread of the latest quote update in bp of midpoint, smaller displayed side in shares, age in seconds. An ineligible, missing or over-15-minute-old update has values −1, 0, −1. |\n| `today_volume`, `history_volume` | (B,26) and (B,20,26), in shares. Today's completed slots followed by zeros, and the 20 completed session paths oldest first. |\n| `mean_volume`, `curve_quantiles` | (B,H) and (B,H,3). Same-clock historical mean and empirical quantiles from those paths, repeated by clock for a second day. |\n| `spread_profile`, `depth_profile` | (B,H). Historical mean executable full spread in bp conditional on a qualifying first quote, and mean smaller displayed size in shares including zero-capacity slots. Unobserved spread history uses 100 bp. |\n| `risk_mass`, `bar_variance` | (B,H). Frozen release-time variance times duration for the remaining slots, and a rolling historical mean squared log price change from first open to last close of available minute bars in each slot. Missing bar history falls back to the slot midpoint variance. |\n| `consolidated_adv`, `ex_today`, `ex_next` | (B,). Mean reported whole-day volume over available observations in the prior 20 sessions (zero if absent), and dividend ex-date flags for this and the next session using declarations strictly before today. |\n\nDevelopment history runs from 2026-06-01 through 2026-10-06, with 584 paired parents issued from 2026-06-30 through 2026-10-02. The development file at `/app/data/market.npz` includes outcomes for local experiments. Its `days` and `names` index the daily arrays, whose last axis is the 26 regular-session slots. `orders` lists issue-day and stock index pairs. The public replay code in `/opt/execution/market.py` constructs snapshots and ledgers. From Python, add `/opt/execution` to the import path, load the file with `market.load`, iterate `market.episodes(tape)` and call `episode.run(your_module)`. Develop in `/app/work` without internet access. The research environment provides two CPUs, 3 GiB of memory and four hours.\n\nUse fixed rules or fit within the supplied historical snapshot. Keep persistent fitted artifacts and issuer/date-specific outcome lookups out of inference. The evaluator starts a fresh offline process for each issue date and replay path. Each process starts in the installed submission directory with Python and NumPy. Module state may persist within a path. Each function must also work when the other component is supplied by the desk. A callback has 15 seconds, including the submission import on its first call. Across a replay, all worker requests share 1,380 seconds of response time, including component swaps and stress runs. The evaluator has 1,500 seconds overall. The bundle limit is 256 MiB. Invalid files, outputs and candidate timeouts receive a structured failure and zero improvement. A missing evaluation input interrupts replay. Full feedback evaluates the complete development panel and the two component swaps. Quick feedback uses every sixth issue session and the joint policy. Request either with the public evaluate tool and `mode` set to `quick` or `full`. Final replay uses different securities on later dates.\n\n## Fill and settlement ledger\n\nEligible trades have positive size and price, an uncorrected record and regular execution conditions. Eligible two-sided SIP quotes have positive prices and displayed size, ask at least bid and firm quote conditions. Eligible trades have empty conditions or a subset of 0, 3, 14, 37, 41. A quote must carry the regular two-sided condition 1. It may also carry CQS-generated flag 94 on tapes 1 and 2 or SIP-generated flag 82 on tape 3. These rules apply to snapshots, fills and terminal prices. Sequence number resolves equal quote receipt times. No executions take place outside the regular session.\n\nUse the first qualifying quote at least one second after the decision and before slot end. A buy pays the ask and a sell receives the bid. Fill up to the requested shares, displayed size on that side and 5% of eligible tape volume from that quote through slot end, rounded down. A missing fill quote gives zero capacity. The book charges 0.5 bp of actual fill value. Displayed liquidity is taken once per side and slot. Impact is represented by the spread and capacity constraints on an exogenous tape.\n\nAt expiry charge 25 bp on every late share valued at the release midpoint, once. Carry all late shares into the next trading day's opening two slots with the same fill, capacity and fee rules and a request for the entire balance each time. Mark any shares still outstanding at the last observed eligible side price through cleanup, multiplied by exp(3sσ), where s is +1 for buys and −1 for sells. Here σ is the release estimate of half-hour volatility, the square root of the sum of the first two slot variances. This terminal mark has no fill fee. Report the valuation interval using exp(−3sσ) for the other endpoint.\n\n## Measurements\n\nThe comparison schedules in proportion to the previous 20 sessions' mean same-slot volumes over the remaining window. Its three forecasts are the corresponding linearly interpolated historical quantiles. For the forecast-only replay, the same scheduler tilts each historical mean by (submitted median + 1)/(historical median + 1) before normalizing. A zero weight sum uses equal time. For the schedule-only replay, your allocator receives the historical quantiles. All methods face identical fixed orders and settlement rules.\n\nFor each metric the evaluator reports the policy's native loss and its matched baseline loss. Smaller is better. Its scoring metric is policy loss minus baseline loss. The quantitative raw score sums the **negative** of each such difference divided by the unit below, multiplied by the weight. Each parent size counts once. Average the two side results before aggregating across parents.\n\n| Metric | Native loss | Unit | Weight |\n|---|---|---:|---:|\n| `shortfall_bp` | For side s, 10,000 × [s Σ q(P−P₀) + dollar fees including the late charge] / (QP₀). P₀ is the release midpoint and Q includes every share, including cleanup and terminal valuation. Average the signed shortfalls. | 200 bp | 0.50 |\n| `tail_bp` | Pool large parents and those flagged low liquidity, counting each once. Average the largest ceil(N/5) paired parent costs in that pool. Each policy has its own upper tail. | 600 bp | 0.20 |\n| `risk_ratio` | Sum (remaining side shares/Q)² times slot risk mass through the deadline and divide by the same sum of risk masses for a fully unexecuted order. Include full exposure between release and first decision. Use post-fill inventory for each decision slot. | 0.50 | 0.20 |\n| `volume_pinball` | For level p and e = (realized shares − forecast shares)/max(1, historical same-slot mean shares at decision), use max(pe,(p−1)e). Average equally over levels and remaining slots at each decision, then decisions within each parent and finally parents. | 0.08 | 0.10 |\n\nRisk masses are integrated 15-minute variances estimated from valid same-clock squared log midpoint changes in the 20 sessions before release. The first slot uses the second slot's variance. A missing estimate falls back to the stock's pooled intraday variance, with a floor of 10⁻¹⁰ per slot. For a cross-session order, add the historical mean squared overnight change from final-slot midpoint to next opening quote to the closing inventory's risk mass. Missing overnight history uses the mean slot variance. The risk clock and its denominator stay fixed for the order.\n\n## Research record\n\nSubmit `provenance.json` with `mode` equal to `fixed_rules`, `model_files` equal to an empty array, and a description of the inputs and their availability. Include one `experiment_summary.json` object that explains the policy, reports dated validation, and relates forecast improvements to money saved under the component swaps. Use the side, large-order tail, low-liquidity, same-session, overnight and volume-drought results to explain where the policy left shares outstanding. The drought diagnostic flags a future slot with volume below one tenth of its decision-time historical mean. The assigned-side diagnostic uses one predetermined simulated parent direction per stock, date and size. Quantify the sensitivity of the conclusion to timing or capacity. Full feedback also reports a 60-second delay and a 2.5% participation cap separately on the quick sample. Supply your final files in `/app/submission`.\n\n## Final scientific review\n\nFinal review uses the frozen executable code, fitted artifacts, validation materials and submitted explanations. The quantitative composite Q retains its full declared weights. Review severity S weights task alignment at 0.55, metric integrity at 0.15 and the consistency of final research evidence at 0.30. Each severity lies in [0,1], with 0 for no evidenced defect, 0.25 for a localized material defect, 0.5 for a substantial defect, and 1 for a fundamental defect. For each nominated answer use Q_adjusted = Q - 0.3*S, average adjusted raw scores equally across answers, then apply the common reward mapping once. Baseline, reference and model submissions use the same criteria. Critical invalidity concerns demonstrated prediction-time information leakage in the final executed path or final fitted artifact, or evaluator tampering. The affected answer receives the declared zero-improvement fallback. The review checks the forecast and plan against the anonymous decision history, reconciles claims to both full-parent ledgers, and compares the dated component swaps and execution stresses cited in the research record.\n", "rubric_path": "tasks/B22/rubric.json"}