SPB Git

spb/wp25_uqo

Public
3.0 KB · 42 lines latex
1\section{Replication instructions}2\label{app:replication}34The replication package is the git repository \texttt{wp25\_uqo} (UQO internal git; a public mirror will accompany5the journal version). Layout: \texttt{src/age/\{economy,agents,equilibrium,markets,banking,llm,experiments,analysis\}},6\texttt{scripts/} (numbered pipeline), \texttt{tests/\{unit,integration,property\}}, \texttt{docs/} (literature7matrix, model specification, parameter ledger, research log, limitations), \texttt{experiments/pre\_registration.md},8\texttt{results/}, \texttt{paper/}.910\paragraph{Environment.} Python $\ge3.11$ with numpy, scipy, pandas, matplotlib, sympy, jsonschema, numba, pyyaml,11httpx; pytest and hypothesis for tests. \texttt{pip install -e .} installs the package; \texttt{requirements.lock.txt}12pins the versions used for the paper (Python 3.14.4, numpy 2.4.4, scipy 1.17.1, numba 0.65.1 on macOS/arm64).1314\paragraph{Pipeline.}15\begin{lstlisting}16python3 -m pytest tests -q                      # 30+ tests incl. property-based ledger and zero-wedge tests17python3 -I scripts/01_download_data.py          # FRED/BEA/Fed DFA/Fernald/Shiller/SEC/EIA snapshots -> data/raw18python3 -I scripts/02_build_calibration_targets.py19python3 scripts/00_lq_derivations.py            # symbolic derivations (sympy)20python3 scripts/10_model_a.py                   # Model A results and figures21python3 scripts/20_model_b.py                   # Model B scenarios (about 5 minutes)22python3 scripts/30_model_c.py                   # Model C factorial + stress (20 seeds)23scripts/llm_serve.sh start; scripts/llm_tunnel.sh   # local inference servers (optional, for the LLM lab)24python3 scripts/35_llm_lab.py                   # LLM laboratory (replays from results/llm_cache if present)25python3 scripts/40_figures.py; python3 scripts/50_tables.py26cd paper && make                                # latexmk -> main.pdf27\end{lstlisting}2829\paragraph{Determinism.} All random draws are seeded; Model C uses common random numbers across cells; LLM calls30are cached content-addressed so that the LLM results replay exactly from \texttt{results/llm\_cache} without any31model server. The audit logs in \texttt{results/llm\_audit} record every call. Each experiment writes a manifest with32the git revision and package versions.3334\paragraph{Tests of the accounting identities.} \texttt{tests/property/test\_ledger.py} applies 100 random sequences35of up to 40 operations (dividends, interest, borrowing, repayment, trades, mark-to-market) and asserts after each36operation that holdings sum to supply, that the bank's balance sheet balances and that reserves change only through37injections; it also checks that defaults and bail-ins are explicit. \texttt{tests/unit/test\_tasks.py} checks Euler's38theorem on factor payments; \texttt{tests/unit/test\_lq\_map.py} checks the goods-market identity of the steady state.3940\paragraph{Data.} Raw files are not redistributed; \texttt{data/raw/README.md} and \texttt{data/raw/MANIFEST.json}41(URL, timestamp, bytes, sha256) allow re-downloading the same snapshots, subject to the providers' terms.42
Files · main
Menu

Theme