Eight layers. Fifty-plus services. Nine REI units. One execution path from news event to order placement.
Data flows top-to-bottom. Governance flows bottom-to-top. Feedback (forensics, corrections) flows both ways.
| Store | Purpose | Persistence |
|---|---|---|
| Redis | Runtime state: theses, EAU state, primordials TTL, watchlists, performance, news cache, cycle context | In-memory, optional persistence |
| PostgreSQL | Research items (PDFs, articles, notes), daily recaps, extraction results | Durable |
| In-memory | Active positions, volatility maps, exposure graph, strength maps, price snapshots, forensics | Session only |
| File system | logs/active_positions.json — persists positions across restarts | Durable |
The Analyst is a macro-level thesis engine. It does not execute trades. Every 30 minutes it ingests the NRU digest buffer, loads prior theses from Redis, collects trading-unit feedback, gets live price snapshots, calls its dedicated REI unit, and writes updated output to Redis for trading units to consume on their next cycle.
interface AnalystOutput { activeTheses: AnalystThesis[]; // named theses with conviction, direction, invalidation recentlyKilled: AnalystThesis[]; // theses invalidated this cycle crossPortfolioAlert: { // portfolio-wide risk alerts active: boolean; type: string | null; message: string | null; }; domainGuidance: { // per-asset-class bias crypto?: DomainGuidance; equity?: DomainGuidance; fx?: DomainGuidance; }; forwardLooking: { recommendedPosture: 'FULL_DEPLOYMENT' | 'TACTICAL_ONLY' | 'REDUCE' | 'NO_NEW_RISK'; scenarioProbabilities: { baseCase, bullCase, bearCase, reversalCase }; alreadyPricedScore: number; // 0-100: how much is priced in marketAheadOfDataScore: number; // 0-100: how far ahead market moved }; analysis: { digestSummary: string; thesisChanges: string; marketRead: string; upcomingCatalysts: string; keyRisks: string[]; }; }
ACTIVE → WEAKENING → KILLEDEXTREME · HIGH · MEDIUM · LOW{ BTC: "BULLISH", GOLD: "BULLISH", USD: "BEARISH" }formedAt, lastReinforced, ageHours| Posture | Portfolio Manager behavior |
|---|---|
| FULL_DEPLOYMENT | Normal evaluation — standard PM rules apply |
| TACTICAL_ONLY | Max 1 new trade, 50% sizing cap |
| REDUCE | No new entries, reduce existing exposure |
| NO_NEW_RISK | Hard block on all new entries |
Every component in L6 is pure math, no AI calls, no cycle dependencies. Each runs in OFF, ADVISORY, or ENFORCING mode.
APPROVE · REDUCE (shrink with reason) · REJECT (block with reason)| State | Condition | Action |
|---|---|---|
| ALLOW_MARKET | No chase risk | Proceed with IOC or market |
| ALLOW_LIMIT | Mild chase | Use limit at current price |
| CONVERT_PULLBACK | Extended | Limit below current (long) or above (short) |
| DELAY_RETEST | Breakout chase | Wait for retest confirmation |
| REJECT_EXTENDED | Too extended | Block entirely |
Deterministic partial profit-taking, never AI-dependent. Rungs by asset class: at +X% profit → scale out Y% of position. Progressive stop tightening as profit grows. Tracks executed rungs per position to prevent double-execution. Actions: HOLD, TIGHTEN_STOP, SCALE_OUT_PARTIAL, SCALE_OUT_AND_TIGHTEN.
JUST_STOPPED → (4h cooldown) → WAITING_RECOVERY → (price reclaims + thesis active) → RECOVERY_CONFIRMED → REENTRY_ALLOWED_HALF (50% size) → REENTRY_ALLOWED_FULL (full)
Blocks re-entry after: 3 consecutive stops on same symbol, thesis killed, within cooldown.
Runs every 60 seconds, independent of trading cycles.
| Trigger | Detection | Action |
|---|---|---|
| SHOCK_MOVE | Rapid PnL drop | EMERGENCY_CLOSE or REDUCE_50 |
| INVALIDATION_BREAK | Price crosses invalidation level | EMERGENCY_CLOSE |
| PROFIT_RATCHET | Gave back >50% of peak profit | TIGHTEN or REDUCE_50 |
| CASCADE_BTC_DUMP | BTC dumps → alt longs at risk | TIGHTEN all alt longs |
| EXTENDED_DRAWDOWN | Losing >X% >1 hour | ALERT → REDUCE_50 |
| SOFT_SL_BREACH | Price below soft SL level | SOFT_SL_CLOSE after N checks |
| NEWS_INVALIDATION | News invalidates thesis | EMERGENCY_CLOSE |
After acting, Sentinel injects sentinelActions[] into the next cycle so the AI knows what happened.
Scores every closed trade on decision quality across six labels:
Labels feed back to Analyst and trading units for idea-quality-vs-execution-quality separation.
| Cycle | Default | Dynamic range | Trigger |
|---|---|---|---|
| V2 Crypto | 60 min | 15 to 240 min | AI-recommended, market conditions |
| HL Equity | 60 min | 30 to 240 min | Market session, positions |
| IB Equity | 120 min (market hours) | 45 to 360 min | Session hours, news / research |
| Analyst | 30 min | Fixed | Timer (ANALYST_INTERVAL_MS) |
| News (NRU) | Continuous | WebSocket stream | Real-time + cron batches |
| EAU | 30 min | + breaking news trigger | Timer + NRU urgent flag |
| Price Sentinel | 60 sec | Fixed | Independent of cycles |
Dynamic intervals respond to: market session, position floor (minimum when positions open), AI-recommended next-check interval, performance state, recent position closes, news and research triggers. Weekend gate suppresses trading cycles Saturday through Sunday evening; ingestion continues.
Central execution service: TradingService. Receives approved signals from the governance pipeline and executes them.
tradingPaused flag stops all new execution globally| Exchange | Service | Use |
|---|---|---|
| Hyperliquid | HyperliquidService, HyperliquidV2Service, HyperliquidFxService | Crypto, equity/commodity, FX perps |
| Interactive Brokers | IBKRService via IB Gateway | Real stocks and ETFs |
| Binance | BinanceService | Price data reference |
| OKX | OkxService | Price data reference |
| Bybit | BybitService | Price data reference |
Document ingestion pipeline for IB Equity. Runs in six stages from upload to cycle-payload injection.
1. Upload PDF / DOCX / image uploaded via API 2. Kimi OCR Moonshot AI extraction · handles scans, charts, tables 3. REI extraction thesis, catalysts, risks, tickers, themes, conviction, timeHorizon 4. PostgreSQL store in ib_equity_research table 5. Teaching call dedicated call to IB Equity REI unit, tracked in Redis 90d 6. Cycle payload buildResearchContext() injects into every IB Equity cycle
interface ExtractionResult { thesis: string; catalysts: string[]; risks: string[]; tickers: string[]; conviction: 'HIGH' | 'MEDIUM' | 'LOW'; timeHorizon: string; // e.g., "3-6 months" actionableSummary: string; themes: string[]; // AI_INFRASTRUCTURE, DEFENSE, etc. }
| Service | Role | Update frequency |
|---|---|---|
| Laevitas | Funding, OI, basis, liquidations, options flow | On demand |
| Laevitas Stream | Real-time derivatives WebSocket | Continuous |
| Volatility Service | Per-asset velocity, regime, range expansion | Every 3 min |
| IB Data Service | Real-time equity + Polygon technicals | On demand |
| Equity Data Service | Hyperliquid perp market data | On demand |
| Equity Strength (ERSS) | Relative strength vs benchmark / sector | Per cycle |
| Alt Strength | Crypto altcoin strength vs BTC / ETH | Per cycle |
| Price Intelligence | News reaction, unusual volume, technical signals | Per cycle |
| Benzinga | Analyst upgrades, downgrades, price targets | Per cycle |
| Market Calendar | Exchange hours, holidays, early closes | On demand |
| Daily Recap (Kimi) | Short-term (3d) + long-term (2-6mo) outlook | Per day |
| Unit | Role |
|---|---|
| IB Equity | Real equity execution through Interactive Brokers |
| HL Equity | Equity and commodity perpetuals on Hyperliquid HIP-3 |
| V2 Crypto | Crypto perpetuals on Hyperliquid |
| News (NRU) | Real-time news classification and sentiment |
| Event Anticipation | Scheduled-event overlay and forward exposure |
| Equity Review (ERU) | Validates HL Equity proposals |
| Crypto Review (WVU) | Validates V2 Crypto proposals |
| IB Equity Review | Validates IB Equity proposals |
| Analyst | Cross-asset thesis synthesis |
Each unit runs on an isolated reasoning channel. Unit-level credentials and internal identifiers are not published.
| Partner | Surface |
|---|---|
| Polygon.io | US equity market data and technicals |
| Benzinga | Analyst upgrades, downgrades, price targets |
| Synoptic | Real-time news feed |
| Laevitas | Crypto derivatives analytics |
| Moonshot AI (Kimi) | Document OCR and extraction |
| Interactive Brokers | Real equity execution |
| Hyperliquid | Perpetuals execution (equity HIP-3, crypto) |
Every governance layer can be independently run in one of three modes, so new rules are paper-tested before they gate real capital:
| Mode | Behavior |
|---|---|
| OFF | Layer inert — no gating, no advisory output |
| ADVISORY | Layer evaluates every decision and logs verdicts, but does not gate |
| ENFORCING | Layer actively gates capital and blocks violations |
Position Manager, Risk Brake, Entry State Machine, and Profit Ladder each carry independent mode settings.
Hanabi-2 is a proprietary prediction model, not part of the REI Core reasoning engine. Where REI Core produces structured analytical reasoning (theses, verdicts, position reviews), Hanabi-2 produces numerical probability distributions over future price paths. The two are complementary: REI Core decides whether a thesis is valid; Hanabi-2 quantifies what the market is likely to do over a specific horizon.
Division of labor between Ecliptica and REI Labs on Hanabi-2: REI handles model architecture, training, and infrastructure. Ecliptica defines product requirements, institutional client specifications, integration surface, and the data contract between Hanabi-2 outputs and STRATA's consumers.
| Component | Choice | Rationale |
|---|---|---|
| Temporal encoder | Temporal Convolutional Network (TCN) | Captures local patterns across variable windows; stable gradients vs RNNs |
| Attention layer | Causal self-attention | No look-ahead leakage; weighted aggregation of historical context |
| Output head | Mixture Density Network (MDN) | Produces full probability distributions, not point estimates |
| Horizons | 1h, 4h, 12h, 24h (multi-horizon) | Tactical and positional timeframes addressed in a single forward pass |
| Training target | Realized volatility + directional distribution | Institutional-relevant outputs; distribution-aware loss function |
Point forecasts are insufficient for institutional decision-making. A model that says "BTC goes to 52,000 in 4 hours" is not actionable without a confidence measure. An MDN output produces a full distribution: mean, variance, skew, and tail behavior. Downstream consumers can query "what is the probability BTC is below 48,000 in 4 hours" or "what is the 5th-percentile outcome" — the information needed for position sizing, stop placement, and tail-risk hedging.
When production-integrated into STRATA, Hanabi-2 will plug in at two points:
hanabiForecast field alongside volatilityContext — per-symbol distributions at each horizon. REI Core's reasoning incorporates the distribution shape into its proposal logic.Hanabi-2 is also intended to be available to institutional clients as a standalone forecast product via the Ecliptica Intelligence API, independent of STRATA deployment. Clients can consume distribution outputs directly into their own risk and sizing systems. Commercial terms to be defined.
ADVISORY-then-ENFORCING deployment protocol applied to governance rules.
For unit-by-unit detail (trading units, review units, intelligence units, primordials per unit, teaching endpoints), continue to units. For the edge framing, see the edge. For LP-grade risk posture, see diligence.
STRATA is in selective deployment with institutional counterparties. For allocator diligence, partnership inquiries, or licensing discussions, contact Ecliptica directly.