# VAELREX — System State Document *Last updated: 2026-05-07 (v7) · Updated: Audit fixes applied (graduation counter, accuracy, auto-archive, GPU log, nginx landing page)* --- ## COMPANY | Field | Value | |---|---| | Name | VAELREX | | Operator | Solo founder | | Mode | Paper trading (Alpaca paper account) | | Primary markets | SPY, QQQ (equity day-trading) | | Infrastructure | VPS 178.128.145.11 (`Apex-OS`) · `/opt/vaelrex/` | | Domain | https://vaelrex.com · https://code.vaelrex.com | --- ## TRADING RECORD **Summary** (all closed trades, since 2026-03-12): `Total: 1935 trades · Wins: 1344 · Avg R: +0.415` **Recent live trades (last 15):** | ID | Date | Symbol | Track | Status | Exit | R | |---|---|---|---|---|---|---| | 1935 | 2026-05-01 | SPY | vaelrex_v1 | closed_manual | 723.21 | +0.263 | | 1932 | 2026-04-29 | QQQ | vaelrex_prop | closed_tp2 | 658.90 | +3.042 | | 1931 | 2026-04-29 | QQQ | vaelrex_prop | closed_sl | 658.33 | -1.125 | | 1930 | 2026-04-20 | SPY | vaelrex_prop | closed_sl | 709.59 | -1.028 | | 1929 | 2026-04-16 | QQQ | vaelrex_prop | closed_sl | 636.401 | -1.039 | | 1928 | 2026-04-16 | QQQ | vaelrex_prop | closed_sl | 636.978 | -1.046 | | 1927 | 2026-04-16 | SPY | vaelrex_prop | closed_sl | 699.549 | -1.032 | | 1926 | 2026-04-07 | SPY | ict | closed_manual | 652.54 | +0.602 | | 1925 | 2026-04-07 | QQQ | ict | closed_manual | 584.03 | +0.021 | | 1924 | 2026-03-24 | SPY | ict | closed_session | 681.34 | +0.597 | | 1923 | 2026-03-24 | SPY | ict | closed_session | 684.19 | +0.111 | | 1922 | 2026-03-24 | QQQ | ict | closed_session | 606.97 | +1.036 | | 1921 | 2026-03-24 | QQQ | ict | closed_session | 607.31 | +0.948 | | 1920 | 2026-03-23 | QQQ | ict | closed_tp1 | 594.35 | +0.172 | | 1919 | 2026-03-23 | SPY | ict | closed_tp1 | 661.31 | +0.149 | **Last live signal:** 2026-05-01 (id=1935, SPY V1, manual close) **Signal dry spell note:** Market tariff selloff (April) was primary factor in reduced activity. --- ## SERVICES | Service | Status | Uptime Since | Notes | |---|---|---|---| | `vaelrex-bot.service` | ✅ running | 2026-05-03 01:31 UTC | ICT=ON PROP=ON V1=ON | | `vaelrex-pm.service` | ✅ running | 2026-05-07 02:12 UTC | Portfolio Manager API port 8766 | | `vaelrex-xyon.service` | ✅ running | 2026-05-01 15:10 UTC | Xyon Observer Phase 0 | | `vaelrex-agents.service` | ✅ running | 2026-05-03 17:54 UTC | Agent Runner — first run complete | | `vaelrex-monitor.service` | ✅ running | 2026-04-06 04:17 UTC | Trader Protection & Monitor | | `vaelrex-news.service` | ✅ running | — | News Sentiment Engine | | `vaelrex-xyon-lab.service` | ✅ running | — | Xyon Lab Observer (EXP033) | | `nginx` | ✅ running | 2026-04-28 06:46 UTC | Last reloaded 2026-05-03 04:26 | | `vaelrex-dreamer.service` | ✅ running | 2026-05-05 20:08 UTC | Xyon Nightly Dreamer — Episodic Replay | | `vaelrex-cos.service` | ⚪ inactive | — | Chief of Staff morning brief | --- ## XYON STATE (Phase 0) | Metric | Value | |---|---| | Total observations | 5,281 | | Live traded observations | 6 | | Graduation threshold | 50 live obs | | Graduation progress | **6 / 50** (12%) | | Shadow decisions | 4,960 | | Outcomes resolved | 129 | | Alltime accuracy | **67.4%** (87/129) | | Business observations | 262 | | Dream sessions | 1 | | Last scan time | 2026-05-07 02:12 UTC | | Active patterns | 1 active | | Top pattern | `a8d7012bf3d3` — w=0.452, 1,186 obs, forming | **Note:** PROP and V1 tracks are NOT wired to Xyon shadow decisions. Only ICT trades contribute to Xyon outcomes. Graduation counter counts `source='live' AND trade_taken=1` only. **Dreamer:** DEPLOYED 2026-05-05 · First dream: May 5 21:00 ET · Episodes replayed: 5 · Weakened: 1 pattern · Dream sessions: 1 **Skeptic:** DEPLOYED 2026-05-07 · Adversarial mirror active · 3 tables in xyon.db · WATCHING (0 decisions, awaiting live shadow decisions) --- ## AGENTS (vaelrex_agents.py) | ID | Display Name | Division | Interval | Model | Last Run | Status | |---|---|---|---|---|---|---| | `market-pulse-scanner` | Market Pulse Scanner | D-01 | 6h | claude-haiku-4-5 | 2026-05-07 00:25 UTC | ✅ ok | | `reg-drift` | Regulatory Drift Monitor | D-02 | 24h | claude-haiku-4-5 | 2026-05-06 18:24 UTC | ✅ ok | | `weak-signal` | Weak Signal Synthesizer | D-03 | 24h | claude-haiku-4-5 | 2026-05-06 18:24 UTC | ✅ ok | **Monthly cost (2026-05):** $0.02133 / $50.00 cap **Agent queue:** 3 items (2 approved Stage 2, 1 pending Stage 1) **Archive:** 21 approved Stage 1 items moved to agent_queue_archive.json --- --- ## MULTI-STAGE AGENT PIPELINE | Stage | Trigger | Action | |---|---|---| | Stage 1 | Agent auto-runs every 6-24h | Finding staged in agent_queue.json with status=pending | | Stage 2 | CEO approves P1/P2 finding with a STAGE_2_ROUTES match | Claude Haiku analyst auto-runs deeper analysis; result staged as new pending item (stage=2) | | Stage 3 | CEO approves Stage 2 item | Richer Xyon observation written with full_analysis context | | Stage 5 stub | sunday_brief=true in Stage 2 response | Item appended to sunday_brief_items.json; surfaced at /api/sunday/brief | **Stage 2 Routes:** | Category | Agent | Analysts | |---|---|---| | MARKET-INTEL | market-analyst | Confirms/challenges signal, historical analogs, impact probability, SPY/QQQ recommendation | | DOMAIN-EXP | domain-analyst | Risks, opportunities, action_required, timeline | | FRONTIER | research-analyst | Xyon relevance, papers to track, roadmap impact | **Multi-stage pipeline:** DEPLOYED 2026-05-06 **Stage 5 Sunday brief stub:** LIVE ( → ) **UI:** S2 badge (purple) in approval queue; full_analysis panel in review; Section 04.5 Sunday Brief queue **First Stage 2 trigger:** AF2-20260506201320-DOMA (DOMAIN-EXP, P1, sunday_brief=true, importance=high) **Auto-archive:** Stage 1 items archived automatically on approval (DEPLOYED 2026-05-07) ## EXP031 STATE | Field | Value | |---|---| | Status | ✅ DEPLOYED 2026-05-04 | | Root fix | `REGIME_BLEND_RULE_WEIGHT = 0.00` → `RULE_WEIGHT = 0.80` / `RESERVOIR_WEIGHT = 0.20` | | Blend | `0.80 × rule_probs + 0.20 × reservoir_probs` (argmax → final regime) | | New return schema | `regime (str)`, `confidence (float)`, `probabilities (dict)`, `source (ensemble\|rule_based)` | | New DB columns | `regime_trending_prob REAL`, `regime_choppy_prob REAL`, `regime_volatile_prob REAL`, `regime_source TEXT` | | Retag | 3,080 post-Apr-7 TRENDING obs tagged `regime_source = 'pre_exp031'` | | Retrospective obs | `_insert_retrospective_observations()` fires at 3:45 PM ET daily, `source='retrospective'` | | API update | `/api/xyon/status` now returns `regime_probabilities` dict + `current_regime_confidence` float | | Dashboard | Regime panel shows `TRENDING 87%` with confidence bar; method label shows Ensemble/Rule-based | --- ## LOCKED DECISIONS 1. **Bracket leg-walk fix deployed** (2026-04-30) — Position monitor now walks `.legs` on bracket orders to get correct exit price. All five corrupted trades (ids 1927-1931) corrected via SQL. 2. **PROP/V1 not Xyon-wired** — Intentional. Only ICT track feeds Xyon shadow decisions. PROP and V1 contribute zero Xyon outcomes. 3. **Paper trading only** — All Alpaca orders are paper. `ALPACA_BASE_URL=https://paper-api.alpaca.markets`. 4. **Agent findings gated** — Nothing from `vaelrex_agents.py` reaches findings feed without human approval via Research Ops sandbox. 5. **$50/month Anthropic cap** — Hard-coded in `vaelrex_agents.py`. Service stops calling API when `monthly_cost >= 50.00`. 6. **EXP031 ensemble fix** (2026-05-04) — `RULE_WEIGHT` restored to 0.80. Pre-fix TRENDING observations (post-Apr-7) tagged `pre_exp031`. Retrospective 3:45 PM ET obs enabled for daily regime validation. 7. **Graduation counter** (2026-05-07) — `live_obs_for_graduation` counts `source='live' AND trade_taken=1` only. Was incorrectly counting all live scan events (3,372). True count: 6. 8. **Accuracy fix** (2026-05-07) — `alltime_accuracy` uses `SUM(xyon_take_correct)/COUNT(*)` from outcomes directly. Was 0.0 due to broken live-obs JOIN. True accuracy: 67.4%. --- ## OPEN THREADS - [ ] PROP/V1 Xyon wiring: not started, no ETA - [x] vaelrex-dreamer.service DEPLOYED 2026-05-05 — Episodic replay dreaming active (5 episodes, 1 weakened) - [x] Multi-stage agent pipeline DEPLOYED 2026-05-06 — Stage 2 live, Sunday brief stub live - [x] GPU Trainer DEPLOYED 2026-05-06 — RTX 3070, 441 samples, last run 2026-05-06 - [x] **Xyon Skeptic system DEPLOYED 2026-05-07** — adversarial mirror, 3 new DB tables, WATCHING badge - [x] **Audit fixes DEPLOYED 2026-05-07** — nginx landing page, graduation counter, accuracy, auto-archive, GPU log path - [ ] **NEXT: Phase 1 after graduation** — need 44 more live ICT observations (6/50) - [ ] vaelrex-cos.service inactive — morning brief disabled - [x] EXP031: DEPLOYED 2026-05-04 — ensemble weighting, retrospective obs, new DB columns --- ## PAGES | URL | File | Status | |---|---|---| | https://vaelrex.com/ | `index.html` (landing page with PIN flow) | ✅ 200 | | https://vaelrex.com/dashboard | `vaelrex_dashboard.html` | ✅ 200 | | https://vaelrex.com/pm | `vaelrex_portfolio_dashboard.html` | ✅ 200 | | https://vaelrex.com/research | `vaelrex_research.html` | ✅ 200 | | https://code.vaelrex.com/ | `vaelrex_dashboard.html` (alias) | ✅ 200 | | https://vaelrex.com/api/state | `VAELREX_STATE.md` (plain text) | ✅ 200 | | https://vaelrex.com/api/xyon/neural | Pattern nodes + edges + stats | ✅ 200 | --- ## KEY FILES | File | Location | Purpose | |---|---|---| | `vaelrex_bot.py` | `/opt/vaelrex/` | Main trading bot (all three tracks) | | `vaelrex_portfolio_server.py` | `/opt/vaelrex/` | FastAPI server port 8766 | | `vaelrex_agents.py` | `/opt/vaelrex/` | Agent runner (3 research agents) | | `vaelrex_research.html` | `/opt/vaelrex/` | Research Ops page | | `vaelrex_dashboard.html` | `/opt/vaelrex/` | Main trading dashboard | | `vaelrex_portfolio_dashboard.html` | `/opt/vaelrex/` | Portfolio manager dashboard | | `vaelrex_memory.db` | `/opt/vaelrex/` | SQLite — trades table | | `xyon.db` | `/opt/vaelrex/` | SQLite — Xyon observations, patterns, outcomes | | `agent_queue.json` | `/opt/vaelrex/` | Staged agent findings awaiting review | | `agent_queue_archive.json` | `/opt/vaelrex/` | Archived approved Stage 1 findings | | `agent_state.json` | `/opt/vaelrex/` | Agent run schedule + monthly cost tracker | | `agent_runs.log` | `/opt/vaelrex/` | Agent runner log | | `vaelrex.env` | `/opt/vaelrex/` | API keys (Alpaca, Anthropic, News) | | `vaelrex-bot.service` | `/etc/systemd/system/` | Bot systemd unit | | `vaelrex-pm.service` | `/etc/systemd/system/` | Portfolio server systemd unit | | `vaelrex-agents.service` | `/etc/systemd/system/` | Agent runner systemd unit | | `vaelrex-xyon.service` | `/etc/systemd/system/` | Xyon observer systemd unit | | `vaelrex` (nginx) | `/etc/nginx/sites-available/` | Nginx site config | | `VAELREX_STATE.md` | `/opt/vaelrex/` | This file — accessible at /api/state | | `nginx_code_vaelrex.conf` | `/etc/nginx/sites-enabled/code-vaelrex` | code.vaelrex.com nginx config | --- *Generated by Claude — VAELREX v7 update 2026-05-07 (Audit fixes: nginx landing page, graduation counter, accuracy, auto-archive, GPU log path)*