| name | macro-scanner |
| description | Scan live macro & geopolitical events (war, Fed/RBI, crude, INR, trade war, gold, risk-off) and map each theme to ETF directional impact. Use when user asks about macro risks, what is driving gold/equities today, or wants to save macro signals to ClickHouse. |
Skill: Macro Scanner
Detects active macro and geopolitical themes from free news sources (Google News RSS + Yahoo Finance) and maps each event to ETF directional impact with transmission logic. No API key required.
Trigger
Use this skill when the user asks:
- "What macro events are moving the market today?"
- "How does US-Iran / Fed / OPEC affect my ETFs?"
- "What is driving gold / banks / IT sector right now?"
- "Save macro signals to DB"
Commands
python src/main.py macro --max 4
python src/main.py macro --save
python src/main.py macro --max 2 --save
8 Macro Themes
| Theme | Key ETF Impact |
|---|
| โ๏ธ Geopolitical / War | GOLDBEES โ, NIFTYBEES โ, BANKBEES โ |
| ๐ฆ Fed / RBI Policy | GILT5YBEES โ (cut), GOLDBEES โ (cut), MON100 โ (hike) |
| ๐ข๏ธ Crude Oil Shock | GOLDBEES โ (inflation hedge), AUTOBEES โ |
| ๐ฑ INR Move | ITBEES โ (weak INR), GOLDBEES โ, NIFTYBEES โ |
| โ๏ธ Trade War / Tariffs | GOLDBEES โ, MON100 โ, ITBEES โ |
| ๐ฎ๐ณ India Macro | NIFTYBEES โ, CPSEETF โ, GILT5YBEES โ |
| ๐ฅ Gold / Commodity | GOLDBEES โโ directly |
| ๐ Global Risk-Off | GOLDBEES โ, LIQUIDBEES โ, all equity ETFs โ |
Net Score Interpretation
The net score is an article-count ร static impact-weight sum.
With --max 4 (default) and 8 themes active, the maximum possible score is ยฑ32.
| Score | Meaning |
|---|
| โฅ +16 | Strong bullish macro confluence |
| +8 to +15 | Moderate bullish tilt |
| โ7 to +7 | Mixed / no clear macro edge |
| โ8 to โ15 | Moderate bearish tilt |
| โค โ16 | Strong bearish macro confluence |
Important: the score reflects number of news articles, not price magnitude.
A score of +32 means all themes found articles pointing bullish โ not a +32% return forecast.
Quant Overlay
The scanner also shows a Quant Overlay panel fetched live from ClickHouse:
- GOLDBEES price vs EMA50 (trend confirmation of gold news signal)
- FII 5-day net flow (confirms or contradicts equity bearish signal)
- GOLDBEES GARCH vol (risk-regime context)
These numbers come from the DB โ do NOT substitute external knowledge for them.
What the Scanner Does NOT Produce โ Do NOT Fabricate
โ Specific commodity prices (e.g. "WTI at $94") โ scanner shows headlines, not price levels
โ Specific FII flow amounts (e.g. "โน12,000 Cr outflow") โ unless it appears in the Quant Overlay
โ Interest rate decisions (e.g. "RBI held at 6.5%") โ only report what headlines say
โ Any numbers not visible in the terminal output
When summarising the scan, report:
- Which themes are active (from the theme list in the output)
- The net scores for each ETF (from the table)
- The Quant Overlay numbers verbatim (from the DB panel)
- Headline text may be quoted directly from the output (โค 15 words)
DB Storage
Results saved to market_data.news_articles with source_type = 'macro_event'.
View in Streamlit UI โ ๐ฐ Market News tab โ left column (Macro Events).
Source File
src/tools/macro_event_scanner.py