Module 6 — Global Economic Growth and Overseas Markets
Normative specification. Module 6 is deterministic (no LLM). It scores whether
economies and markets outside the United States are a tailwind or headwind for US
equities, on a −2…+2 scale, and maps that onto US sectors/industries/sub-industries and
foreign-exposed companies. It aggregates regional growth (Eurozone, UK, Japan,
emerging-markets-ex-China, other developed markets), pulls China in once as a finished
handoff from Module 7, adds a global-activity leg (trade volume + industrial production),
overlays an economic-surprise adjustment, and confirms with markets using both a plain
industry ETF and an ETF/SPY relative-strength ratio. It emits company
geographic-exposure alerts and foreign-company→industry spillovers. It does not decide
the final risk/currency/yield regime, select a stock, set entry/stop/target, or place an
order — those belong to the specialist modules, Output 2, and the trading bot. The US is
excluded from the scored regional aggregate.
Implementation target (not yet built): routes/module6.py → snapshots/module6.json
(+ a stateful store .data/module6_events.db for spillover overlays), surfaced in a
"Module 6" navbar view. It is the overseas-growth counterpart to the sibling deterministic
modules and depends on Module 7 (China) upstream.
Implementation note (v1 ceilings). The Part 4 scoring is pure arithmetic; its
numeric inputs (GDP/PMI/IP/trade) are data-feed lookups, and only the foreign-company
spillover classification (Calc 13) needs NLP. The intended split is the same as
Module 5: an LLM extraction pass (agents/skills/module6_extract.md) only for the
spillover/company-event front-end, then a deterministic scorer for everything else,
with zero model calls on the numeric hot path. Regional-macro ingestion
(Eurostat, ONS, Japan Cabinet Office/METI, S&P Global PMI, CPB World Trade Monitor, IMF
weights, a licensed consensus/surprise feed) is not integrated today — we have FRED +
Polygon/Massive, which cover the market-confirmation leg but not the official regional
releases; v1 caps DATA_COVERAGE low until those feeds exist. Module 7 does not exist
yet, so v1 runs PARTIAL_EXCLUDING_CHINA (confidence capped below HIGH per Part 11.3).
Two numeric decisions are proposed, not sourced (Part 15.3 ±2% ratio threshold, Part 15.4
confidence weights). Cross-module handoffs (Part 10) and Output 2 are placeholders until
those modules exist.
Section One — Deterministic specification
Part 1 — Master calculation dependency (14 calcs)
- Data Validation → DATA_STATUS, MISSING/STALE/CONFLICT lists,
REGIONAL_WEIGHT_COVERAGE_PCT, PARTIAL_OUTPUT_STATUS, FAILURE_REASON.
- Regional Universe and Weights → per-region PPP-GDP weight %, VALID coverage %
(uses China weight + Module 7 output).
- Regional Economic Growth Engine → GDP/PMI/IP scores → REGION_RAW_GROWTH_SCORE →
REGION_FINAL_GROWTH_POINT, REGION_GROWTH_STATUS.
- Overseas Production and Trade Engine → overseas IP point + trade-volume point →
GLOBAL_ACTIVITY_POINT, DESCRIPTIVE_ONLY_FLAG.
- Base Module 6 Economic Score → weighted regional growth + China + global activity →
BASE_MODULE_6_DIRECTION_POINT.
- Economic-Surprise Overlay → standardised surprise → SURPRISE_ADJUSTED_DIRECTION_POINT.
- Overseas Equity and Relative-Strength Engine → regional + industry absolute/relative
status, LOCAL_CURRENCY_USD_CONFLICT_FLAG.
- Overseas Bond and Currency Conditions → per-region bond/currency condition,
funding-stress & recession-concern region counts.
- Overseas Risk Confirmation → 6-vote total → OVERSEAS_RISK_STATUS, HARD_STRESS_CONFIRMATION.
- Market Confirmation Adjustment → FINAL_MODULE_6_DIRECTION_POINT.
- Sector/Industry/Sub-Industry Impact → final impact lists + REGIONAL_CONTRIBUTION +
MIXED_IMPACT flags.
- Company Geographic-Exposure Alerts.
- Overseas Company-to-Industry Spillover.
- Confidence and Final Output → MODULE_6_CONFIDENCE/RISK/PERMISSION, OUTPUT_1.
- 2.1 Run-control: MODULE_NUMBER 6; UTC+ET timestamps; RUN_TYPE
(SCHEDULED|EVENT_TRIGGERED|REVISION|MANUAL); DATA_STATUS_IN; NEW_ENTRY_STATUS_IN;
ACTIVE_RESTRICTION_LIST_IN.
- 2.2 Provider assumption: all required feeds assumed available (provider selection is
implementation config, not a calc gap) — but freshness, provider-consistency and
missing-data rules still enforced; no silent estimation/substitution.
- 2.3 Configurable parameters (all thresholds applied unrounded):
- Region blend: GDP 30% · Composite PMI 40% · IP 30%.
- Base blend: Regional growth 70% · Global activity 30%; global activity = IP 50% · Trade 50%.
- Lookbacks: GDP latest 2 quarters, median prev 20 quarters; PMI trend 3 releases; IP/trade
current 3 mo vs prior 3 mo; equity/ratio/currency EMA 20 sessions, return 5 sessions;
yield-change 5 sessions; surprise history 3 years; surprise overlay 1 US session.
- Coverage: min regional 80% · min EM-ex-China 80%.
- Exposure: minor 10% · major 20% · company alert 20%.
- Spillover: ≥3 peers · rel move ≥1.00% · RVOL ≥1.50 · window first 60 min · structural
capacity ≥5% within 24 mo.
- Risk votes: RISK_ON ≥+4 · RISK_OFF ≤−4 · max 1 opposite vote.
- 2.4 Scored regions: Eurozone, UK, Japan, China (from Module 7), EM-ex-China, other DM;
US excluded from the scored aggregate.
- 2.5 Other DM: ≥ Canada, Australia, Switzerland + approved DM not already in EZ/UK/Japan;
each country in exactly one region.
- 2.6 China pass-through: consume Module 7's final point/status/equity/confidence/impact
lists; never recalculate Chinese GDP/PMI/IP/retail/property/credit/stimulus/yuan/equities.
- 2.7 Per-region economic inputs: real GDP QoQ (+prior/history), composite/mfg/services PMI,
IP index, release timestamp, observation period, initial/revised, seasonal-adj, annualisation,
official source, pre-release consensus median.
- 2.8 Market inputs: local-currency index, USD-adjusted index/ETF, 5-session return,
20-session EMA, region ETF/SPY ratio (+its 5-session return & 20-session EMA), 2y/10y yields
(+5-session changes), currency vs USD, EM sovereign spread, market-open/holiday status.
- 2.9 Industry map fields: INDUSTRY_ID, primary + backup ETF/index, absolute instrument,
relative numerator/denominator (normally SPY), ratio, fixed peer group, benchmark,
effective/review dates, validity status.
- 2.10 Prescribed industry map (starting config, validate each before deploy): Semis
SMH/SOXX; Software IGV/XSW; Biotech XBI/IBB; Regional banks KRE/IAT; Homebuilders XHB/ITB;
Airlines JETS/peers; Transports IYT/XTN; Aero-defence ITA/XAR; Gold miners GDX/GDXJ; Oil E&P
XOP/IEO; Oil services OIH/IEZ; Pipelines AMLP/ENFR; Steel SLX/peers; Aluminium peers (no ETF
if none representative); Copper COPX/ICOP; Ag-inputs peers + MOO/SPY; Shipping BOAT/peers;
Solar TAN/RAYS; Wind FAN/peers; Crypto-equities WGMI/broad; China internet KWEB/PGJ; Pharma
XPH/PPH; Retail importers XRT + high-import peers; Autos CARZ/peers; Machinery peers + XLI/SPY;
Hotels/travel PEJ; Luxury peers. Every ratio is
PRIMARY/SPY.
- 2.11 Map review: at deploy, first trading day each quarter, on ETF closure/merger/mandate/
benchmark change, on liquidity drop, or when the ETF stops representing the industry. Revisions
change future calcs only — never rewrite history.
Part 3 — Data definitions and validation
- 3.1 Controlling sources: Eurostat (EZ GDP/IP); UK ONS (UK GDP+revisions); Japan Cabinet
Office (GDP), METI (IP); S&P Global (common PMI method, 50=neutral, value-added composite);
CPB World Trade Monitor (global trade + IP); IMF (classification + PPP weights); Module 1's
live provider (equity/ETF/index/yield/FX); licensed consensus provider (medians + surprise
history); geographic-exposure provider + audited filings (regional exposure). News = alerts only.
- 3.2 Source priority: latest controlling official release → latest official revision →
licensed reproduction → approved backup (only when main invalid) → news (alert only). Never
average official vs unofficial.
- 3.3 Max data age: live market 2 min (else last official close); PMI 40 d; IP 70 d; GDP
120 d; CPB trade/production 100 d; surprise index 2 business days; consensus captured ≤24 h
pre-release; company geo-exposure 120 d; IMF weights = latest WEO; ETF map reviewed within
current quarter.
- 3.4 Min coverage: ≥80% of overseas regional weight and ≥80% of EM-ex-China weight; valid
weights renormalised to 100% only when coverage passes; China stays separately identified.
- 3.5 Missing-data: never estimate/repeat-prior/substitute-neighbour/substitute-unrelated-ETF.
Non-critical missing + coverage ≥80% → partial result. Critical coverage <80% → total economic
output INVALID, 0 points. Module 7 missing →
PARTIAL_EXCLUDING_CHINA. Missing market
confirmation does not invalidate valid economic data. Missing ETF → backup → peer group →
MARKET_CONFIRMATION_UNAVAILABLE (adds no confirmation).
- 3.6 Provider consistency: one PMI methodology across regions; one consensus provider per
surprise history; one geo-exposure definition; one ETF/ratio map per period; keep local vs USD
returns both separate; never mix annualised/non-annualised GDP.
- 3.7 Initial vs revised: store both; release-day surprise uses initial, continuing
conditions use latest revised; a revision never rewrites the original surprise; recalc after
every revision.
- 3.8 Sessions: 5-session calcs use completed sessions, skip holidays, use official close on
early-close, mark CLOSED_CURRENT_DATA while a market is closed, never duplicate a close; US ETF
ratios use the US calendar, local indexes the local calendar.
- 3.9 Rounding: thresholds on unrounded values; display GDP/production/trade 2 dp, PMI
1 dp, yields 3 dp, bp changes 1 dp, exposure 2 dp, raw scores 2 dp.
Part 4 — Deterministic calculations
- 4.1 GDP (real, SA, QoQ, non-annualised; average latest 2 quarters vs 5-yr median):
≥+0.50% & above median → +2; >+0.10% → +1; −0.10%…+0.10% → 0; <−0.10% & >−0.50% → −1;
≤−0.50% → −2.
- 4.2 PMI (each of composite/mfg/services): ≥53.0 → +2; 50.5–<53.0 → +1; 49.5–<50.5 → 0;
47.0–<49.5 → −1; <47.0 → −2. Trend (vs 3 releases ago): ≥+1.5 IMPROVING, ≤−1.5 DETERIORATING,
else STABLE. Composite drives the regional PMI score; mfg/services are detail only.
- 4.3 Industrial production (3-mo avg vs prior 3-mo avg, % change): ≥+1.50% → +2;
+0.25%…<+1.50% → +1; −0.25%…+0.25% → 0; <−0.25% & >−1.50% → −1; ≤−1.50% → −2.
- 4.4 Regional raw growth = composite PMI×40% + GDP×30% + IP×30%. Raw→point boundaries
(reused everywhere): ≥+1.25 → +2; +0.35–<+1.25 → +1; −0.35…+0.35 (exclusive) → 0;
−1.25…−0.35 → −1; ≤−1.25 → −2.
- 4.5 EM-ex-China: exclude China, weight valid countries by IMF PPP, require ≥80% coverage,
convert via 4.4 boundaries; <80% → INVALID, 0.
- 4.6 Global trade volume (3-mo vs prior 3-mo): same thresholds as 4.3. If the only series
bundles US+China inseparably → display,
DESCRIPTIVE_ONLY_FLAG=TRUE, 0 trade points, no
double-count.
- 4.7 Overseas IP: same formula/thresholds as 4.3, excluding US and (when Module 7 supplies
it) China.
- 4.8 Global activity = overseas IP×50% + trade×50%, convert via 4.4 boundaries.
- 4.9 Weighted regional growth = Σ(regional point × valid IMF PPP weight) + China Module-7
point × China weight, ÷ total valid weight. China appears as a separate contribution and
contributes exactly once.
- 4.10 Base Module 6 = weighted regional growth×70% + global activity×30%, convert via 4.4.
- 4.11 Economic surprise: raw = actual − consensus median; standardised = raw ÷ SD of
comparable 3-yr forecast errors (require ≥24 releases). ≥+1.0 POSITIVE, −1.0…+1.0 NEUTRAL,
≤−1.0 NEGATIVE. Positive surprise on base 0/+1/+2 → one level more positive (cap +2); negative
on 0/−1/−2 → one level more negative (cap −2); a surprise never reverses the base sign;
overlay expires after one completed US session.
- 4.12 Plain ETF absolute direction: STRONG_POSITIVE = above 20-EMA & 5-session return
≥+3.00%; POSITIVE = above EMA & 0<ret<+3.00%; NEUTRAL = price/return disagree or ret=0;
NEGATIVE = below EMA & −3.00%<ret<0; STRONG_NEGATIVE = below EMA & ret ≤−3.00%.
- 4.13 ETF/SPY ratio (= ETF÷SPY): STRONG_RS = ratio above 20-EMA & 5-session ratio ret
≥+2.00%; RS = above EMA & 0<ret<+2.00%; NEUTRAL = disagree or 0; RELATIVE_WEAKNESS = below EMA
& −2.00%<ret<0; STRONG_RW = below EMA & ret ≤−2.00%.
- 4.14 Combined industry confirmation (first match): (1) plain ≥POSITIVE & ratio ≥RS →
CONFIRMED_BULLISH; (2) plain ≤NEGATIVE & ratio ≤RW → CONFIRMED_BEARISH; (3) plain up + ratio
weak → ABSOLUTE_UP_RELATIVE_LAG; (4) plain down + ratio strong → ABSOLUTE_DOWN_RELATIVE_
RESILIENCE; (5) either neutral → UNCONFIRMED; (6) ETF/ratio missing but peers valid → peer
confirmation; (7) all missing → MARKET_CONFIRMATION_UNAVAILABLE. No macro point is added from
confirmation — it only changes confidence/allocation reliability.
- 4.15 Why both: plain ETF answers "is the price rising?"; ratio answers "is it beating
SPY?". Not bullish merely for falling less than SPY; not strong merely for rising while lagging.
- 4.16 Regional equity direction: compute local-currency + USD-adjusted + regional ETF/SPY
ratio. Confirmation needs local & USD signs to agree, ratio supporting when available; a
conflict → MIXED_CURRENCY_TRANSLATION. (MSCI ACWI ex-USA = approved broad ex-US benchmark.)
- 4.17 Currency (foreign vs USD): STRONG = 5-session ret ≥+1.00% & above 20-EMA; WEAK =
≤−1.00% & below EMA; else NEUTRAL. Confirmation only.
- 4.18 Bond yield (10y, 5-session change): GROWTH_CONFIRMING = equities+ , currency not weak,
+5…<+20 bp; EASING_SUPPORTIVE = equities+ , −5…<−20 bp; INFLATION/FUNDING_STRESS = equities−,
currency weak, ≥+20 bp; RECESSION/DEFLATION = equities−, ≤−20 bp; else MIXED. No direct growth
points.
- 4.19 Overseas risk vote (6 votes: broad, Europe, UK, Japan, EM-ex-China equity, EM currency):
+1 positive / 0 neutral-mixed / −1 negative. ≥+4 with ≤1 negative → RISK_ON; ≤−4 with ≤1
positive → RISK_OFF; else MIXED. ≥2 funding-stress regions → RISK_ON prohibited, use
MIXED_WITH_FUNDING_STRESS unless risk-off passes.
- 4.20 Market confirmation adjustment: econ+ & risk-on → CONFIRMED_POSITIVE; econ− & risk-off
→ CONFIRMED_NEGATIVE; opposite pairings → CONTRADICTED; else MIXED. Contradicted moves one level
toward zero (+2→+1, +1→0, 0→0, −1→0, −2→−1). Markets can't reverse the official direction.
- 4.21 Sector/industry geo-exposure: REGION_CONTRIBUTION = REGION_FINAL_POINT ×
REGION_EXPOSURE_PCT ÷ 100. Keep revenue/customer/production/export/supply-chain exposure
separate. Caps: <10% → 0; 10–<20% → max magnitude 1; ≥20% → max magnitude 2.
- 4.22 Direction confirmation: CONFIRMED_POSITIVE_INDUSTRY only when econ point +, plain ETF
+, ratio shows RS (mirror for negative). On disagreement: preserve the economic point, mark
MARKET_NOT_CONFIRMING, reduce confidence, add/reverse nothing.
- 4.23 Mixed regional exposure: if + and − regional contributions coexist → MIXED_IMPACT_FLAG
TRUE, preserve each, never call it neutral just because the net is 0, display largest +/− causes.
- 4.24 Company geo-exposure alert: create when one-region exposure ≥20% and that region's
final point is +2/−2 and data valid. +2 → OPPORTUNITY_ALERT, −2 → RISK_ALERT; state name,
ticker, region, exposure %, type, activity, direction, confidence, duration. No trade.
- 4.25 Foreign company→industry spillover (all required): event official/exchange-filed/
company-verified; changes capacity/competition/pricing/technology/market-access; effect extends
beyond the triggering company; ≥3 global peers or 1 approved industry ETF react as expected;
relative move ≥1.00%; RVOL ≥1.50 in first 60 min. Alternative structural path: verified
capacity added/removed ≥5% of global industry capacity within 24 mo. Output identifies trigger,
country, event, industries helped/harmed, plain-ETF & ratio reactions, other causes, temp vs
structural, duration, confidence.
- 4.26 Spillover point: temp market spillover exposure 10–<20% → max 1; ≥20% → max 2; verified
structural ≥5% → max 2; unverified/company-only → 0 industry points (company stays visible).
- 4.27 Confidence:
- DATA_COVERAGE_SCORE = valid regional weight coverage (0–100).
- INDICATOR_AGREEMENT = 100 if GDP/composite-PMI/IP share one non-zero sign; 75 if two agree &
third 0; 50 if one+/one−/one 0; 25 if two conflict with the third; 0 if critical invalid.
- GLOBAL_ACTIVITY_AGREEMENT = 100 same sign as weighted regional growth; 50 if either 0; 0 if
conflict.
- MARKET_CONFIRMATION = 100 econ+absolute+ratio all confirm; 75 econ+absolute confirm, ratios
neutral; 50 mixed; 25 absolute vs ratio conflict; 0 markets contradict.
- CONFIDENCE_PCT = coverage×35% + indicator×30% + global-activity×20% + market×15%.
- Bands: ≥80% HIGH; 60–<80% MEDIUM; 40–<60% LOW; <40% INVALID.
Part 5 — Descriptive bands
- 5.1 Direction: +2 STRONG_OVERSEAS_TAILWIND | +1 OVERSEAS_TAILWIND | 0
MIXED_OR_NEUTRAL | −1 OVERSEAS_HEADWIND | −2 STRONG_OVERSEAS_HEADWIND.
- 5.2 Regional growth: STRONG_EXPANSION | EXPANSION | STABLE_OR_MIXED | CONTRACTION |
STRONG_CONTRACTION | INVALID.
- 5.3 Industry confirmation: CONFIRMED_BULLISH | CONFIRMED_BEARISH | ABSOLUTE_UP_RELATIVE_LAG
| ABSOLUTE_DOWN_RELATIVE_RESILIENCE | UNCONFIRMED | UNAVAILABLE.
- 5.4 Overseas risk: RISK_ON | RISK_OFF | MIXED | MIXED_WITH_FUNDING_STRESS | INVALID.
- 5.5 Impact scope: REGION | COMPANY | SUB_INDUSTRY | INDUSTRY | SECTOR_WIDE |
GLOBAL_INDUSTRY_SPILLOVER | MIXED | UNMAPPED.
- 5.6 Permission: UNCHANGED | REDUCED_CONFIDENCE | INVALID_DATA | INHERITED_PAUSE.
Part 6 — Helper conditions
VALID_CHINA_HANDOFF; VALID_REGIONAL_COVERAGE (≥80%); PMI_EXPANDING (≥50.5) / PMI_CONTRACTING
(<49.5); ABSOLUTE_INDUSTRY_UP/DOWN; INDUSTRY_RELATIVE_STRENGTH/WEAKNESS; CONFIRMED_INDUSTRY_
BULLISH/BEARISH; MARKET_CONTRADICTS_ECONOMY; MEASURABLE_REGIONAL_EXPOSURE (≥10%);
COMPANY_ALERT_EXPOSURE (≥20%); VERIFIED_COMPANY_SPILLOVER (all 4.25 pass); MIXED_REGIONAL_EFFECT;
EXISTING_PAUSE_ACTIVE; ETF_MAP_VALID; MARKET_CONFIRMATION_UNAVAILABLE.
Part 7 — Regime decision order (stop at first match)
1 critical data invalid → 2 coverage <80% → 3 strong negative growth + risk-off → 4 strong
positive growth + risk-on → 5 moderate negative → 6 moderate positive → 7 econ vs markets
contradict → 8 +/− regional effects coexist → 9 neutral. Final: STRONG_OVERSEAS_TAILWIND |
OVERSEAS_TAILWIND | MIXED_OVERSEAS_CONDITIONS | OVERSEAS_HEADWIND | STRONG_OVERSEAS_HEADWIND |
INVALID.
Part 8 — Short-term / event overlays
- Economic-surprise: starts at release, lasts 1 completed US session, max ±1, never rewrites
base, never crosses zero.
- Overseas market: recalcs while markets open, uses absolute + ratio separately, changes
confidence, may move the point one level toward zero on direct contradiction, adds no new point.
- Foreign-company spillover: starts only after 4.25 passes; temporary price component expires
after 5 completed relevant sessions; structural capacity effect persists until capacity/pricing/
technology/market-share evidence changes; triggering-company info stays separately visible.
Part 9 — Score/impact rules (summary)
Region = 40% composite PMI + 30% GDP + 30% IP. Base = 70% weighted regional growth + 30% global
activity. China contributes exactly once via Module 7. Surprise may adjust ±1; contradiction may
move ±1 toward zero. Industry economic exposure is separate from market confirmation; plain ETF
and ratio never substitute for each other; no confirmation point is added to the macro score; all
final points capped −2…+2.
Part 10 — Handoffs and double-counting controls
- Module 7 (China): owns detailed China; M6 consumes completed results, contributes once,
never recalculates.
- Module 5 (policy/trade): owns the original US policy; M6 doesn't re-score it, but may score
a separately verified overseas/global-industry spillover.
- Shipping/freight: pass trade-volume, regional import/export weakness, supply-chain exposure,
shipping-sensitive effects; M6 keeps only the broad growth effect.
- Yield/financial-conditions: pass regional yields, changes, sovereign spreads, funding
stress; M6 makes no final yield-direction score.
- Currency: pass regional currency direction, 5-session change, EMA status, conflicts; M6 uses
currency as confirmation only.
- Sector-rotation / relative-strength: pass plain-ETF + ratio direction + confirmed status;
M6 uses them only to confirm; the RS module owns final ranking.
- Output 2: pass final direction, regional contributions, separate China contribution,
sector/industry/sub-industry impacts, plain-ETF + ratio status, company alerts, spillovers,
confidence/risk. Output 2 must not count the same overseas-growth effect twice.
Part 11 — Hard overrides
- Existing pause — preserve; M6 may not cancel/weaken.
- Critical data failure — affected point 0, confidence INVALID, valid unaffected outputs
remain, no trade approved.
- Missing China handoff — China contribution 0,
PARTIAL_EXCLUDING_CHINA, confidence not
HIGH, other regions continue.
- ≥2 funding-stress regions — risk-on prohibited, market confirmation can't raise confidence,
no automatic bearish reversal.
- Invalid industry map — primary→backup→peer group→UNAVAILABLE (economic exposure stays
visible, no confirmation adjustment).
Part 12 — Execution order
Read run-control → preserve pauses → validate economic/forecast/market/IMF/ETF/exposure/Module-7
data → build scored universe → GDP → composite PMI → mfg/services → IP → regional raw growth →
EM-ex-China → overseas IP → trade → global activity → weighted regional growth (China once) →
base score → surprise overlay → regional absolute/relative equity → industry plain-ETF → ratio →
combined confirmation → bond → currency → overseas risk → market confirmation/contradiction →
sector/industry geo-exposure → mark mixed → company alerts → spillovers → confidence → hard
overrides → handoffs → Output 1 → trade approved FALSE → order generated FALSE.
Part 13 — Non-calculative constraints
M6 must not: recalculate China; re-score a Module-5 policy; produce the final global-risk/currency/
yield regime or final sector-RS ranking; treat a rising ratio as proof the ETF is up (or vice
versa); select a stock; generate a long/short trade; set entry/stop/target; place/close/reverse a
position; change a price-based stop; cancel another module's pause; make the final sector selection.
Part 14 — Required Output 1
Structured output: identification (module no/name, version, UTC+ET, run type, provider list);
reliability (DATA_STATUS, valid coverage %, China-handoff status, industry-map status,
missing/stale/conflict lists, partial status, failure reason, next recalc); per-region results
(name, weight, GDP value/score, composite/mfg/services PMI value+condition, IP change/score, raw
growth, final point, status, initial/revised); China contribution (final point, weight,
weighted contribution, growth/equity status, confidence, data status, sector/industry handoff);
global activity (overseas IP change/point, trade change/point, raw score, point,
descriptive-only flag); surprise (actual, consensus, raw/standardised, status, overlay
point/expiry); overseas market confirmation (per-region absolute/relative status, bond &
currency condition lists, risk vote total, risk status, market-confirmation status); per-industry
confirmation (id, primary/backup, plain-ETF price/EMA/return/status, ratio value/EMA/return/
status, combined confirmation, peer status, map validity); final outcome (base raw/point,
surprise-adjusted, final point/status, confidence %/level, risk level, permission);
sector/industry/company effects (helped/harmed, final impact lists, regional contribution
list, mixed flags, company geo-exposure alerts, spillover alerts); handoffs (per destination:
raw/calculated fields, status, fields-not-scored, double-counting control); trading-bot status
(final decision NOT_PRODUCED_BY_MODULE_6, trade approved FALSE, order generated FALSE, stock
selected FALSE, final sector selected FALSE); audit (formula/threshold/regional-weight lists,
industry-map version + revision history, provider list, excluded data, revision + overlay history,
next recalc).
Part 15 — Items not fully defined in the source (named ceilings)
- Provider names — not selected. Treatment: use field definitions + source hierarchy +
freshness + consistency rules. (IMPLEMENTATION CONFIG — NOT A CALC GAP.)
- ETF/peer maintenance — future closures/mandate changes unknowable. Treatment: quarterly +
event-triggered map review; primary → backup → peers. (SOURCE-MAINTENANCE RULE.)
- Relative-strength ratio thresholds — not in source. Proposed: ±2.00% over 5 sessions +
20-session ratio EMA for strong RS/RW. (PROPOSED DETERMINISTIC RESOLUTION.)
- Confidence weights — not in source. Proposed: 35% coverage, 30% indicator agreement, 20%
global-activity agreement, 15% market confirmation. (PROPOSED DETERMINISTIC RESOLUTION.)
Section Two — Implementation options and concerns
(Beyond Markets engineering analysis, not part of the normative spec.)
How it relates to our system
Module 6 is the overseas-growth member of the same deterministic auto-trading family as
Modules 2–5 — a paradigm distinct from the current LLM report pipeline. It is the
quantitative sibling of what our macro_outlook / market_brief reports and the dashboard's
macro/liquidity snapshot already do qualitatively.
| Module 6 concept |
Beyond Markets today |
Fit |
| Method: deterministic rules + fixed thresholds |
11 LLM agents, prose reports |
opposite paradigm |
| Output: −2…+2 + handoff packets |
human-read markdown |
no scoring layer |
| Regional GDP/PMI/IP scoring |
FRED partial; no Eurostat/ONS/METI/S&P-PMI ingestion |
partial data gap |
| Global trade/IP (CPB World Trade Monitor) |
not integrated |
data gap |
| Consensus + economic-surprise index |
not integrated (licensed) |
data gap |
| Industry ETF + ETF/SPY ratio confirmation |
Polygon/Massive aggregates present |
buildable today |
| Company regional revenue exposure |
SEC filings + FMP (coarse) |
partial |
| China handoff (Module 7) |
doesn't exist |
hard dependency |
| Consumer: auto-trader + Output 2 |
swing pipeline → Alpaca; no aggregator |
adjacent, not wired |
Deterministic vs LLM — the decision
Same split as Module 5, but M6 is more deterministic: almost every input is already a
number (GDP/PMI/IP/trade/prices), so the LLM's only real job is the foreign-company
spillover front-end (Calc 13: "is this event official? do ≥3 peers react?"). Everything
else is arithmetic and must stay deterministic — reproducible, auditable (Part 14 FORMULA/
THRESHOLD lists + revision history), and cheap on the 2-minute market-hours hot path. A
model never emits the final score. Intended boundary: agents/skills/module6_extract.md
for spillover extraction only → deterministic scorer for Parts 4/9/11.
Better data fit than Module 5, but not zero-gap
M5 needed ~9 government-legal feeds we have none of. M6's hardest inputs are macro data,
and we already own the market-confirmation half (Polygon/Massive) plus some macro (FRED).
Still missing: the official regional releases (Eurostat, UK ONS, Japan Cabinet Office/METI),
S&P Global PMI, CPB World Trade Monitor, IMF PPP weights, and a licensed consensus/surprise
feed. Part 2.2/15.1 deliberately treat provider selection as implementation config — so the
spec is complete without vendor names, but real regional points can't flow until those feeds
exist.
Concerns
- Hard Module 7 dependency. No China module → spec's own fallback is
PARTIAL_EXCLUDING_CHINA, confidence capped below HIGH. M6 can't be fully correct until M7
is built.
- Presumes the sibling ecosystem. Handoffs (Part 10), inherited pauses (Part 11.1) and
Output 2 assume modules and an auto-trader we don't have — build as placeholders.
- Two open numeric decisions (Part 15.3 ±2% ratio threshold, Part 15.4 confidence weights)
are proposed, not sourced — same class as M5's "NOT DEFINED" ceilings; lock them before real
scoring.
- The prescribed ETF map rots (Part 2.11) — a dead/merged/mandate-changed ETF silently
mis-scores an industry without the quarterly/event-driven review.
- Deploy: server-side (
routes/module6.py → snapshots/, .data/); ships via the normal
rsync; snapshots/ and .data/ are already deploy-excluded (server-owned, generated at
runtime).
Two build paths
- Path A (light, recommended first): build only the industry ETF + ETF/SPY ratio
confirmation engine (Calcs 12–14) over existing Polygon/Massive data using the Part 2.10
map, scored by a small deterministic Python function. Isolated, testable, needs no new
vendors, and also feeds a future sector-rotation view — independent of both the regional-macro
ingestion and Module 7.
- Path B (faithful): the full deterministic engine + regional-macro ingestion (Eurostat/
ONS/METI/CPB/IMF/consensus) + the Module 7 China dependency + Output 2, matching the sibling
modules. Large, and it presumes the auto-trading half we don't yet have.
Recommendation: LLM extraction (spillover only) → deterministic scoring. Start with Path A
(the ETF/ratio slice), lock the Part 15.3/15.4 numbers, and keep every regional-macro feed and
the Module 7 handoff as named ceilings until they exist.