ACBDiDATAP.AI
Log in

Methodology

13 AI agents. Real Airflow DAGs. One opinion. No black box.

Every BUY/SELL/HOLD call on stock.datap.ai is the output of a structured pipeline: 8 input agents gather evidence, 4 debate agents argue it out, 4 governance gates apply guardrails, and a Reflector learns from realised returns. Here is exactly what each one does.

Option A· Airflow-style (light, monochrome, like real Airflow UI)
Production DAGdatapai_stock_intelligence·13 AI agents
auto-playinghover to pause
STEP 1 · INGESTData DAGsSTEP 2 · INPUT4 signal agentsSTEP 3 · DEBATEAgentic AI · 4 personasSTEP 4 · GOVERN4 guardrailsSTEP 5 · DECIDE + LEARNOutput · Reflectorstock_eod_dynamicrunningOHLCVBashOperatorstock_fundamentals_weeklyrunning10-K/10-QBashOperatorstock_tinyfish_scanrunningIR pagesBashOperatorstock_news_monitorrunningnews + 8-KBashOperatorcompute_ta_dailysuccessRSI · MACD · MAsBashOperatorFundamental CompositesuccessVal · Qual · Growth · AnalystPythonAgentMarket Activity AgentsuccessIR-page diffsPythonAgentNews Classifiersuccessseverity + sentiment via LLMPythonAgentBull Analystsuccessbullish caseAIAgentBear Analystsuccessbearish caseAIAgentRisk Managersuccessposition sizingAIAgentPortfolio Managersuccessfinal call JSONAIAgentQuality Gatesuccessdemote C/D tierPythonAgentRegime GatesuccessTA+FA both bearishPythonAgentSanity Overridesuccessimpossible direction flipPythonAgentCritical News Overridesuccessfraud / bankruptcyPythonAgentstock_synthesissuccessBUY / HOLD / SELL rowBashOperatorstock_reflectorsuccess7d/30d/90d graderBashOperator
idle
running
Reflector feedback
📚 Dashed indigo loop = Reflector injects learned lessons into the next debate
Option B· Marketing-style (dark + coloured, more visual impact)

Production DAG · 13 AI agents

Every BUY / SELL / HOLD is the output of scheduled Airflow DAGs

Hover any node for schedule + output table · auto-plays the data flow

RAW DATAIngestion DAGsINPUT AGENTS4 signal sourcesAGENTIC AI DEBATE4-persona GroupChatGATES4 guardrailsOUTPUT + LEARNSynthesis + ReflectorDaily PricesOHLCVstock_eod_dynamicFundamentals10-K/10-Qstock_fundamentals_weeklyIR Page ScanTinyFishstock_tinyfish_scanNews FetchGoogle + 8-Kstock_news_monitorTechnicalRSI · MACD · MAsstock_weekly_ta + monthl…FundamentalVal · Qual · Growth · Analyststock_fundamentals_weeklyMarket ActivityIR-page diffsstock_tinyfish_scanNews Classifierseverity + sentimentstock_news_monitorBull🐂 bullish casestock_synthesis (asx/us)Bear🐻 bearish casestock_synthesis (asx/us)Risk Manager🛡 position sizingstock_synthesis (asx/us)Portfolio Mgr⚖️ final callstock_synthesis (asx/us)Quality Gatedemote C/Dstock_synthesisRegime GateTA+FA bearishstock_synthesisSanity Overrideimpossible flipstock_synthesisCritical Newsfraud / bankruptcystock_synthesisstock_synthesisBUY / HOLD / SELL rowstock_synthesisReflector7d/30d/90d graderstock_reflector
Ingest
Input
Debate
Gate
Synthesis
Reflector
📚 Purple dashed loop = Reflector feeds learned lessons back into the next debate
Two visual treatments — same underlying 13-agent pipeline. Pick which one stays.
The pipeline, end to end
Step 1 — Gather evidence
Input Agents · 4
Eight specialised agents independently read the data. Each emits a direction, confidence, and 1-line summary. None of them talk to each other yet.
Step 2 — Argue it out
Debate Agents · 4
Agentic AI multi-agent group chat. Bull and Bear take opposing positions. Risk Manager sizes the trade. Portfolio Manager makes the final call.
Step 3 — Guardrails
Governance Gates · 4
Post-debate sanity checks. If the call violates a hard rule (low-quality stock, bearish regime, impossible flip, critical news), it gets overridden — automatically, with reason logged.
Step 4 — Improve
Learning Loop · 1
The system measures every call against reality (7/30/90-day return), extracts patterns, and feeds them back into the next debate.

Input Agents

Step 1 — Gather evidence

Technical Analyst

Reads price action — momentum, trend, support/resistance.

Ingests: Daily OHLCV (5 years), intraday ticks, exchange-specific volume.
Strategy: Computes RSI, MACD, 20/50/200-day moving averages, Bollinger bands. Emits BUY/SELL/HOLD with confidence based on signal alignment across timeframes.
Example: RSI 72 (overbought) + MACD bearish crossover + price below 50-day MA → SELL 0.78.

Fundamental Composite

One signal that rolls up five fundamental views: valuation, quality, growth, analyst consensus, and macro overlay.

Ingests: PE / PB / EV-EBITDA · ROE / margins / debt / liquidity · revenue + EPS YoY · Wall Street ratings + price targets · Treasury yields / sector cycle / FX.
Strategy: Each sub-view (valuation/quality/growth/analyst/macro) scores 0–1 inside agents/fundamental/*. They combine into a single FA signal (BUY/HOLD/SELL + confidence) that enters the debate — the Agentic AI personas reason over the composite, not the five separately.
Example: BHP: PE 17.66 (cheap-ish) + ROE 24.7% (Quality A) + revenue +10.8% YoY (Growth A) + analyst HOLD (consensus +5.86% upside) → FA composite = BUY 0.66.

Market Activity Agent

Watches what the company itself says (and what changed).

Ingests: Investor-relations pages crawled daily via TinyFish. Diffs sentence-level changes — guidance withdrawals, risk-section expansions, tone shifts.
Strategy: Early-warning signal. A removed guidance line or new risk disclosure often precedes a public announcement by days.

News Classifier

Reads every news item about the stock and classifies it.

Ingests: Google News (12h window), Finnhub real-time wire, SEC EDGAR 8-K filings, regional sources.
Strategy: Each item passed through Gemini for event_type (FRAUD/LEGAL/EARNINGS_MISS/...), severity (CRITICAL/HIGH/MEDIUM/LOW), and sentiment. CRITICAL events trigger downstream overrides.
Example: 8-K filed citing SEC investigation → event_type=LEGAL, severity=CRITICAL, sentiment=VERY_NEGATIVE.

Debate Agents

Step 2 — Argue it out

Bull Analyst

Argues the bullish thesis to the strongest standard of evidence.

Ingests: All 4 input agents' outputs (TA / FA / Market Activity / News) + past lessons from Reflector.
Strategy: Highlights catalysts, refutes the bear's points, identifies what the market is missing. Hard-capped at 200 tokens to force concision. If bull case isn't strong enough for BUY, Bull honestly acknowledges that — Portfolio Manager may then route to HOLD or WATCH instead of forcing a fake bullish call.

Bear Analyst

Argues the bearish thesis and surfaces unpriced risks.

Ingests: Same as Bull, including Bull's argument (refuting in real-time).
Strategy: Leads with the strongest material risk. Pays special attention to CRITICAL/HIGH severity news, 8-K filings, and IR-page risk-section expansions. Hard-capped at 200 tokens. When risk is material but the audience may not hold a position (fraud, bankruptcy, sanctions), Bear pushes Portfolio Manager toward AVOID — semantically distinct from SELL which presupposes an existing position to exit.

Risk Manager

Sizes the position. Capital preservation is the brief, not direction.

Ingests: Bull's case, Bear's case, signal alignment, severity of any event.
Strategy: Recommends FULL / HALF / QUARTER / NONE position size + stop-loss + take-profit levels. CRITICAL negative events → QUARTER or NONE automatically. When signals are mixed and conviction low, recommends WATCH instead of forcing a fake HOLD. When material risk is present (fraud, bankruptcy, sanctions), recommends AVOID over SELL.

Portfolio Manager

Makes the final call. Emits the JSON the rest of the platform consumes.

Ingests: All three prior debate arguments + the original signal context.
Strategy: Synthesises into one of 7 directions: STRONG_BUY, BUY, HOLD, WATCH (no conviction yet — monitor), AVOID (material risk — don't engage), SELL, STRONG_SELL — plus confidence 0–1 + conviction (HIGH/MEDIUM/LOW) + thesis + what-bulls-say + what-bears-say + key-risk. JSON-only output, no preamble.

Governance Gates

Step 3 — Guardrails

Quality Gate

Post-debate guardrail — refuse to BUY low-quality companies.

Ingests: Quality Agent tier + is_profitable / is_growing / is_healthy flags.
Strategy: If PM emitted BUY/STRONG_BUY but quality tier is C/D, demote to HOLD with reduced confidence. Backtest-proven +~8% win rate.

Regime Gate

Post-debate guardrail — don't fight the regime.

Ingests: TA direction + FA direction.
Strategy: If both TA and FA are bearish but PM said BUY (e.g. overruled by news optimism), demote to HOLD. Reduces drawdowns in bear markets.

Sanity Override

Post-debate guardrail — catch impossible direction flips.

Ingests: All input agent directions vs. PM output direction.
Strategy: If every single input signal is bearish but PM said BUY (or vice versa), flag as inconsistent and demote to HOLD. Catches both LLM hallucinations and JSON-parse artefacts.

Critical News Override

Force protective action on material adverse events.

Ingests: News Classifier highest-severity event + sentiment.
Strategy: CRITICAL + NEGATIVE → force SELL with 85%+ confidence regardless of fundamentals. Fraud / bankruptcy / sanctions / major lawsuits do not get overruled by a low PE.

Learning Loop

Step 4 — Improve

Reflector

Closes the loop — grades past debates and learns from realised outcomes.

Ingests: Every past debate (sys_agent_debate_log) + realised 7d/30d/90d stock returns once they've actually happened.
Strategy: Three separate nightly passes (one per horizon). For each ripe debate, asks Gemini to write a 2-3 sentence lesson per persona (Bull/Bear/Risk/PM) tagged horizon:7d/30d/90d. Next debate's prompts pull the most-similar lessons via BM25, biased toward 30d+90d (longer horizon = better signal-to-noise than 7d). Live numbers visible on /performance.
Example: Currently 59.3% 30-day hit rate over 150 graded debates. Reflector's daily DAG runs at 06:00 UTC.

Why not just ask one LLM?

  • Specialisation. A single prompt has to do everything at once — read RSI, parse 10-K language, weigh BofA's downgrade, balance risk. Each of our agents is purpose-built for its narrow job, then their outputs get combined.
  • Adversarial debate. Bull and Bear are deliberately biased against each other. The Portfolio Manager doesn't see a one-sided narrative — it sees both sides argued at their strongest. Hallucinations from one side get refuted by the other before they reach the final call.
  • Governance gates. A 200B-parameter model can still emit "BUY 95%" on a stock that just filed for bankruptcy. Our gates catch that — they're rule-based, deterministic, and don't get talked out of their position.
  • Reflector loop. The system measures itself. When a call goes wrong, the pattern gets extracted and injected into the next debate's prompts. Single-LLM systems have no memory of their failures.
Not financial advice. Decisions you make using DataPai are your own. Stocks can fall as well as rise. See /performance for the live track record updated nightly.