| name | build-table |
| description | Stage 3. Emit a LaTeX table of the regression coefficients. Triggers when state.stage == "regressed". |
Build table
Pre
Read state/state.json. Confirm state.stage == "regressed" and
state.artifacts.regression is populated.
Act
Ensure the output directory exists (mkdir -p tables), then emit a
booktabs-style LaTeX table to tables/main.tex:
\begin{tabular}{lcc}
\toprule
& Estimate & t-stat \\
\midrule
$\alpha$ (monthly) & {alpha} & ({t_alpha}) \\
$\beta_{MKT}$ & {beta} & ({t_beta}) \\
\midrule
$N$ & \multicolumn{2}{c}{ {n_obs} } \\
$R^2$ & \multicolumn{2}{c}{ {r2} } \\
\bottomrule
\end{tabular}
Round alpha and beta to 4 decimals, t-stats to 2.
Verify
- File exists
- Contains
\bottomrule
- Compiles with
pdflatex in a minimal scaffold (use scripts/check_table.tex)
If verification fails: halt.
Post
state.artifacts.table_path = "tables/main.tex"
state.stage = "tabulated"
Run python scripts/verify_state.py.