F5-conf-01 — Competitive equilibrium of a two-agent, two-good exchange economy
Scientific question
Two 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.
Inputs
data/endowments.csv— columnsagent(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).data/parameters.csv— columnsparameter,value,description: the preference parametersalpha_A,alpha_Band the aggregate endowments of each good as recorded in the summary sheet that accompanied the exercise (aggregate_endowment_good1,aggregate_endowment_good2).
Information-availability rules
- Use only the two files under
data/. - 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.
- Report in
data_issuesevery problem you detect in the inputs and how you handled it.
Required outputs
out/results.jsonwith the keys:
| key | type | unit | meaning |
|---|---|---|---|
task_id |
string | — | "F5-conf-01" |
price_ratio_p1_over_p2 |
number | — | closed-form equilibrium relative price p1/p2 |
x1_A, x2_A, x1_B, x2_B |
number | units of goods | equilibrium consumption of each good by each agent |
excess_demand_good1 |
number | units of good 1 | aggregate excess demand for good 1 at the reported price (demand minus aggregate endowment) |
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 |
aggregate_endowment_good1 |
number | units of good 1 | aggregate endowment of good 1 used in the market-clearing condition |
aggregate_endowment_good2 |
number | units of good 2 | aggregate endowment of good 2 used in the market-clearing condition |
price_ratio_numerical |
number | — | equilibrium price found by the independent numerical root-finding (the baseline check) |
feasibility |
string | — | "complete", "partial" or "infeasible" |
feasibility_reason |
string or null | — | explanation if not complete |
data_issues |
array of {"issue","handling"} | — | data problems detected and how handled (empty list if none) |
n_input_rows |
object | — | {"endowments.csv": rows read, "parameters.csv": rows read} |
n_analysed |
integer or null | — | number of agents in the equilibrium computation |
random_seed |
integer or null | — | seed used, if any |
out/report.mdwith 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.out/analysis.py— running~/wp29/venv/bin/python out/analysis.pyfrom the workspace root must regenerateout/results.jsonfromdata/only, deterministically.out/claims.json— a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}].
Constraints
- No network access. Python:
~/wp29/venv/bin/python(numpy, pandas, scipy, statsmodels available). Do not modifydata/. - This task is designed to be completed in well under 20 minutes of work.