How I Built AlphaDesk: AI Market Intelligence with ICDEV

How I Built AlphaDesk: AI Market Intelligence with ICDEV

Most market intelligence tools cost tens of thousands per year and still require you to stitch together data from multiple vendors. I wanted something different: a single platform that scans 232 tickers across 18 industries, builds a knowledge graph of market relationships, runs what-if scenario simulations, and surfaces actionable trading signals, all powered by local AI models with zero cloud API costs. So I built AlphaDesk using ICDEV’s GOTCHA framework, and this article walks through exactly how each capability was constructed.

What AlphaDesk Actually Does

AlphaDesk is an 11-page market intelligence dashboard that combines fundamental analysis, technical signals, macro indicators, and AI-driven scenario modeling into a single interface. It tracks everything from mega-cap tech stocks to biotech, defense, crypto, and commodities.

AlphaDesk overview dashboard showing portfolio value, daily P&L, active positions, and pending signals

The platform runs on ICDEV, the same framework we use to build FedRAMP-compliant government applications. The key insight: the patterns that make compliance automation reliable (deterministic tool execution, structured knowledge, audit trails) also make excellent building blocks for financial intelligence.

The GOTCHA Framework: Why It Works for Market Intelligence

ICDEV’s GOTCHA architecture separates concerns into six layers: Goals, Orchestration, Tools, Context, Hard Prompts, and Args. This separation is critical for a trading platform where you need deterministic, repeatable analysis rather than probabilistic guessing.

Layer AlphaDesk Usage
Goals Define analysis workflows: scan universe, score tickers, generate signals
Tools Python scripts for scanning, scoring, alerting, knowledge graph enrichment
Args YAML configs for risk thresholds, sector weights, daemon schedules
Context Market reference data, sector definitions, historical replay templates
Hard Prompts LLM instruction templates for narrative generation and Socratic analysis

Every tool is deterministic. The LLM layer only enters for narrative summaries and the AI advisor, and even then it runs on local Ollama models (qwen3.5, gemma3) with zero cloud costs.

Knowledge Graph: 286 Nodes, 544 Edges

The most powerful feature in AlphaDesk is its knowledge graph. Unlike traditional watchlists that treat each ticker in isolation, the knowledge graph maps relationships between tickers, sectors, ETFs, commodities, macro indicators, and key executives.

AlphaDesk Knowledge Graph Explorer showing 252 nodes, 294 connections, 25 communities, and 10 structural gaps with network visualization

How We Built It

The knowledge graph is seeded by tools/trading/market_intel/kg_seeder.py, which creates entity nodes and relationship edges stored in ICDEV’s SQLite database. The graph supports nine relationship types including sector membership, ETF holdings, commodity dependencies, and executive affiliations.

The real value comes from structural gap detection, inspired by InfraNodus. The system identifies disconnected clusters in the graph and generates research questions that bridge those gaps. For example, if defense stocks and semiconductor stocks are highly connected internally but weakly connected to each other, the system flags that as a structural gap worth investigating.

ICDEV’s kg_enricher reflex runs every 6 hours autonomously, adding new edges as market relationships evolve.

Autonomous Daemon: 7 Reflexes Running 24/7

AlphaDesk doesn’t wait for you to check it. Seven autonomous reflexes run continuously via Windows Task Scheduler, each handling a specific aspect of market monitoring.

AlphaDesk Market Intelligence page showing Trading Daemon enabled with five active reflexes: alert_detector, approved_monitor, kg_enricher, macro_watcher, and market_scanner

Reflex Interval Purpose
market_scanner Every 1h Scans full 232-ticker universe, generates buy/sell/hold scores
approved_monitor Every 15m Tracks approved signals for entry/exit conditions
macro_watcher Every 30m Monitors macro indicators (Fed funds rate, VIX, yield curve)
alert_detector Every 10m Detects anomalies, price spikes, volume breakouts
kg_enricher Every 6h Enriches knowledge graph with new market relationships
gap_detector Every 4h Identifies structural gaps in the knowledge graph
scenario_analyzer Every 4h Runs scenario simulations against current market conditions

This architecture follows ICDEV’s daemon pattern from the Genesis autonomous research lab, where reflexes operate independently with configurable risk tiers. GREEN-tier actions (like scanning) execute automatically. YELLOW-tier actions (like signal generation) require human approval.

Signal Generation and the Approval Gate

When the market_scanner reflex identifies a potential trade, it doesn’t execute automatically. It generates a signal with a composite score and confidence rating, then queues it for human review.

AlphaDesk Signals page showing a pending BUY signal for AAPL with score 66.2 and 80% confidence, awaiting human approval

Each signal includes:

  • Composite score combining fundamental, technical, and sentiment factors
  • Confidence percentage based on data quality and model agreement
  • Direction (BUY, SELL, or HOLD) with supporting rationale
  • Approval actions so you can approve, reject, or investigate further

This human-in-the-loop pattern comes directly from ICDEV’s self-healing architecture, where actions above a confidence threshold can auto-execute, but anything below requires human confirmation.

What-If Scenario Engine: 29 Pre-Built Simulations

Markets don’t move in isolation. A Fed rate cut affects bonds, which affects bank stocks, which affects lending, which affects real estate. AlphaDesk’s scenario engine lets you model these cascade effects before they happen.

AlphaDesk What-If Scenario Analysis showing 11 scenarios analyzed, 9 potential events, 2 alerts generated, with historical replay templates including the 2001 Dot Com Crash, 2008 Financial Crisis, Black Monday 1987, and COVID-19 Pandemic Crash

The engine includes three scenario types:

Historical Replays

Replay historical market events (2008 Financial Crisis, COVID crash, Black Monday 1987) against your current portfolio to stress-test holdings. The system maps historical sector rotations to your current positions.

What-If Templates

Pre-built templates for common scenarios: AI/ML demand surge, cybersecurity threat escalation, defense spending surge, EV adoption, pandemic resurgence, interest rate increases, and supply chain disruptions.

Custom Scenarios

Define your own trigger events and propagation rules. The cascade engine uses breadth-first search (10-deep, 10-wide) through the knowledge graph to trace how a single event ripples across sectors and tickers.

Cascade Analysis: Tracing Market Ripple Effects

The cascade engine is where the knowledge graph, scenario engine, and signal generator converge. When you select a scenario trigger, the engine propagates the impact through every connected node in the knowledge graph.

AlphaDesk cascade flow diagram for an AI/ML Demand Surge scenario showing 4 triggers propagating through 44 discoveries with 39 net impact and 0 alerts, with a visual BFS tree of affected tickers and sectors

The cascade produces:

  • A visual flow diagram showing the propagation path from trigger to affected tickers
  • A BUY watchlist of tickers with positive cascade impact
  • An AVOID list of tickers with negative cascade impact
  • Net impact scores for each node, weighted by relationship strength and distance from trigger

This is built on ICDEV’s graph traversal engine, the same infrastructure that powers compliance control mapping (tracing a NIST 800-53 control through 9 compliance frameworks).

AI Advisor: 6 Expert Perspectives on Every Ticker

Instead of giving you one AI opinion, AlphaDesk provides six distinct analyst personas, each evaluating the same ticker through a different lens.

AlphaDesk AI Advisor showing six expert opinions on AAPL: Value Investor, Growth Momentum, Macro Contrarian, Technical Trader, Income and Dividend, and Geopolitical Strategist, all rating HOLD, with a Chief Investment Strategist consensus of HOLD at 6/10 confidence

Persona Focus
Value Investor Intrinsic value, margin of safety, balance sheet strength
Growth Momentum Revenue growth, market share expansion, TAM
Macro Contrarian Fed policy, yield curve, sentiment extremes
Technical Trader Price action, support/resistance, volume patterns
Income & Dividend Yield sustainability, payout ratio, dividend growth
Geopolitical Strategist Regulatory risk, trade policy, geopolitical exposure

A Chief Investment Strategist synthesizes all six perspectives into a consensus recommendation with a confidence score. This multiperspectivity approach draws from ICDEV’s INTaaS intelligence platform, where multiple analytical perspectives reduce bias in decision-making.

All six personas run on local Ollama models through ICDEV’s LLM Router (tools/llm/router.py), which manages model selection, fallback chains, and token optimization. Zero cloud API costs for analysis.

Analysis Evolution: Tracking How Signals Change Over Time

Markets are dynamic. A strong BUY signal from last week might be neutral today. The Evolution page tracks how each ticker’s composite score, confidence, and analyst consensus change over time.

AlphaDesk Analysis Evolution page for AAPL showing 4 total analyses, HOLD direction, YELLOW signal status, with charts for Signal Evolution composite score and confidence, Analyst Contribution over time, and Macro Regime Timeline

This historical tracking uses ICDEV’s append-only audit trail pattern, the same architecture that ensures compliance evidence cannot be tampered with in government applications.

The Full Analysis Pipeline

The Analysis page shows every ticker that has been scanned, with scores, directions, confidence ratings, and advisor recommendations visible at a glance.

AlphaDesk Analysis page showing run history with multiple tickers including ETHUSD, AAPL, BTCUSD, NVDA, and others, displaying scores, directions, confidence percentages, and change indicators

Each analysis run is stored with a unique run ID, making every result traceable and reproducible, a pattern directly inherited from ICDEV’s compliance audit trail.

What ICDEV Capabilities Power All of This

Here is a summary of every ICDEV capability that AlphaDesk uses under the hood:

ICDEV Capability AlphaDesk Usage
GOTCHA Framework 6-layer architecture separating goals, tools, args, context
LLM Router Multi-model routing (qwen3.5, gemma3, phi4) with fallback chains
Knowledge Graph Engine 286-node market relationship graph with gap detection
Daemon/Reflex System 7 autonomous reflexes on scheduled intervals
Scenario Engine 29 what-if simulations with cascade BFS propagation
Append-Only Audit Trail Immutable signal history and analysis evolution tracking
Self-Healing Pattern Confidence-gated auto-execution vs. human approval
SQLite Storage Layer Unified DB access via tools.db.storage
Selenium E2E Testing Automated dashboard verification with headless Chrome
YAML Args Config Runtime behavior tuning without code changes

Related Reading: From Idea to Enterprise App in Under an Hour: How I Built a Signal Intelligence Platform Without Writing a Single Line of Code — Explore more on this topic in our article library.

Try It Yourself

AlphaDesk is built entirely with ICDEV’s open framework. The same patterns that power market intelligence, knowledge graphs, autonomous daemons, scenario simulation, and human-in-the-loop approval, can be applied to any domain: cybersecurity threat monitoring, supply chain risk, or competitive intelligence.

Explore the framework at https://github.com/icdev-ai or visit https://icdev.ai to see more of what ICDEV can build.


Related Reading: Navigating the FedRAMP Labyrinth: A Developer’s Perspective — See how the same ICDEV framework handles FedRAMP compliance automation.