Core Concepts
Research Subagents
.md↗Before the Build agent writes a strategy, dedicated subagents fetch historical data, classify the market regime, and pull news. Outputs land as structured files in the algo workspace.
Why subagents
The Build agent designs strategies; it shouldn't also be scraping headlines and fitting parquet files. Each research task runs as a focused subagent with its own context window and a hard tool-call budget. The Build agent waits for results before it generates anything (see single-round dispatch below).
Data extractor
Dispatched via finny_extract_data. Fetches OHLCV for a symbol and date range, then writes it as parquet into the algo's data/stock/ or data/crypto/ directory. Tries multiple sources (Binance for crypto, yfinance for stocks/ETFs) and picks the one with best coverage.
What comes back
Regime taxonomy
| Regime | Trigger |
|---|---|
| trending-up | >5% return with moderate drawdown |
| trending-down | <-5% return |
| range-bound | small return, narrow price range |
| high-vol-chop | >40% annualized vol with <5–10% net return |
Parameter suggestions
The extractor turns the regime + volatility profile into a starting-point parameter set, strategy family (e.g. mean-reversion for range-bound, momentum-pullback for trending-up), Bollinger width, lookback bars, stop loss %, take profit %, and max hold bars. Everything is written as a data_brief.md into the workspace so the Build agent can read it.
News researcher
Dispatched via finny_research_dispatch. The researcher runs autonomously with a budget of ~30 tool calls split across:
- Discord channels (2–4 calls)
- Web search (3–4 queries)
- Web fetch for full articles (3–5 URLs)
Headlines file
One markdown table per day at data/news/headlines/YYYY-MM-DD.md:
# Headlines, 2025-05-20 | Time (UTC) | Headline | Source | Slug | |------------|----------|--------|------| | 14:30 | Trump announces China tariff reduction | Reuters | trump-china-tariff |
Body articles
Full write-ups live at data/news/body/<slug>.md with summary, key facts, market impact, and citations. The Build agent reads headlines first and only opens bodies it needs, keeps context proportional to the work.
Discord news integration
Six curated channels are exposed via finny_discord_read:
Each call returns 1–20 recent posts with id, timestamp, title, excerpt, and URL. The tool handles both embed-style messages and MonitoRSS Components-V2 format.
Single-round dispatch
When the user specifies a date range, data extraction and news research are mandatory. The Build agent's turn ends after dispatch and only resumes once subagents return, preventing the old race where the builder generated a strategy before the research data was on disk.