Why This Exists
World Monitor is mostly feed-first:- curated RSS feeds
- digest aggregation
- Google News RSS fallbacks
- single-symbol premium analysis
- less prominent tickers
- recent company-specific developments not well represented in the feed inventory
Provider Order
The current provider chain is:TavilyBraveSerpAPI- Google News RSS fallback
Bocha was intentionally not added because the current premium-finance direction is not China-focused.
Implementation
Primary implementation: Integration point: The helper:- builds a normalized stock-news query
- tries providers in priority order
- rotates across configured keys
- tracks temporary provider/key failures in memory
- normalizes provider responses into
StockAnalysisHeadline - caches search results in Redis
- falls back to Google News RSS when provider-backed search is unavailable
Query Strategy
The current query shape intentionally mirrors the stock-news style from the source repo for foreign equities:<Company Name> <SYMBOL> stock latest news
Examples:
Apple AAPL stock latest newsMicrosoft MSFT stock latest news
- Monday: 3 days
- Saturday/Sunday: 2 days
- Tuesday-Friday: 1 day
Runtime Secrets
The search layer uses runtime-managed secret keys so it fits the same desktop/web secret model as the rest of the project. Configured keys:TAVILY_API_KEYSBRAVE_API_KEYSSERPAPI_API_KEYS
Caching
Search results are cached in Redis under a query-derived key. The cache key includes:- symbol
- dynamic day window
- result limit
- hashed query
Fallback Behavior
IfTavily fails, the system tries Brave.
If Brave fails, the system tries SerpAPI.
If provider-backed search is unavailable, empty, or unconfigured, the system falls back to Google News RSS.
That means:
- premium stock analysis does not hard-depend on paid search providers
- provider keys improve coverage, not feature availability
Why This Is A Separate Layer
This layer is not the stock-analysis engine itself. It should be treated as:- targeted news enrichment
- a coverage-quality upgrade
- a provider-backed precision lookup layer
- the canonical market/news ingestion architecture
- a replacement for feed digest aggregation
- the source of truth for premium finance persistence
- core finance product logic stays stable
- search-backed enrichment can evolve independently
Known Boundaries
The current implementation does not yet expose a standalone public stock-news search RPC. Right now it is an internal backend helper used by premium stock analysis. That is deliberate:- it keeps the surface area small
- it avoids adding a premature UI/API product surface
- it allows provider behavior to evolve before being frozen into a dedicated external contract
