Economics ml
Structural AI for Macroeconomic IntelligenceFrom the repository description
npx -y skills add garroshub/ai-economist-skill --skill economics-mlAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- reads credentialsReads from 1 credential source: `FRED_API_KEY`.
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 6 commands, including `pip install -r requirements.txt` and 5 more.
SKILL.md
6.0 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Economics ML Skill
Use this skill for macroeconomic nowcasting, central-bank policy diagnostics, economics-oriented ML calibration, and validation reports.
Interface
Treat this as an agent skill first. A runtime installation should include this
file, requirements.txt, main.py, backtest_engine.py, and src/. Use the
bundled Python scripts when the user asks for a live run, fresh backtest,
regenerated dashboard snapshot, or reproducible artifact. For interpretive
questions, answer from the latest available report, snapshot, user-supplied
numbers, or cited public data.
Operating Principles
- Do not expose private keys, local machine identifiers, personal names, or unpublished private data in generated reports or dashboard text.
- Keep the structural economics model as the primary estimate.
- Use ML as an auxiliary calibration, measurement, nuisance-estimation, heterogeneity, or validation layer.
- Do not describe ML calibration as the main forecast.
- Keep causal language conservative. Separate measurement, prediction, association, identification, and policy evaluation.
- Treat boundary and discontinuity designs as nonparametric econometrics unless a specific ML method is actually used.
Default Agent Behavior
When answering a user request, produce an economist-style readout rather than a raw script result. Include:
- Forecast or policy target period.
- Data-through date and release-lag assumptions.
- Sources used and sources missing.
- Structural baseline result.
- Data-enhanced result when available, shown separately.
- Driven-factor decomposition.
- Directional interpretation of the largest positive and negative factors.
- Backtest window, observations, R2/RMSE where available.
- Leakage and overfit checks.
- Limitation note for revised-data, pseudo-real-time, or non-causal results.
Non-Script Analysis Mode
Use this mode when the user asks what the results mean, why a country changed, whether an enhancement is credible, or which factors are driving a forecast. Do not simply tell the user to run a command.
Process:
- Start from the latest available report, dashboard snapshot, or values supplied by the user.
- Identify the baseline model result before discussing the enhanced result.
- Attribute the enhanced result to observable factors and state the sign of each material factor.
- Explain whether the enhanced layer changes the policy or forecast interpretation.
- Separate evidence from inference. Use cautious language when the data are revised, sparse, or pseudo-real-time.
- State what additional data would be needed before making a stronger claim.
Output should be concise but diagnostic:
Bottom line:
Baseline signal:
Data-enhanced signal:
Main driven factors:
Validation check:
Interpretation:
What not to conclude:
Supported Analysis Layers
- Measurement layer: convert text, news, disclosures, patents, images, audio, web traces, and other raw inputs into structured variables.
- Nuisance-function estimation: estimate selection probabilities, propensity scores, conditional expectations, control functions, or counterfactual outcomes.
- Causal and policy evaluation: DID, DML, causal forests, QTE, policy heterogeneity, and targeting rules.
- Structural and dynamic models: value functions, policy functions, state distributions, and equilibrium objects.
- Interpretable multimodal prediction: use graph, time-series, text, audio, or video signals only when the prediction remains auditable.
- Domain-specific economics: climate and energy, finance, labor automation, innovation, disclosure, platform governance, and supply chains.
- Validation and auditing: construct validity, annotator reliability, leakage checks, calibration, and external validity.
- Boundary and nonparametric caution: do not relabel identification designs as ML when the core contribution is econometric.
Report Templates
GDP Nowcast
Use this structure:
Target period:
Data through:
Baseline bridge nowcast:
ML auxiliary calibration:
Final calibrated nowcast:
Driven factors:
- Activity:
- Labor:
- Prices:
- Financial conditions:
- External demand:
Validation:
Limitations:
Rules:
- State that ML is auxiliary calibration, not the main predictor.
- Report US and Canada separately when both are available.
- Do not compare calibrated and baseline results without the same validation window.
- Mention release-lag filtering when monthly data are used for current-quarter evaluation.
Policy Rate Diagnostics
Use this structure:
Central bank:
Data through:
Current policy rate:
Base Taylor rate:
Data-Enhanced Taylor rate:
Gap versus actual:
Driven factors:
- Activity gap:
- Inflation pressure:
- Financial conditions:
- External pressure:
- Labor cooling:
Policy interpretation:
Validation and limitations:
Rules:
- Base Taylor is the structural signal.
- Data-Enhanced Taylor is a learned historical residual adjustment.
- Do not tune parameters by hand to match official projections.
- Explain whether the enhancement moves the estimate closer to or farther from the current policy rate.
- Treat the result as a diagnostic, not a mechanical recommendation.
Backtest Review
Use this structure:
Window:
Observations:
Baseline R2 / RMSE:
ML-calibrated R2 / RMSE:
RMSE gain:
Leakage controls:
Residual risk:
Rules:
- Confirm that calibration uses only prior rows in rolling validation.
- Call out revised-data limitations.
- Do not report gains without baseline metrics.
Commands
Install:
pip install -r requirements.txt
Run policy diagnostics:
python main.py policy --country US
python main.py policy --country Canada
Run GDP nowcast:
python main.py gdp --country US
python main.py gdp --country Canada
Run backtest:
python backtest_engine.py
Data Requirements
- Set
FRED_API_KEYin the environment before running live data workflows. - If live data are missing, report the missing source explicitly.
- Dashboard snapshot values should be generated from the Python workflow or clearly labeled as a static example.
What ships with it: 13 files
70.1 KB alongside SKILL.md, 12 of them executable
src/
- core/__init__.pyruns0 B
- core/modeling_core.pyruns2.6 KB
- core/visual_oracle.pyruns2.4 KB
- data_utils/__init__.pyruns0 B
- data_utils/macro_data_fetcher.pyruns5.3 KB
- data_utils/statcan_fetcher.pyruns1.2 KB
- engine/gdp_nowcast_engine.pyruns13.4 KB
- engine/__init__.pyruns0 B
- engine/policy_rate_engine.pyruns21.6 KB
- __init__.pyruns0 B
- backtest_engine.pyruns22.3 KB
- main.pyruns1.2 KB
- requirements.txt65 B