How bharathcherala193/trading_macro_economics_agent works
This repository is a macro-event strategy-selection pipeline. Its main workflow collects calendar events and macro news, generates or uses trade logs and prices, builds weekly features, evaluates strategy permutations with walk-forward validation, and produces an outlook, charts, and a performance report. The README documents the overall stages; sampled source confirms key storage and modeling calls. Some subsystem links rely on README documentation because their implementation was not fully sampled.
Main entry points: run_all.py Pipeline runner · config.py Pipeline configuration · walkforward.py Walk-forward selection · store.py Event and news store
Components 16
Data collection
- Calendar ingestion
ingest_apify.py - News ingestion
ingest_news.py - Market prices
trades.py - Event and news store
store.py
Strategy analysis
- Trade generation
trades.py - Weekly feature engineering
features.py - Walk-forward selection
walkforward.py
Research outputs
- Sentiment charts
charts.py - Macro outlook
macro_summary.py - Performance report
report.py
Pipeline runtime
- Pipeline runner
run_all.py - Pipeline configuration
config.py
Other components
- Analyst
- Apify calendar
- Tavily news search
- Yahoo Finance
Connections 26
- Analyst → Pipeline runner: runs pipeline
README.md - Pipeline runner → Calendar ingestion: runs ingestion
run_all.py - Pipeline runner → News ingestion: runs ingestion
run_all.py - Pipeline runner → Trade generation: runs generation
run_all.py - Pipeline runner → Walk-forward selection: runs validation
run_all.py - Pipeline runner → Sentiment charts: runs charts
run_all.py - Pipeline runner → Macro outlook: runs summary
run_all.py - Pipeline runner → Performance report: runs report
run_all.py - Calendar ingestion → Apify calendar: fetches events
README.md - News ingestion → Tavily news search: searches news
README.md - Market prices → Yahoo Finance: downloads prices
trades.py - Calendar ingestion → Event and news store: upserts events
ingest_apify.py - News ingestion → Event and news store: upserts articles
ingest_news.py - Trade generation → Market prices: loads price history
trades.py - Event and news store → Walk-forward selection: provides event and news data
walkforward.py - Trade generation → Walk-forward selection: provides trade log
README.md - Weekly feature engineering → Walk-forward selection: builds model features
walkforward.py - Event and news store → Sentiment charts: provides event and news data
charts.py - Event and news store → Macro outlook: provides event and news data
macro_summary.py - Walk-forward selection → Performance report: provides validation results
report.py - Pipeline configuration → Calendar ingestion: configures ingestion
ingest_apify.py - Pipeline configuration → News ingestion: configures searches
ingest_news.py - Pipeline configuration → Trade generation: configures backtest
trades.py - Pipeline configuration → Weekly feature engineering: configures features
features.py - Pipeline configuration → Walk-forward selection: configures validation
walkforward.py - Pipeline configuration → Performance report: configures report
report.py