← Lab
→ Lab / Swing Trading Council

Swing Trading Council.

A multi-agent pipeline that screens U.S. equities, deliberates entries through a council of trader personas, and places bracket orders. Currently in paper mode.

→ Architecture

Click any stage to expand its details.

  1. Trigger Scheduled task Daily, off-hours

    A cron-style schedule fires the pipeline once a day, outside U.S. market hours. The trigger carries no payload — every parameter (regime, universe, capital state) is read from project state at run time. Jitter is added to avoid synchronised spikes against upstream data providers.

  2. Setup Read regime Offensive, defensive, or cash

    Before any per-ticker work, the pipeline reads a market-regime classification. Offensive means advance is favoured and new entries are allowed; defensive means caution; cash means skip the day entirely. When the regime store is missing, the safe default is defensive.

    Setup Load universe Shariah-eligible U.S. equities

    The pipeline scans a working list of equities pre-filtered for Shariah eligibility. The full eligibility sweep runs quarterly; the daily scan only re-validates and reads the cached list at start.

  3. For each ticker
  4. Gate 1 Shariah screen Sector, debt, interest filters

    Sector exclusions, debt-to-asset ratio, interest-bearing income share and similar rules are applied per ticker. Fundamentals are served from a 72-hour local cache, so the daily scan never touches the slow upstream API.

  5. Gate 2 Technical + fundamental screen Minervini trend template

    A rules-based check combining the Minervini trend template (price relative to its 50-day and 200-day moving averages, position within the 52-week range, MA alignment) with a fundamentals score. Most rejections happen here — typically more than 90% of the universe.

  6. Decision Regime gate Offensive → continue, otherwise → skip

    If the regime isn't offensive, every Gate-2 survivor is logged as a skip with reason 'regime gate'. The council never runs — no point spending compute when no entry can clear final approval. This is a deliberate guardrail, not a bug: it makes regime classification the single switch that turns the strategy on or off.

  7. Gate 3 Council deliberation Five trader personas, sequential

    Five sub-agents are dispatched, one per trader persona. Each member sees the same context and returns a verdict in JSON. Members run in order — the first four can short-circuit the chain with a reject, so a clearly broken setup never reaches the back of the queue. Livermore runs last and only annotates.

    • Weinstein Stage classification

      Is the chart in a stage 2 advance? Weekly trend, 30-week MA slope, breakout volume.

    • Ryan Fundamentals

      EPS acceleration, sales growth quarter on quarter, margin trajectory. A growth-quality lens on what the technicals already approved.

    • Kell Strength + liquidity

      Relative-strength rank against the broad universe and average dollar volume. Stops the council from buying thin or laggard names.

    • Minervini Setup + stop

      VCP / pivot setup quality, stop placement relative to ATR, reward-to-risk ratio. Includes a guardrail: stops tighter than half a percent are rejected as noise traps.

    • Livermore Tape + psychology

      Annotation only — never blocks an entry. Reads the recent action for the kind of crowd-behaviour signals Livermore would have called the "tape".

  8. Gate 4 Risk approval Sizing, drawdown, position cap

    Final position sizing, drawdown circuit-breaker against a peak-equity high-water mark, and a cap on simultaneous open positions. The fourth gate is what makes this "a council with a risk officer", not five opinions averaged.

  9. Output Place bracket order Entry · stop · target

    An atomic three-leg bracket — a market parent for entry, a stop-loss child, and a limit-target child — submitted to the broker as a single transaction. If the parent fills, the children become live and one-cancels-the-other; one of them eventually closes the position.

    EntryMarket parent
    StopStop child
    TargetLimit child
Observability Append-only journal Every gate decision and every order is recorded — the single source of truth for later reports and weekly reviews.
→ Notes

The pipeline is the operating model first, the broker integration second. Each gate exists to take work off the council's plate — by the time a candidate reaches Gate 3, it has already passed a Shariah filter and a technical screen, so the deliberation can stay focused on whether this setup is actually worth a position.

The five-member council is sequential rather than parallel for one reason: the first reject ends the chain. A broken setup never burns compute on a Minervini-grade pivot read — the cheapest filter runs first. Livermore stays at the back of the line and never blocks because the call is rarely "yes / no" on the tape; it's a colour layer over a decision the rest of the council has already made.

None of this is novel in isolation. The components (regime classification, technical templates, council voting, bracket orders) are well-trodden ground. What's interesting is the seam — keeping every layer simple enough that the failure mode is obvious, and making the journal the only place state lives so the whole thing can be audited from one file.