Skip to main content

Macro Agent

Status: Verified against code Last Updated: 2026-04-23

Role in Plain English​

The Macro Agent is your big picture analyst. It steps back from the chart to answer:

"What's happening in the broader market, and does it support or challenge this trade?"

What It Analyzes​

1. Market Regime Identification​

The agent classifies the current market environment:

RegimeWhat It MeansImpact on Trades
Risk-OnStocks up, VIX down, risk assets risingFavors LONG positions
Risk-OffStocks down, VIX up, flight to safetyFavors SHORT positions or caution
NeutralMixed signals, no clear directionNo strong bias either way
TransitioningConditions are changingHigher uncertainty

2. Cross-Asset Analysis​

The agent compares your ticker to major indices:

IndexWhat It Tells Us
SPYBroad market direction (S&P 500)
QQQTech sector strength (NASDAQ-100)
VIXFear gauge (high = uncertainty)
DXYDollar Index (currency strength impact, if available)

Cross-Asset Alignment:

  • Aligned: Your ticker moving WITH the market
  • Divergent: Your ticker moving AGAINST the market
  • Mixed: Some alignment, some divergence

3. Intermarket Divergence​

The agent assesses whether the ticker is leading or lagging the broader market:

StatusWhat It Means
LeadingTicker moves before market (potential early signal)
LaggingTicker moves after market (catching up)
In SyncTicker moves with market in real-time
DecoupledTicker ignores market direction (idiosyncratic)

4. Economic Assessment​

FactorWhat We Check
Inflation TrendRising / Falling / Stable (based on CPI/PCE)
Fed StanceHawkish / Dovish / Neutral (implied from data)
Yield CurveNormal / Inverted / Flat (2Y vs 10Y)

Impact:

  • Rising inflation + Hawkish Fed = Pressure on growth stocks
  • Inverted yield curve = Recession signal = Risk-off bias

Economic Data Temporal Context​

The Macro Agent applies temporal weighting to economic data:

Data AgeWeight
Fresh (last few days)HIGH weight, reliable
Recent (1-2 weeks)MEDIUM weight
Stale (2+ weeks)LOW weight, may be outdated

Practical rule: If a key datapoint is stale, the Macro Agent flags it and reduces how much it influences the verdict.

5. News Sentiment (Temporal Weighting)​

The agent reviews recent news and classifies overall sentiment with time-based weighting:

News AgeWeightLabel
<15 minutesHIGHEST (breaking catalyst)[BREAKING - JUST NOW]
<60 minutesHIGH (current context)[X min ago]
1-24 hoursMEDIUM (developing story)[Xh ago]
>24 hoursLOW (background context)[OLD]

Practical rule: Breaking items (minutes old) matter most; older stories become background context unless they’re still actively moving price.

Sentiment Categories:

SentimentMeaning
BullishNews flow is positive
BearishNews flow is negative
NeutralBalanced or no significant news
MixedConflicting news signals

6. Global Events & Wild Cards​

The Macro Agent is aware of events that can override technical analysis:

Event TypeExamples
Fed commentsPowell speech = instant market reaction
Social mediaElon/Trump tweets can move specific stocks or crypto
GeopoliticalWar, trade disputes
Liquidity eventsJapanese yen carry trade unwinding
Currency crisesCan cause market-wide impact

7. International Markets​

MarketWhat It Tells Us
Asia (Nikkei, Hang Seng)Overnight sentiment
Europe (DAX, FTSE)Current global risk appetite

How We Use It:

  • Asia strong + Europe strong = Bullish gap potential at US open
  • Asia weak + Europe weak = Bearish gap potential
  • Mixed = Uncertain opening, watch first 15 minutes

Note: International data weight decreases as the US session progresses.

8. Session Context​

SessionCharacteristics
Pre-marketOvernight news, gap risk
Regular hoursNormal trading conditions
After-hoursThin liquidity, news-driven moves

Direction Mapping​

The Macro Agent's output maps to trading direction:

Macro OutputTrading Direction
risk_onBULLISH (same as LONG)
risk_offBEARISH (same as SHORT)
neutralNO STRONG OPINION (doesn't block trades)

Key Point: Macro "neutral" does NOT block trades. It just means the macro environment isn't providing strong directional bias.

What It Outputs​

The Macro Agent produces a structured verdict covering:

Market Environment​

  • Market Regime — Whether conditions favor risk-on, risk-off, or are transitioning
  • Confidence Level — How strongly the macro data supports the assessment

Cross-Asset Analysis​

  • Index Directions — Current trend of major indices (SPY, QQQ)
  • Cross-Asset Alignment — Whether your ticker is moving with or against the market
  • Intermarket Behavior — Whether the ticker is leading, lagging, or decoupled from the broader market

Economic Assessment​

  • Inflation Trend — Rising, falling, or stable
  • Fed Stance — Implied hawkish, dovish, or neutral based on data
  • Yield Curve Signal — Normal, inverted, or flat
  • Headwinds & Tailwinds — Economic factors that support or challenge the trade

News & Sentiment​

  • Overall Sentiment — Bullish, bearish, neutral, or mixed news flow
  • Key Themes — Major topics driving sentiment
  • Concerns — Issues that could affect the trade

International Context​

  • Asia/Europe Sentiment — Overnight and global market sentiment
  • Gap Bias — Potential gap direction at US open
  • Relevance — How much international data matters for current session

Confidence Guidelines​

The agent always provides an assessment when data is available, with confidence scaled to data quality and completeness.

How Its Opinion Gets Used​

The Macro Agent's verdict goes to the Supervisor Agent along with Technical and Wild Card verdicts.

Key rule: If Technical and Macro disagree, Technical wins because it has actual price data. Macro provides context, but price is truth.

Implementation details are intentionally omitted from public documentation.