Orallexa – AI Trading System
Article URL: https://github.com/alex-jb/orallexa-ai-trading-agent Comments URL: https://news.ycombinator.com/item?id=47619952 Points: 2 # Comments: 0
What makes this different
Most AI trading projects: feed data into a model, get a signal, done.
Orallexa runs a full adversarial pipeline. A Bull AI argues for the trade. A Bear AI argues against it. A Judge AI makes the final call with evidence from both sides. Then it executes.
Market Data → 9 ML Models → Bull/Bear Debate → Judge Verdict → Risk Plan → Paper Execution → Dashboard → Social ContentMarket Data → 9 ML Models → Bull/Bear Debate → Judge Verdict → Risk Plan → Paper Execution → Dashboard → Social ContentEvery stage automated. Every stage observable. The system runs continuously.
Try it instantly
Open Live Demo — demo mode, no API key needed. Click NVDA, TSLA, or QQQ to see a full analysis.
Or run locally:
git clone https://github.com/alex-jb/orallexa-ai-trading-agent.git cd orallexa-ai-trading-agent pip install -r requirements.txt echo "ANTHROPIC_API_KEY=your_key" > .envgit clone https://github.com/alex-jb/orallexa-ai-trading-agent.git cd orallexa-ai-trading-agent pip install -r requirements.txt echo "ANTHROPIC_API_KEY=your_key" > .envTerminal 1: API
python api_server.py
Terminal 2: UI
cd orallexa-ui && npm install && npm run dev`
Docker: docker compose up --build — that's it.
Walk-Forward Evaluation (Out-of-Sample)
Strategy Ticker OOS Sharpe Info Ratio MC Pct p-value
rsi_reversal INTC 1.41 0.45 43.4% 0.002
alpha_combo JPM 1.11 -1.26 97.4% 0.135
trend_momentum JPM 1.09 -0.80 90.2% 0.104
macd_crossover JPM 0.99 -1.02 100% 0.236
dual_thrust NVDA 0.96 -0.93 89.4% 0.001
70 strategy-ticker pairs evaluated. Top 5 by OOS Sharpe shown. The value is in the ML ensemble + LLM synthesis layer above rule-based strategies. Full report →
Architecture
Intelligence Layer
Component Detail
9 ML Models RF, XGB, EMAformer, MOIRAI-2, Chronos-2, DDPM, PPO RL, GNN, LR
Adversarial Debate Bull/Bear/Judge via Claude Sonnet + Haiku
Strategy Evolution LLM generates Python strategies → sandbox tests → evolves winners
Daily Intel 50+ tickers, sector rotation, volume spikes, AI morning brief
Execution Layer
Component Detail
Paper Trading Alpaca bracket orders with auto stop-loss/take-profit
Real-time Stream WebSocket prices every 5s + signal change alerts
Dashboard Next.js 16, Art Deco theme, EN/ZH bilingual
Desktop Coach Floating AI pet with voice input (Whisper) + TTS
Example Output
What one NVDA analysis produces:
┌─────────────────────────────────────────────────────────────────┐ │ DECISION: BUY Confidence: 68% │ │ Risk: MEDIUM Signal: 72/100 │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ BULL CASE: │ │ • Price above MA20 > MA50 — full bullish alignment │ │ • RSI at 62 — strong momentum, not yet overbought │ │ • Volume 1.8x average — institutional participation likely │ │ │ │ BEAR CASE: │ │ • ADX at 32 but declining — trend may be exhausting │ │ • Bollinger %B at 0.85 — extended near upper band │ │ • Earnings in 12 days — vol crush after event │ │ │ │ JUDGE VERDICT: │ │ "Bull case is stronger. BUY with tight stop at MA20." │ │ │ │ PROBABILITIES: Up 58% | Neutral 24% | Down 18% │ │ RISK PLAN: │ │ Entry: $132.50 | Stop: $128.40 | Target: $141.00 | R:R 2.1:1 │ └─────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────┐ │ DECISION: BUY Confidence: 68% │ │ Risk: MEDIUM Signal: 72/100 │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ BULL CASE: │ │ • Price above MA20 > MA50 — full bullish alignment │ │ • RSI at 62 — strong momentum, not yet overbought │ │ • Volume 1.8x average — institutional participation likely │ │ │ │ BEAR CASE: │ │ • ADX at 32 but declining — trend may be exhausting │ │ • Bollinger %B at 0.85 — extended near upper band │ │ • Earnings in 12 days — vol crush after event │ │ │ │ JUDGE VERDICT: │ │ "Bull case is stronger. BUY with tight stop at MA20." │ │ │ │ PROBABILITIES: Up 58% | Neutral 24% | Down 18% │ │ RISK PLAN: │ │ Entry: $132.50 | Stop: $128.40 | Target: $141.00 | R:R 2.1:1 │ └─────────────────────────────────────────────────────────────────┘Not just a number. A structured argument with transparent reasoning and an actionable risk plan.
9 ML Models — Scored and Ranked
Every analysis runs all available models. The ML Scoreboard shows Sharpe, return, win rate side by side.
Model Type What It Does
Random Forest Classification 28 technical features → 5-day direction
XGBoost Gradient Boosting Same features, different optimization
Logistic Regression Linear Regularized baseline
EMAformer Transformer iTransformer + Embedding Armor (AAAI 2026)
MOIRAI-2 Foundation Salesforce zero-shot time series forecaster
Chronos-2 Foundation Amazon T5-based probabilistic forecaster
DDPM Diffusion Generative 50 possible price paths → VaR and confidence intervals
PPO RL Agent Reinforcement Gymnasium env, Sharpe-based reward
GNN (GAT) Graph 17-stock relationship graph, inter-stock signal propagation
All models run on CPU.
Signal View — Decision card, probability bars, Bull/Bear debate, ML scoreboard, risk plan. Intel View — Morning brief, gainers/losers, sector heatmap, volume spikes, AI picks, social thread.
Art Deco theme. Polymarket-inspired probability display. Mobile responsive. EN/ZH bilingual.
Desktop AI Coach
A floating pixel bull that lives on your desktop:
-
Voice chat — Hold K to talk, Whisper transcribes, Claude responds
-
Chart analysis — Ctrl+Shift+S screenshots any chart for Claude Vision analysis
-
Decision cards — Entry, stop, target, risk/reward overlaid on screen
-
Market-aware avatar — Bull changes color based on market conditions
Cost-Aware AI
Not every task needs the expensive model:
Task Model Cost
Bull/Bear arguments Haiku 4.5 ~$0.001
Signal overlay Haiku 4.5 ~$0.001
Judge verdict Sonnet 4.6 ~$0.005
Deep market report Sonnet 4.6 ~$0.005
One full analysis: ~$0.003. One daily intel report: ~$0.05.
Why this architecture
Problem Typical Approach Orallexa
Isolated signals One model, one prediction 9 models ranked by Sharpe + LLM synthesis
No reasoning "BUY 73%" — why? Bull argues, Bear argues, Judge decides with evidence
Expensive AI Every call hits GPT-4 Haiku for 80%, Sonnet only where reasoning matters
Manual workflow Notebook → read → decide → execute Automated: signal → debate → risk plan → paper order
No context Each stock analyzed alone GNN propagates signals across 17 related stocks
Not shareable Screenshot your terminal "Copy for X" on every section
Tech Stack
FrontendNext.js 16, React 19, Tailwind CSS 4, PWA BackendFastAPI, Python 3.11, WebSocket AIClaude Sonnet 4.6 + Haiku 4.5 (dual-tier routing) MLscikit-learn, XGBoost, PyTorch (EMAformer, DDPM, GAT, PPO) Datayfinance (real-time + historical) NLPFinBERT, VADER, TextBlob TradingAlpaca paper trading (bracket orders) OrchestrationLangGraph (stateful debate pipeline) DeployDocker, GitHub Actions CI/CD, Vercel
Testing
277 automated tests. 0 failures. CI on every push.
python -m pytest tests/ -v # Backend (113 tests) cd orallexa-ui && npm test # Frontend (139 tests)python -m pytest tests/ -v # Backend (113 tests) cd orallexa-ui && npm test # Frontend (139 tests)Full test breakdown
Suite Tests Coverage
Engine Integration 34 TA indicators, strategies, backtest, brain routing
ML Regression 13 All 9 models — ensures upgrades don't degrade
API E2E 19 Every endpoint via FastAPI TestClient
Unit Tests 47 DecisionOutput, BehaviorMemory, risk, scalping
Types & Helpers 28 Display functions, color mapping, i18n
Components 67 DecisionCard, Breaking, MarketStrip, ML Scoreboard, Watchlist, DailyIntel
Mock Data 31 All mock generators
API
Endpoints
Method Endpoint Description
POST
/api/analyze
Fast signal analysis (scalp/intraday/swing)
POST
/api/deep-analysis
Multi-agent deep analysis with debate
POST
/api/chart-analysis
Screenshot chart analysis (Claude Vision)
POST
/api/watchlist-scan
Parallel multi-ticker scan
GET
/api/daily-intel
Daily market intelligence (cached)
GET
/api/news/{ticker}
News + sentiment scores
GET
/api/profile
Trader behavior profile
GET
/api/journal
Decision execution log
POST
/api/evolve-strategies
LLM strategy evolution
GET
/api/alpaca/account
Paper trading account
POST
/api/alpaca/execute
Execute signal as paper order
WS
/ws/live
Real-time price + signal stream
Project Structure
Directory layout
orallexa/ ├── api_server.py # FastAPI + WebSocket server ├── docker-compose.yml # One-click deployment │ ├── engine/ # Trading engine (9 models) │ ├── multi_agent_analysis.py # LangGraph debate pipeline │ ├── ml_signal.py # Model comparison framework │ ├── strategies.py # 7 rule-based strategies │ ├── emaformer.py # EMAformer Transformer │ ├── diffusion_signal.py # DDPM probabilistic forecasting │ ├── gnn_signal.py # Graph Attention Network │ ├── rl_agent.py # PPO reinforcement learning │ ├── strategy_evolver.py # LLM strategy evolution │ └── sentiment.py # FinBERT / VADER │ ├── llm/ # AI reasoning │ ├── claude_client.py # Dual-tier model routing │ ├── debate.py # Bull/Bear debate │ └── debate_graph.py # LangGraph pipeline │ ├── orallexa-ui/ # Dashboard (Next.js 16) ├── desktop_agent/ # Desktop AI coach ├── bot/ # Execution layer (Alpaca) ├── tests/ # 138 backend tests └── .github/workflows/ # CI/CDorallexa/ ├── api_server.py # FastAPI + WebSocket server ├── docker-compose.yml # One-click deployment │ ├── engine/ # Trading engine (9 models) │ ├── multi_agent_analysis.py # LangGraph debate pipeline │ ├── ml_signal.py # Model comparison framework │ ├── strategies.py # 7 rule-based strategies │ ├── emaformer.py # EMAformer Transformer │ ├── diffusion_signal.py # DDPM probabilistic forecasting │ ├── gnn_signal.py # Graph Attention Network │ ├── rl_agent.py # PPO reinforcement learning │ ├── strategy_evolver.py # LLM strategy evolution │ └── sentiment.py # FinBERT / VADER │ ├── llm/ # AI reasoning │ ├── claude_client.py # Dual-tier model routing │ ├── debate.py # Bull/Bear debate │ └── debate_graph.py # LangGraph pipeline │ ├── orallexa-ui/ # Dashboard (Next.js 16) ├── desktop_agent/ # Desktop AI coach ├── bot/ # Execution layer (Alpaca) ├── tests/ # 138 backend tests └── .github/workflows/ # CI/CDAcknowledgments
Anthropic Claude · yfinance · Polymarket · Alpaca
MIT License — see LICENSE
Disclaimer: Research and educational project. Not financial advice.
Built with conviction, not hype.
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
agentgithubtrunk/f2ebf8ce7c86a061a181e8da9e5c0a6150955e0a: [xpu][fix] Fix DeviceOpOverrides registered incorrectly (#178959)
Motivation The current initialization logic for DeviceOpOverrides relies on checking whether device_op_overrides_dict is empty: DeviceOpOverrides: assert isinstance(device, str), type(device) if not device_op_overrides_dict: from . import ( # noqa: F401 # noqa: F401 cpu_device_op_overrides, mps_device_op_overrides, ) from .cuda import device_op_overrides # noqa: F401 from .mtia import device_op_overrides as mtia_op_overrides # noqa: F401 from .xpu import device_op_overrides as xpu_op_overrides # noqa: F401 if device not in device_op_overrides_dict: # For backends like TPU that only need no-op overrides (Pallas handles codegen) from .cpu_device_op_overrides import CpuDeviceOpOverrides register_device_op_overrides(device, CpuDeviceOpOverrides()) return device_op_overrides_dict[device]"> def
trunk/834da621b18df19b513ee787c6926d43f928adfc: add API to check if a tensor is symm-mem-tensor (#178947)
In Helion autotuner, we need clone a input symm memory tensor properly if the kernel inplace update it. That requires us to know if a tensor is a symm memory tensor. Right now I call rendezvous for the tensor. If no exception is thrown, then it's a symm memory tensor. But it's not ideal there will be a lot of warnings complaining calling rendezvous on non-symm memory tensor I'll need to pass in the process group name to this API. But fundamentally check if a tensor is a symmetric memory tensor does not require the process group name. Pull Request resolved: #178947 Approved by: https://github.com/ngimel , https://github.com/fegin
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.






Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!