05EdgeQuant.AI · Technical Write Up

How EdgeQuant is built.

An architecture deep dive into EdgeQuant, an experimental personal project with 17 specialized AI agents and 7 automated strategies across crypto and U.S. equities. The focus is reliability under failure, not prompts.

Overview

Most AI projects stall between a working demo and a system that can run unattended. EdgeQuant was built to cross that gap. It treats every model response as untrusted input, runs it through typed contracts, evaluations, and deterministic rules, and logs every decision, including every decision not to act.

17
Specialized AI agents
7
Automated strategies
3
Model providers
14
Typed skip reasons
  • 01Model output is untrusted until it passes schema and deterministic checks.
  • 02Every repeated job is idempotent.
  • 03Stale data is rejected, not used.
  • 04Risk limits are code, never model output.
  • 05Every decision, including a skip, is logged with a reason.

1. The decision pipeline

Six stages, each with a defined input, job, and output. A candidate can be dropped at any stage, and the reason is recorded.

  1. STAGE 01
    Universe Filter
    Input

    Raw market and on chain feeds

    What it does

    Drops illiquid names, wide spreads, and any feed older than its freshness watermark.

    Output

    Clean, tradable candidate list

  2. STAGE 02
    Regime Classifier
    Input

    Macro, volatility, breadth, flows

    What it does

    Labels the market as trending, mean reverting, compressing, or expanding.

    Output

    Regime tag that decides which strategies may act

  3. STAGE 03
    Prediction Engine
    Input

    Candidate plus regime context

    What it does

    GPT, Claude, and Gemini produce typed predictions with direction, confidence, horizon, and invalidation.

    Output

    Validated prediction set, disagreement recorded

  4. STAGE 04
    Trading Committee
    Input

    Predictions plus evidence

    What it does

    Six engines assess, estimate probability, recommend, stress test, check portfolio fit, then decide.

    Output

    Attributable proposal with dissent noted

  5. STAGE 05
    A+ Gate and Risk Engine
    Input

    Proposal plus portfolio state

    What it does

    Explicit checks and deterministic limits. Every rejection is logged with one of 14 typed skip reasons.

    Output

    Approve, or skip with a reason

  6. STAGE 06
    Execution and Telemetry
    Input

    Approved action

    What it does

    Paper execution first, idempotent dispatch, and a full audit trail of every step.

    Output

    Journal entry, outcome tracking, alerts

  feeds ──► [01 Universe Filter] ──► [02 Regime] ──► [03 Prediction Engine]
                │ stale / illiquid         │                 │  GPT · Claude · Gemini
                ▼                          ▼                 ▼  (routed, with failover)
             SKIP(reason)          strategy allow list   [04 Trading Committee]
                                                             │
                                                             ▼
                                   [05 A+ Gate + Risk Engine] ── SKIP(1 of 14 reasons)
                                                             │ approve
                                                             ▼
                                   [06 Execution + Telemetry] ──► journal · alerts · outcome tracker
                                                             │
                                   accuracy tracker ◄────────┘  (feeds routing and calibration)

2. The 17 specialized agents

Agents are split by responsibility so that no single model both proposes and approves an action.

6

Trading Committee Engines

No single model makes the final call.

AssessmentProbabilityRecommendationRiskPortfolioDecision
4

Trading Bots

Two equity and two crypto bots that scan, propose, and measure.

Stocks ConvictionStocks PredictionCrypto ConvictionCrypto Prediction
7

Governance and Learning Agents

The layer that keeps the platform honest and improving.

Root CauseOptimizationRegressionDeploymentRollbackAgent CouncilPlatform Learning

Separately from the agents, EdgeQuant runs 7 automated strategies. Strategies define when to look for a setup; agents decide whether the setup is good enough.

3. Multi model routing

EdgeQuant uses tiered model specialization. Each workload is assigned the model that fits its latency and depth needs, by design. Running every prompt through three models and voting would triple cost, burn rate limits in volatile sessions, and wait on the slowest model, which destroys intraday edge. It would also be one model grading another, with no ground truth.

Gemini · throughput

Low latency, high volume work: news sentiment, the macro session gate, market context, rapid prediction sweeps, and signal enrichment. A deeper Gemini tier runs the platform's full self audit.

GPT · reasoning

Structured logic and deep synthesis: the Hedge Fund Engine, short conviction screening, where to focus, the institutional memo, blow up analysis, and the daily brief.

Claude · standby

Connected and health monitored as a provider, ready to take on workloads. Not assigned a production task in the current release.

Deterministic first ensemble

Models never invent prices. A pure code forecast ensemble computes multi horizon expected returns, Bull, Base and Bear targets, regime tags, and entry, stop and target zones from market data alone. It is reproducible and uses no AI. Models are layered on top to synthesize and stress test the thesis, not to produce the numbers.

Picking the best model by evidence, not opinion

The best model is decided by measured outcomes. Every prediction from every engine is recorded with its price, horizon and targets. When the horizon matures, the system scores direction hit rate, target hit rate, and whether high conviction calls actually hit more often than low ones, across 1 day, 7 day, 30 day and 90 day horizons. When several engines flag the same asset, a composite conviction score decides which signal wins.

1Task arrives
2Specialized model
3Schema validation
4Record prediction
5Score at horizon
6Calibrate engines

Resilient circuit breaking

Scheduled jobs sit behind a circuit breaker. After 3 consecutive failures a job pauses for 30 minutes and logs CIRCUIT_BREAKER_TRIPPED. Retrying every minute would hammer a degraded API, exhaust database connections, and risk duplicate actions. Pausing lets rate limits reset and keeps one failing provider from cascading across the platform. A health check samples every data and AI provider, and output that fails validation counts as a failure. The system never repairs a broken answer by guessing.

4. Production failure modes

Prompt engineering gets a model to answer. AI engineering keeps the system correct when the model, the data, or the infrastructure misbehaves. These are the failures EdgeQuant is built around.

FailureHow it shows upEngineered response
API rate limits and throttlingProvider returns 429 or slows down during market hoursAfter 3 consecutive failures the job's circuit breaker pauses it for 30 minutes
Cron runs late or twiceScheduled job overlaps its previous runIdempotency key per job window; a repeated run cannot repeat an action
Web extraction payload changesScraped page structure shifts and fields go missingSchema validation at ingestion; invalid payloads are quarantined and alerted
Database timeoutsWrites stall under loadBounded retries, then skip with a logged reason instead of acting on partial state
Silent data gapsFeed keeps returning the last known valueFreshness watermarks; stale inputs are rejected before any model sees them
Malformed model outputResponse is not valid JSON or misses fieldsTreated as a failure, never as an answer; the run is skipped with a reason
Model quality driftAn engine gets worse at a task over timeAccuracy tracker scores every prediction at its horizon and exposes the decline

5. Evaluations and guardrails

Every agent output is scored before it can influence a decision. Behavioral evaluations and a red teaming conformance harness run against synthetic shocks, misleading headlines, and missing fields.

Schema

Output parses against the typed contract

Freshness

Data timestamp is inside the window for its horizon

Grounding

Rationale cites only data that was in the input

Consistency

Direction, confidence, and rationale agree

Red team

Holds up under injected misleading headlines and missing fields

Calibration

Stated confidence matches observed hit rate over time

A self measurement loop records every prediction and scores it against what actually happened across four horizons: scalp, intraday, swing, and long term. Calibration results feed back into the agents' scoring, so the system improves from evidence rather than opinion.

1Predict
2Record
3Wait for horizon
4Score outcome
5Update calibration
6Adjust scoring

6. Where AI is not allowed to decide

Models can propose. They cannot override risk. These limits are plain deterministic code, evaluated after every proposal, and they always win.

Kill switch

Operator controlled. When on, nothing new is approved.

Equity floor

If equity falls to the floor, new risk stops until reviewed.

Cooldown

After a loss or a burst of activity, a strategy must wait.

Sector cap

Concentration in one sector or theme is capped.

Portfolio heat

Total open risk across all positions is capped.

Position sizing

Size is computed by rules, never chosen by a model.

The 18 A+ gate skip reasons

Every candidate that fails the final quality gate is logged with one of these typed reasons, taken directly from the production code.

APLUS_RR_TOO_LOW

Risk/reward below the minimum

APLUS_OVEREXTENDED

Price too far from EMA21, no chasing

APLUS_REGIME_OFF_LONG

Long blocked, regime is risk off

APLUS_REGIME_OFF_SHORT

Short blocked, regime is risk on

APLUS_WEAK_THEME

Not in a high conviction theme

APLUS_NO_TRADE_ZONE

Chop or range regime, wait for a trend

APLUS_LOW_CONVICTION

Composite conviction below threshold

APLUS_DAILY_CAP

Max new trades per day reached

APLUS_SCAN_CAP

Max new trades per scan reached

APLUS_NO_TRADE_MODE

Operator pause is on

APLUS_REGIME_LOW_CONF

Regime confidence below threshold

APLUS_PULLBACK_WEAK

Pullback or flag has a weak retest

APLUS_THEME_CAP

Max trades for this theme reached

APLUS_CLUSTER_CAP

Theme cluster exposure cap reached

APLUS_SECTOR_LAGGARD

Long blocked, capital rotating out

APLUS_SECTOR_LEADER_SHORT

Short blocked, capital rotating in

APLUS_MACRO_RISK_OFF

Long blocked, high confidence risk off macro

APLUS_MEMORY_NEGATIVE

Trade memory shows 20+ similar setups losing

The human operator sets the rules and can stop the system at any time. The platform is designed to know when not to trade.

7. How changes reach production

The governance agents run a gated release loop. No improvement goes live without a historical replay and peer review, and any change that degrades measured results is reverted.

1Root Cause detects
2Optimization proposes
3Regression replays history
4Agent Council reviews
5Deployment promotes
6Rollback guards

What stays private

Strategy parameters, feature formulas, thresholds, account data, and credentials are not published. This write up covers the architecture and engineering practices, not the trading edge. EdgeQuant is an experimental personal project, not a commercial product or investment advice.