SPB Git

spb/wp29_uqo

Public
4.1 KB · 43 lines markdown
1# F1-conf-03 — Information-respecting analytic dataset for next-year default23## Scientific question4Estimate the association between a firm's leverage at the end of year t and its default in year t+1, using only information that was available at the end of year t. The estimand is the coefficient on `leverage` in the linear-probability model default_next = a + b1·leverage + b2·cash_ratio + b3·log_sales + e estimated by OLS on the firm-years whose outcome is observed, with standard errors clustered by firm. The analytic dataset must contain only predictors whose values were known at the origin year.56## Inputs7- `data/firm_panel.csv` — simulated data (synthetic firm-year panel; not observed data), 300 firms, years 2016–2022, one intended row per firm-year. Columns `firm_id`, `year`, `leverage`, `cash_ratio`, `log_sales`, `rating_2025`, `default_next`; definitions, units and the date at which each field becomes known are in `data/README.md` (codebook). Empty cells mean the value is not observed. The extract may contain assembly errors.89## Information-availability rules10- A variable may enter the model for origin year t only if its value would have been known at the end of year t (see the codebook's last column). Any variable that does not satisfy this rule must be excluded from the analytic dataset and listed in `variables_excluded`.11- Firm-years whose outcome `default_next` is not observed cannot be used for estimation and must be listed in the exclusion ledger; do not impute outcomes.12- Use only `data/firm_panel.csv`.1314## Required outputs15- `out/results.json` with the keys:1617| key | type | unit | meaning |18|---|---|---|---|19| `task_id` | string | — | "F1-conf-03" |20| `n_analysed` | integer | firm-years | observations in the estimation sample |21| `n_firms` | integer | firms | distinct firms in the estimation sample |22| `predictors_used` | array of strings | — | column names entered as regressors (excluding the intercept) |23| `variables_excluded` | array of {"variable","reason"} | — | columns of the file deliberately not used as predictors and why |24| `beta_leverage` | number | probability points | OLS coefficient on `leverage` |25| `se_leverage_cluster` | number | — | standard error of `beta_leverage` clustered by `firm_id` |26| `r2` | number | — | in-sample R² of the model |27| `default_rate` | number | — | baseline: share of firm-years with default_next = 1 in the estimation sample |28| `feasibility` | string | — | "complete", "partial" or "infeasible" |29| `feasibility_reason` | string or null | — | explanation if not complete |30| `data_issues` | array of {"issue","handling"} | — | every data problem detected and how it was handled (empty list if none) |31| `n_input_rows` | object | rows | {"firm_panel.csv": number of data rows read (excluding the header)} |32| `random_seed` | integer or null | — | seed used, if any |3334- `out/analytic.csv` — the estimation sample: one row per firm-year used, columns `firm_id`, `year`, the predictors used and `default_next`; exactly `n_analysed` rows and no column that violates the information rule.35- `out/exclusions.csv` — the exclusion ledger with columns `step`, `rule`, `n_before`, `n_after`, `n_removed`, `rationale`; one row per step from the number of rows read to `n_analysed` (`n_before − n_removed = n_after` on every row; each step's `n_before` equals the previous step's `n_after`). Column removals may be listed with `n_removed = 0`.36- `out/report.md` with the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues.37- `out/analysis.py` — running `~/wp29/venv/bin/python out/analysis.py` from the workspace root must regenerate `out/results.json`, `out/analytic.csv` and `out/exclusions.csv` from `data/` only, deterministically.38- `out/claims.json` — a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}].3940## Constraints41- No network access. Python: `~/wp29/venv/bin/python` (numpy, pandas, scipy, statsmodels available). Do not modify `data/`.42- This task is designed to be completed in well under 20 minutes of work.43
Files · main
Menu

Theme