Cognitive Trader · v0.9.4 · Private beta
Building in public

The AI Trader that learns what not to do.

It thinks like a five-year-old child. Curious enough to try. Primitive enough to be cautious. Sometimes it gets burned — and when it gets burned, it remembers what not to do. The longer it lives, the less it touches the hot stove. The more it watches, the more it gets right.

Figure 1. Live cycle output, sanitized ~/cognitive-trader
cycle 4218 — local
Bring your own API keys
Runs offline · Logs stay local
Flat $129/yr · No success fee
Status — Validation in progress

Where we are.

These are facts from a real run, not promises about your account. We publish them because they're what we have. We're still validating.

3,000
bars watched (BTCUSDT, 4h)
37
trades taken
67.6%
win rate
2.04
profit factor
+$155.82
net P&L on a single 3000-bar run
10.7×
memory-veto density growth (early → late phase)

One run is a sample of one. We are still running variance and structural-cognition validation. Sign up below to receive the full report when it completes.

§01 — Architecture

Why this isn't just another trading bot.

Most "AI trading bots" are a webhook and a prompt. Cognitive Trader is a full agentic architecture — built so the LLM never decides direction, only learns from outcomes.

Source Telegram Stream Binance API FAST_MODEL PreClassifier 45s Guard Analysis Momentum Decision Engine COGNITIVE CYCLE Calibration Dreaming Vector RAG W2 Memory Two-Key Gate Risk Engine MDD & Sizing ACT Persistent Storage Postgres + pgvector TTL: 45s VETO KILLSWITCH: -$500
01 / Logic Gate Deterministic

Two-Key Confirmation

No ACT fires without signal alignment. The rules engine computes market_direction via sign(24h_change_pct) (threshold 1.5%) while the LLM provides thesis_confirmation. If trading_goal (0.50) isn't paired with market momentum (0.70), the Go-side gate blocks execution. Defense in depth.

02 / Memory Wires Agentic

Dual-Wire Learning

W1: Manual fact extraction on trade close (source_channel='trade_outcome'). W2: Vector similarity retrieval via Ollama nomic-embed-text. The agent retrieves the 5 most-similar past trades into the prompt context. It doesn't just "remember"—it performs local RAG on its own historical scars.

03 / Risk Control Critical

MDD Killswitch

A hard-coded circuit breaker in the cognitive_cycle. If 24h PnL (excluding pnl_unknown) breaches -$500, the system enters lockdown. It automatically cancels orphan STOP_MARKET and TAKE_PROFIT algo orders via the Binance API. No human cleanup required.

04 / Calibration Adaptive

Behavioral Policy

The ActionThreshold is dynamic (range 0.35–0.85). Every cycle, the lifecycle engine runs CalibrateFromOutcomes, adjusting weights based on a 30-day rolling PnL window. Realized profits tighten the threshold; the agent earns its right to be aggressive.

05 / Reflection Dreaming

Nightly Dreaming

At 23:00 daily, the agent processes the day's internal_monologue and paper_trades. It generates dream_insights that are injected into the next day's working memory. This is where "curiosity-driven" parameters like intrinsic_motivation are calibrated offline.

06 / Data Integrity Freshness

45s Freshness Guard

In volatile regimes, anchoring on stale prices is fatal. If all prices in the market_stats feed are >45s old, the system enters Manage-Only mode. It will close or adjust existing positions but strictly blocks new opens. Real-world safety for live futures.

§02 — Honest framing

What this system actually is (and isn't).

There is a lot of dishonest marketing in algo trading. We'd rather lose the sale than oversell. Here's the straight version.

It is— affirmative
  • A local-first agent that runs the same loop forever: scan, decide, execute, reflect, remember.
  • A memory layer that turns every closed position into a labelled lesson the next cycle can read.
  • Disciplined risk: hard stops, position sizing, regime-aware throttling — all configurable.
  • A serious tool for traders who already understand what they're doing and want their process automated.
It is not— negation
  • ×A money printer. There is no guaranteed edge and we will not pretend otherwise.
  • ×A signal service. You don't subscribe to calls — the agent decides and acts on your venue.
  • ×A black-box LLM trading hype machine. The model is a small piece. Most of the system is plain code.
  • ×Appropriate for someone still learning what a stop-loss is. Sit this one out.
§03 — The memory loop

Why this is different.

Most bots forget. Every cycle starts from zero — same indicators, same heuristics, same mistakes.

Cognitive Trader writes a short lesson at the end of every closed position: what the regime looked like, what the agent thought, what actually happened. Those lessons are indexed and fed back as context on the next decision. The bot doesn't just trade — it builds an internal book of what worked here last time.

This is the layer worth paying for.

Figure 2. Lesson entry, post-trade memory/lesson_2842.md
symbolETHUSDT
sideSHORT
entry / exit3,182.40 → 3,247.10
pnl−0.81 R
regimeRANGING (ADX 14.2)
thesislower-high break, news beta neg

Shorted ETHUSDT into a ranging regime on a "break of structure" that wasn't. ADX was below 18 the whole session. Don't trade trend-continuation logic when the classifier flags RANGING — wait for ADX > 22 or sit out. Next time this pattern shows in RANGING, skip.

§05 — What ships

What's in the box.

Three things: the binary that does the work, the supporting stack it talks to, and the parts you bring yourself.

01 / Core Logic
Autonomous Binary
  • Cognitive Cycle: Background loop enforcing a 15-minute STAY_SILENT vs ACT decision cadence.
  • Two-Key Gate: Mandatory signal alignment—LLM thesis MUST pair with deterministic rules-engine momentum.
  • Risk Engine: Hard-coded 1:2 R/R auto-targets and 5% sanity-capped stops (validation-side).
  • MDD Killswitch: Active 24h PnL monitoring halts new opens at -$500.
02 / Persistence Stack
Self-Hosted Infra
  • Vector Store: SQLite + FAISS for persistent RAG-based memory retrieval (Wire 2).
  • Data Stream: Binance USDT-M futures integration (paper & live) with algo order ID tracking.
  • Local Inference: Ollama integration for nomic-embed-text embeddings and local model fallback.
  • High-Integrity Ledger: Postgres backend for every conversation, internal thought, and trade audit.
03 / Operating Rails
System Parameters
  • Action Threshold: Adaptive 0.35–0.85 (PnL-weighted calibration).
  • Signal Weights: 0.50 (goal) to 0.90 (contradiction) priority scale.
  • Freshness Guard: 45s hard timeout on market data inputs.
  • Readiness Gates: Explicitly moving through Gate 5 (Profitability) logic.
§03 — Validation ladder

Truth is asymptotic.

Backtest results alone don't prove a trading system works. There's a hierarchy of evidence — reproducibility, cognitive falsifiability, out-of-sample, paper-pilot, live. Most fintech SaaS markets from the top of the ladder. We tell you exactly where we stand on each rung.

  1. 1 Centaur architecture — risk-adjusted alpha across regimes Passed (two configs)

    The system splits cognitive judgement (LLM) from execution discipline (Go). Both halves were stress-tested independently and the same architecture was validated with TWO different LLM backends. Headline numbers from a 3-window × N=3 × 100-bar sweep on BTCUSDT 4h with the LLM cache disabled (NO_LLM_CACHE=1):

    • Drawdown defence (offset 200 window where B&H lost 12.26%): Config A capped loss at 0.74% of capital; Config B at 0.19%. Both within an order of magnitude of zero.
    • Chop alpha (offset 3000 window where B&H lost 3.56%): Config A returned +$94.80 (3.6× the deterministic E3-rule baseline). Config B returned +$77.52 (2.9× E3). Both turn the losing window positive.
    • Bull window (offset 1000, B&H +29.26%): Honest scope — both configs roughly break-even and do not beat passive buy-and-hold. Conservative 0.01-BTC sizing with 2% stops cannot catch sustained trends; this is a deliberate risk-control trade-off.
    • Architecture portability: swapping the cognitive LLM from Llama-3.3-70b (NIM) to gpt-oss-120b (OpenRouter) preserves aggregate mean PnL (+$21.88 vs +$21.49 per window) but redistributes the alpha into a better risk profile (Config B's worst window is 74% smaller).
  2. 1a Deterministic replay (Philosophy A) — bit-identical 3000-bar run Passed (small scale)

    Bit-identical replay infrastructure verified at three bar tiers: 20, 40, and 60 bars. In each tier, Pass 1 (population, real LLM calls, fresh cache) and Pass 2 (replay, PLAYBACK_MODE=1 STRICT_DETERMINISM=1, cache-only) produced identical paper_trades tables and 100% cache hit rates (61 HIT / 0 MISS at 60 bars). The CachedLLM now errors loudly on a real cache miss instead of silently re-filling. Full 3000-bar replay is deferred — scale-dependent state leaks (memory ordering when Ollama embeddings are unavailable, the behavioral_policy.last_calibrated wall-clock timestamp) remain to be audited. The capability exists; the 3000-bar artifact awaits one focused engineering pass.

  3. 2 Backtest positive expectancy (dev data) Passed

    Five 3000-bar BTC runs across the development period: +$10, +$156, +$208, -$24, +$184. Mean +$107, four of five positive. These were single-window single-run measurements before the multi-regime methodology was adopted. The Tier 1 sweep above supersedes them as the headline risk-adjusted evidence. Per-run history in the table below.

  4. 3 Cognitive claim falsifiable Passed (both ablations)

    The cognitive claim is empirically falsifiable through three ablations. E1 (memory-disabled): chop alpha collapsed 68% (+$77.52+$24.54) and hold-count on TRENDING regime dropped from 57 → 0 across the chop window. E2 (random-memory): random synthetic memory content paralyzes the system via veto over-fire (0-6 trades per 100 bars vs ~10-18 with organic memory). Memory is not only load-bearing but its content discipline is what produces the chop alpha. E3 (hard-veto rule) is the chop-alpha denominator already published in Tier 1 (Centaur LLM beats the rule by 2.9-3.6×). All three ablations are complete.

  5. 4 Out-of-sample backtest (2025 BTCUSDT 4h) Passed

    Same Centaur architecture on 2025 BTCUSDT 4h bars never seen during development (fetched from Binance public REST, 3000 bars covering 2025-01 through 2026-05). Three windows × N=3: bear (offset 200, B&H -$203.33) → strategy -$13.87 = 93% drawdown reduction out-of-sample. Flat (offset 1500) → strategy slightly negative, consistent with no-edge regime. Bull (offset 2800, B&H +$335.38) → strategy +$160.92 (48% capture, no blowup). The drawdown-defense claim generalizes outside the dev set.

  6. 5 Paper-pilot on Binance testnet In flight (sanity-trade gate)

    Live ticks, real-time 4h bars, fresh DB, full Centaur cognitive cycle driving the patched internal/tools/binance.go (with -1007 ambiguous-error reconciliation). Gated on cmd/sanity_trade runtime testnet validation (CLI committed at b040b308; manual smoke-test pending).

  7. 6 Live small-stake Pending

    One real position, $50 or less. Tests real liquidity, counter-party reactions, and the consequences gap between paper and live.

  8. 7 Live scaled Pending

    Sustained live performance across varied regimes at non-trivial size. Never "complete" — markets change. What you trust at this tier is graduated confidence, not absolute proof.

Run Date Bars Trades Win % PF Net P&L Code
What happened between runs (the story)

What we're testing next

    Past performance does not predict future results. Sample sizes are small. Numbers above are the data we have, not promises about your account.

    §04 — White Papers

    The intellectual foundation.

    Seven white-paper-style topics documenting the structural differentiators — without exposing the competitive edge. Each is implemented and measurable.

    07 / Philosophy

    Radical Transparency

    Publishing every run including losing ones, every commit hash, every log file, and every trade ledger as a substitute for "trust me" claims. The trust ladder escalates from numbers to live track record.

    03 / Methodology

    Determinism Methodology

    Six independent sources of non-determinism — wall-clock timestamps, Go map randomness, unstable sorts, LLM temperature, pgvector tie-breaks, environment variability — all gated by a single env flag.

    01 / Architecture

    Memory-Veto Architecture

    The TWO-KEY VETO BY MEMORY mechanism differs structurally from standard RAG. Memory has refusal authority over the LLM's choice, creating the primitive cognitive loop.

    04 / Validation

    Falsifiability Design

    The shuffled-bars experiment: randomizing time-order with a fixed seed to distinguish real cognition from pattern matching. The cognitive thesis is false if shuffled matches chronological within ±$50.

    02 / Gating

    Two-Key Gating

    A trade requires both goal-derived signal AND market-direction signal to co-fire. The system default is STAY_SILENT. Differentiates agentic from trigger-happy.

    05 / Execution

    Fill-Gap Rescaling

    When orders fill at prices different from intent (gap, slippage, partial), stops and targets rescale relative to actual fill — preserving risk geometry, not the original price levels.

    06 / Policy

    Adaptive Behavioral Policy

    The action_threshold recalibrates each cycle from outcomes. You can measure it: overnight #1 logged calibrated action_threshold=0.46 outcomes_considered=48. Veto density grows 10.7× from early to late phase.

    §06 — Pricing

    Buy in early. Or wait.

    Early-adopter pricing — while we're still finding the bugs. Price goes up at 1.0.

    Early Adopter · Building in public

    Buy now. Build with us.

    $129 / YEAR $199
    • Lifetime access at $129/yr — never re-priced for you
    • Private Discord with the maintainers · direct line to dev
    • Vote on the next strategy module
    • Every weekly build, every honest bug post, in your inbox
    • No refunds, no performance promises
    Join the waitlist Read the validation update first

    Locks in $129/yr as long as you keep your subscription active. You're buying a seat on the build, not a finished product.

    Software is provided as-is. You are responsible for your trades. Numbers above are hypothetical performance examples, not forecasts. Not financial advice.

    §06 — FAQ

    Questions we get asked.

    The operating constraints are part of the product: local execution, explicit risk, and no promises about outcomes.

    Be notified when validation completes.

    No payment, no commitment. We'll send the full validation report and let you know when access opens.

    // we email once when the validation report is ready · unsubscribe anytime

    or join the Discord — we're building in public, beta drops there first

    Tweaks
    Theme
    Accent
    Discord invite (env)