1# F5-conf-01 — Competitive equilibrium of a two-agent, two-good exchange economy23## Scientific question4Two agents A and B trade two goods in a pure exchange economy. Agent i has Cobb–Douglas preferences u_i(x1, x2) = α_i ln x1 + (1 − α_i) ln x2 and an endowment (e1_i, e2_i). Good 2 is the numeraire (p2 = 1). The estimands are the competitive (Walrasian) equilibrium relative price p = p1/p2, the equilibrium allocation (x1_A, x2_A, x1_B, x2_B), the aggregate excess demand for good 1 at the equilibrium price (which must be zero), and the Walras' law residual p·z1 + z2 (value of aggregate excess demand, which must be identically zero). Derive the closed-form equilibrium, verify market clearing and Walras' law numerically, and validate the closed-form price by an independent numerical root-finding of the excess-demand function.56## Inputs7- `data/endowments.csv` — columns `agent` (A or B), `good1`, `good2`: individual endowments in units of each good. One row per agent. These are the primary data of the exercise (theoretical parameters, not observed data).8- `data/parameters.csv` — columns `parameter`, `value`, `description`: the preference parameters `alpha_A`, `alpha_B` and the aggregate endowments of each good as recorded in the summary sheet that accompanied the exercise (`aggregate_endowment_good1`, `aggregate_endowment_good2`).910## Information-availability rules11- Use only the two files under `data/`.12- The numerical validation must solve the market-clearing condition directly (root of the aggregate excess demand of good 1 in p), not evaluate the closed-form expression.13- Report in `data_issues` every problem you detect in the inputs and how you handled it.1415## Required outputs16- `out/results.json` with the keys:1718| key | type | unit | meaning |19|---|---|---|---|20| `task_id` | string | — | "F5-conf-01" |21| `price_ratio_p1_over_p2` | number | — | closed-form equilibrium relative price p1/p2 |22| `x1_A`, `x2_A`, `x1_B`, `x2_B` | number | units of goods | equilibrium consumption of each good by each agent |23| `excess_demand_good1` | number | units of good 1 | aggregate excess demand for good 1 at the reported price (demand minus aggregate endowment) |24| `walras_law_residual` | number | units of numeraire | p·z1 + z2 at the reported price, where z_g is the aggregate excess demand for good g |25| `aggregate_endowment_good1` | number | units of good 1 | aggregate endowment of good 1 used in the market-clearing condition |26| `aggregate_endowment_good2` | number | units of good 2 | aggregate endowment of good 2 used in the market-clearing condition |27| `price_ratio_numerical` | number | — | equilibrium price found by the independent numerical root-finding (the baseline check) |28| `feasibility` | string | — | "complete", "partial" or "infeasible" |29| `feasibility_reason` | string or null | — | explanation if not complete |30| `data_issues` | array of {"issue","handling"} | — | data problems detected and how handled (empty list if none) |31| `n_input_rows` | object | — | {"endowments.csv": rows read, "parameters.csv": rows read} |32| `n_analysed` | integer or null | — | number of agents in the equilibrium computation |33| `random_seed` | integer or null | — | seed used, if any |3435- `out/report.md` with the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues. State explicitly the assumptions behind the closed form (interior solution, strictly positive endowments, price normalisation) and the scope of the numerical validation.36- `out/analysis.py` — running `~/wp29/venv/bin/python out/analysis.py` from the workspace root must regenerate `out/results.json` from `data/` only, deterministically.37- `out/claims.json` — a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}].3839## Constraints40- No network access. Python: `~/wp29/venv/bin/python` (numpy, pandas, scipy, statsmodels available). Do not modify `data/`.41- This task is designed to be completed in well under 20 minutes of work.42