Methodology
Attention Queue Algorithm
A ranked list of positions that need action, ordered by a 0–100 composite score. The queue blends factor drift, smart-money behavior, insider signals, filing red flags, and position importance. It is computed daily and refreshed when new data arrives (13F, insider filings, factor snapshots, alerts).
Scoring Model
We use a weighted linear blend, then normalize to 0–100 with time decay:
score = 100 * sigmoid( Σ w_i * s_i ) s_i ∈ [-1, +1] per signal w_i from table below time_decay = exp(-age_days / 14) final_score = score * time_decay
Signals are clamped to [-1, +1]. Positive values mean “good”; negative values increase urgency. Scores below 50 are typically excluded from the queue (see thresholds).
Signal Weights
Weights are tuned to favor high-severity, slow-moving signals (red flags, exit pressure) over noisy intraday moves.
Validation Status
Attention Queue inputs are tied to the claims registry where available, including the watch metrics and factor inputs that drive downstream storycards and queue explanations.
8 count
Count of storycardWatchMetric enum values in src/schemas/storycard.schema.ts: factor_drift, holder_iq_change, insider_activity, earnings_date, litigation_update, filing_red_flag, price_breakout, other
Test evidence: tests/services/storycard.test.ts
12 count
Count of factor exposure inputs to storycard LLM: marketBeta, size, btop, growth, divYield, leverage, resVol, mom11mnZs, mom3wkZs, shortInterest, hfOwn, passOwn
Test evidence: tests/services/storycard.test.ts
Source: docs/claims.json, generated 2026-05-03.
Thresholds & Gating
- Visibility: items with score ≥ 50 enter the queue; scores below 40 are dropped.
- Tier limits: Free shows top 3; Pro shows all; Premium shows all + history + alternatives.
- Decay: 14-day half-life; severe red flags ignore decay for 7 days.
- Rate limits: max 50 items/user to keep UI responsive; highest scores win.
Data Inputs
Market & Factors
Daily factor snapshots, price gaps, volatility spikes, style drift (size/value/momentum/quality/vol).
Smart Money
Holder IQ (13F) momentum, exit pressure, crowding scores, concentration HHI.
Insiders
Form 3/4/5 severity with role weighting, clustering, and 10b5-1 discounting.
Filings & Red Flags
Going concern, material weaknesses, auditor changes, litigation/SEC language.
Actionable Alternatives
For scores ≥ 50 we fetch factor-neutral substitutes via findAlternatives(). Premium shows full alternatives; Pro shows the top pick. Substitutes must be wash-sale-safe (for tax workflows) and meet a minimum factor similarity of 60%.
Refresh & APIs
- Jobs: Nightly attention-queue refresh job + on-demand triggers after major events (new 13F, insider filing, factor drift alert).
- API:
GET /api/v1/portfolio/attention-queue(tier gated). - Cache tags:
attention-queue:{userId}for invalidation after updates.
Limitations & Known Biases
- The queue is only as fresh as the newest brokerage sync, factor snapshot, insider filing, and 13F ingestion job.
- Weights intentionally favor high-severity slow-moving evidence, so short-lived price dislocations can be under-prioritized.
- Scores compare risks within one user portfolio; they are not a cross-user ranking or buy/sell recommendation.
Citations & Research Basis
- Multi-factor risk attribution literature informs the factor-drift and exposure-change components.
- Institutional ownership, insider-trading, and filing-risk research provide the slow-moving evidence streams that receive higher queue weight.
- Operational alerting practice informs the decay window, duplicate suppression, and tier-specific presentation limits.
Source Code References
The attention queue methodology is implemented in these modules:
src/services/attention.ts— Queue management and scoringsrc/lib/analytics/attention.ts— Score computation utilitiessrc/app/api/jobs/attention-queue/route.ts— Refresh jobsrc/components/attention/attention-queue-list.tsx— UI rendering
Related beads: bd-9zpgh.5 (sentiment integration), bd-268k0.11 (red flag detection)