Skip to main content
Leaving The Matrix
nova-dev 8 min read

AI Picks: an autonomous trade-finder, in seven cents per run

Macro regime → AI slice selection → universe scan → backtest sweep → top-5 enrichment → AI thesis per pick. The full pipeline that turns 'screen the market' into one keystroke.

#nova#screener#ai#finance

The screener I shipped last week was a tool I'd point. AI Picks is a tool that points itself. I press one button and ten seconds later there's a curated five-card view of the most interesting ideas in the U.S. market right now, with full theses and historical edge, costing about seven cents in tokens.

Same primitives. Different orchestration. Here's how the pipeline runs.

Phase 1: macro regime

Every run starts with a check of the current macro environment. macro_regime pulls a small set of FRED series — VIX, 2s/10s spread, ISM, financial-conditions index, real yields — and a few derived indicators (regime-shift detection on VIX, yield-curve direction). The output is a one-paragraph macro summary plus a tagged regime: risk-on, risk-off, neutral, defensive. Same data feeds as the screener's macro layer; this is just the standalone read.

Why start here? Because the slice you should screen depends on the regime. In risk-off you don't want momentum longs. In risk-on you don't want defensive shorts. The regime tag is an input to the next step.

Phase 2: AI slice selection

Universe selection used to mean "scan the S&P 500." That's lazy. The real question is: given the current macro regime, what slice of the U.S. market is most likely to throw clean setups right now?

Phase 2 hands the macro summary, the regime tag, and a list of available slices to the active brain with one tool call: select_universe_slice(macro). The slices are composable via a UniverseSpec DTO — sp500, sp400, sp600, r2000, r3000, ndx, all_us_liquid, optionally narrowed by sector, industry, or a liquidity floor. The model returns a UniverseSpec, the resolver expands it to a concrete list of tickers, and the scan begins.

This is the cheapest, most leveraged use of AI in the whole pipeline. The model isn't generating prose. It's making one structured decision: "given regime X, scan slice Y." The decision is logged so I can audit it later. Most of the time it's reasonable. Sometimes it surprises me — recently it picked sp600 + healthcare + liquidity > $5M in a defensive regime and the scan threw two clean shorts I'd have missed in a generic SPX sweep.

Phase 3: scan with awaited backtest

Same screener orchestrator from the previous post, run over the selected universe. New behavior: the backtest sweep is awaited, not deferred. Every idea that clears the confluence bar comes back with its historicalEdge already populated — the bucket's win rate, expectancy, average hold, exit-reason distribution. No "click to backtest" button on the AI Picks cards. The number is just there.

Awaiting the backtest cost me about 4 seconds on a 500-ticker sweep. Worth every millisecond. Once you see backtest stats next to every idea, evaluating them takes half the time.

Phase 4: top-5 selection and enrichment

The full scan typically returns 8–25 ideas. AI Picks ranks them by a composite of confluence × backtest expectancy × R:R, then keeps the top five. Each of those five gets enriched with:

  • News from the last 7 days (Yahoo + Benzinga + Seeking Alpha + Google News).
  • Recent SEC filings (8-Ks, S-1s, 13Ds — anything that's likely to move price).
  • Insider transactions (Finnhub if available; soft-fail to neutral).
  • Reddit sentiment — top r/wallstreetbets and r/investing posts mentioning the ticker.
  • Options unusual-activity flags from the existing options layer.
  • Next earnings date with stale-data protection (more on that in the next post).

Enrichment runs in parallel — five tickers, six fetchers each, all Promise.all'd. Disk caches under {NOVA_VAULT_PATH}/cache/ mean repeat scans warm up quickly.

Phase 5: AI thesis per pick

Now we spend tokens. Each of the five enriched ideas goes into a thesis-pro generator. The model receives the screener layer scores, the levels, the historical edge stats, the news/filings/insider/sentiment summaries, the options flags, and the next earnings date. It returns:

  • narrative — 3–4 sentences explaining the setup in prose.
  • riskNotes — what would invalidate it, beyond just hitting the technical stop.
  • primaryCatalyst — what to watch over the next 24–48 hours.
  • invalidation — the level or condition that says "thesis is dead."

Two of those fields — primaryCatalyst and invalidation — used to be model-generated. They're now fully deterministic, built from enrichment.earningsNext + the top signal layer + the levels. The LLM only writes narrative and riskNotes. The reason: the model fabricated a date once, I caught it, I fixed the entire class of bug. That's the next post's story.

Every prompt has explicit date grounding ("Today is YYYY-MM-DD; do not invent dates not in the data"). Every output is post-validated by a regex that catches stale-year mentions and falls back to the deterministic template if it finds one. The model writes prose. The numbers and dates come from the data.

Phase 6: persistence and UI

The five picks land in the AI Picks tab as a curated five-card view, each with the full detail rail one click away. They also persist to the vault:

  • {vault}/Screener/AI-Picks/<timestamp>.json — full pipeline output for posterity.
  • {vault}/Screener/AI-Picks/Latest.md — markdown render, opens cleanly in Obsidian.

I can scroll back through last week's AI Picks the same way I scroll back through any other vault note. They link to the news items they cited. The graph view shows me which tickers have come up multiple times.

Cost

Token usage per run, on Sonnet:

  • Phase 2 slice selection: ~2K in / 200 out
  • Phase 5 thesis × 5 picks: ~15K in / 1.2K out
  • Total: ~17K in / 1.4K out — about $0.07 per run on Sonnet 4.6

On the Anthropic Max router, it's $0. I run AI Picks several times a day at zero marginal cost, which has changed how I use it. It's no longer a "give me an answer" tool — it's a "what's the market like right now" check that I run between coffees.

Quick prompts

Ten curated quick prompts in the HUD. "Run AI Picks." "What does the macro regime look like?" "Show me the latest scan filtered to short setups only." "Open the top idea." Each one is a tool-call shortcut. They've replaced about 80% of my manual screener interaction.

What I learned

Two takeaways generalizable to any agent feature:

  • Make the model do decisions, not data. Phase 2 is the model picking a slice. Phase 5 is the model writing prose around hard numbers. Anywhere a number is the answer, compute the number deterministically. The AI is for judgment, not arithmetic.
  • Cache aggressively before parallelizing. Disk caches for OHLC, sector tags, news. Without them, ten ticker enrichments × six fetchers each would hit Yahoo three thousand times an hour.

One regret: I didn't make the pipeline observable enough on day one. When something goes wrong — a fetch fails, a thesis generates garbage — I'm still scrolling through dev.log to figure out which phase. A proper trace UI is on the list.

Next up: the date-hallucination story. The bug that proved Phase 5 needed to lock down its dates the hard way.

Want this in real time?

Discussion happens in the Discord.

Join the Discord