69 Commits

Author SHA1 Message Date
828ab274d6 fix: Stale-Event-Guard — Events älter 2h werden nur geloggt, nie gehandelt (Final-Review C1)
Erster Prod-Start: RSS liefert sofort die letzten ~100 Posts; ohne Guard würde
ein tagealter Coin-Post zum Tagespreis gekauft (nicht von der Event-Study gedeckt).
Gilt symmetrisch für on-chain (Downtime-Aufholjagd) und Truth.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:54:58 +00:00
5c72e4269c docs: Trump-Copy-Engine in CLAUDE.md
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:49:51 +00:00
bd6334e9bd feat: Event-Study Trump-Copy + Haltedauer-Entscheid (holdHours 24)
83 on-chain Events (Dez 2024–Jan 2026, $137M WLFI-Käufe, 3 Stichproben on-chain
verifiziert) + 1 Truth-Event. Cluster-dedupt: 24h-Hold Mean +3.1%, Median +1.1%,
Hit 65% vs. Baseline −0.2% — ab 60h keine Edge. Indikativ (n=20), Paper-Lauf ist der Test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:49:07 +00:00
08169081d0 fix: Truth-Archiv nutzt Cursor-Pagination (?page=N wird vom Server ignoriert)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:44:24 +00:00
b03c03ee62 fix: Truth-Scan robust gegen Seiten-Timeouts (Retry) + --skip-onchain für Re-Runs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:38:43 +00:00
0696565840 feat: Event-Study-Script (Forward-Returns je Quelle/Horizont vs. Baseline)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:08:14 +00:00
c3114db05e fix: Archiv-Zeiten als America/New_York interpretieren (gegen RSS kalibriert, +DST)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:06:23 +00:00
5f634452c3 feat: Trump-Event-Backfill (on-chain History + Truth-Archiv best effort)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:04:25 +00:00
52cd31bf42 fix: XSS-Härtung im Trump-Tab (esc()-Helper, https-Allowlist für Truth-Links, noopener)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:00:55 +00:00
ed2fdf6c0a feat: Dashboard-Tab Trump (Events, Positionen, Trades) 2026-06-12 08:56:35 +00:00
89b041eb6e refactor: /api/trump nutzt json()-Helper + camelCase (Review Task 10)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:53:51 +00:00
f8cb424719 feat: Trump-Engine in Loop und API verdrahtet (/api/trump, Gap-Fetch neue Pairs)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:48:54 +00:00
a13bca596c docs: Hinweis zu Spät-Events am Warmup-Fenster (Review Task 9)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:45:52 +00:00
b617740a40 feat: TrumpEngine als dritte Paper-Engine (bot_state id=3, Poller im Zyklus)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:41:12 +00:00
22c84187b2 feat: Trump-Backtest-Wrapper (gleicher Code-Pfad wie Live)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:39:20 +00:00
204c0541a7 test: Geld-Pfade im Trump-Cycle (minNotional, Cash-Erschöpfung, Re-Entry) + deutsche Kommentare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:38:10 +00:00
a297d83849 fix: Testdaten-Arithmetik im Trump-Cycle-Test (200 Candles = 50h < 60h Hold)
Plan-Bug: 300 Candles = 75h > holdHours — Position schloss innerhalb der
Testdaten, Tests 1/3/4 erwarteten aber offene Positionen. Implementierung war korrekt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:29:35 +00:00
7f1589a7df feat: Pure Trump-Cycle-Strategie (Event-Entry, Zeit-Exit, cursor-idempotent)
BLOCKED: Tests 1/3/4 haben Bug in n=300 (75h > 60h-Hold → Position schliesst vor Ende).
Tests 2 (Zeit-Exit) und 5 (Paritaet) grueen. TS kompiliert clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:28:36 +00:00
6c59164e6b fix: Preis-Lücken-Warnung, Pair-Typisierung, Nebenläufigkeits-Doku im Poller (Review Task 6)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:16:51 +00:00
a2e4362444 feat: Signal-Poller (on-chain Cursor-Scan + Truth-RSS, Notional-Filter, 72h-Dedupe)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:11:51 +00:00
f0d4b6d566 fix: nbsp-Dekodierung + Malformed-Input-Test im Truth-Parser (Review Task 5)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:09:35 +00:00
71d07659e3 feat: Truth-Social-RSS-Parser + Coin-Keyword-Matching 2026-06-12 08:05:06 +00:00
917bcad8c3 fix: null-Guard für log.data + Fallback-Warnung im RPC-Client (Review Task 4)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:03:30 +00:00
e926fa0988 feat: On-Chain-Scanner für Watchlist-Transfers (eth_getLogs, RPC-Fallback, Chunking) 2026-06-12 07:58:33 +00:00
315f6ddf00 test: Duplikat-Check + Doku-Kommentare in Watchlist (Review Task 3)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:56:52 +00:00
0b5a9448b5 feat: Trump-Signal-Watchlist (WLFI-Multisig, verifizierte ERC-20-Contracts, Truth-Keywords)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:53:22 +00:00
13cf694673 feat: Schema für Trump-Engine (trump_events, trump_positions, trump_signal_state)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:49:21 +00:00
43b5ed10bd refactor: byPair-Map-Typ in grid-cycle vereinheitlicht (Review Task 1)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:48:01 +00:00
713f4efc3c feat: Pair-Typ um Trump-Universum erweitert (LINK/AAVE/ONDO/ENA/SUI/SEI)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:44:17 +00:00
896a29bd04 docs: Implementierungsplan Trump-Copy-Strategie (14 Tasks, TDD)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:36:43 +00:00
7b8ef01e83 docs: Design-Spec Trump-Copy-Strategie (on-chain + Truth-Signal, Event-Study, dritte Paper-Engine)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 07:23:03 +00:00
2bd566ce5e feat: Dashboard mit Tabs (Trading/GridBot) und Preis-Charts mit Trade-Markern
- Candlestick-Charts (4h) mit Buy/Sell-Markern und Hover-Tooltips (Trade-Details, OHLC)
- Trend-Chart mit Pair-Auswahl (BTC/ETH/SOL/XRP), offene Positionen als Kreis-Marker
- Grid-Chart (XRP) mit Grid-Level-Linien (Center + L1-L8) und Lot-Markern
- GridBot-Tab mit eigener Equity-Kurve (Daten gab es schon, waren ungenutzt)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 07:41:12 +00:00
021049b259 feat: GridBot als zweite Paper-Engine — No-Stop-XRP-Grid live
processGridCycle (Paritätstest gegen runGridBacktest), GridEngine mit
DB-Recovery (grid_state/grid_lots, bot_state id=2), bot-Spalte in
paper_trades/equity_snapshots, /api/grid, Dashboard-Panel.
Bewusster Paper-Probelauf trotz Gate-Fail (User-Entscheidung 2026-06-10).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 07:29:42 +00:00
f754b91acd feat: No-Stop-Grid-Variante (--no-stop, --pair) — erstes Edge-Signal auf XRP
XRP-Datenanalyse: nie enge Ranges, breite Bänder → No-Stop-Design.
OOS-PF 2.0-2.74, Volldurchlauf +49% bei 10% MaxDD. Gate formal 
(Worst-Window + Ratio), Tail-Risiko dokumentiert.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 07:17:33 +00:00
3d16b76f23 feat: Grid-Timeframe parametrisierbar (--tf) — kürzere TFs monoton schlechter
aggregateTf verallgemeinert aggregate4h. Walk-Forward 1h/15m:
PF 0.59/0.29 (vs 0.87 auf 4h), 15m MaxDD 97% — Fee-Mathematik bestätigt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 07:00:45 +00:00
b5dd953afc feat: ATR-GridBot mit Regime-Filter — Walk-Forward, Gate nicht bestanden
3 fixe Varianten (spacing 1.0/1.5×ATR, ADX<20/15): OOS-PF 0.87/1.03/0.94.
Grid-Stops bei Range-Breakdowns fressen die TP-Gewinne — kein Paper-Deploy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 06:43:38 +00:00
2dcab7f24d docs: Domain-Alias trade.kuns.dev ergänzt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 06:28:50 +00:00
b272b07044 docs: CLAUDE.md — Architektur-Invarianten und Deploy-Referenz
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 06:16:39 +00:00
29846e82a7 feat: Live-Paper-Engine — 5-min-Loop, API, Dashboard, Dockerfile
processCycle spiegelt Runner-Semantik exakt (Paritätstest gegen runBacktest),
Restart-Recovery über Cursor, DecisionLog mit Outcome-Backfill,
Bun.serve-API + statisches Dashboard, Deploy-Ziel trading.kuns.dev.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 06:11:44 +00:00
c5d71bba74 feat: Schema für Live-Engine (positions, paper_trades, decision_logs, bot_state, equity_snapshots)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 06:11:44 +00:00
69a0a7bee3 docs: Design Live-Paper-Engine (Phase 3, Paper-Probelauf der besten Variante)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 06:11:44 +00:00
cd6553c170 docs: Walk-Forward-Ergebnisse aller 7 Varianten (Gate nicht bestanden)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 22:11:25 +00:00
29000a2bba feat: Rotation-Walk-Forward-CLI (gemeinsame OOS-Aggregation extrahiert)
aggregateOos() aus runWalkForward herausgezogen und exportiert; beide
Walk-Forward-Varianten (Donchian + Rotation) nutzen dieselbe OOS-Logik.
Neues Script rotation-walkforward.ts mit identischem Report-Format und
Persistenz in backtest_runs (kind='rotation-walkforward').
package.json: "rotation"-Script ergänzt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 22:09:22 +00:00
b7e81374f1 feat: Momentum-Rotation-Backtest (dual momentum, weekly, fixe Parameter)
Neues Modul rotation.ts: wöchentliche Rotation über BTC/ETH/SOL/XRP_USDT
auf 4h-Basis, Long-Only, top-1 Pair mit positivem 30-Tage-Momentum.
4 TDD-Tests (Leader-Selektion, Flip/Rotation, Cash-Modus, Determinismus).
ClosedTrade.exitReason um 'rotation' erweitert.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 22:09:16 +00:00
8e838c4a66 feat: --fixed Flag — Walk-Forward ohne Grid-Suche (fixe Spec-Default-Parameter) 2026-06-09 22:03:31 +00:00
cdf5b133a9 feat: Backfill-Ziel auf 36 Monate erweitert 2026-06-09 21:48:23 +00:00
c07a34e671 feat: ADX-Trendstärke-Filter (fix 20, nicht im Grid) gegen Chop-Whipsaw
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 21:46:57 +00:00
736db184ab feat: Short-Seite im Runner + Walk-Forward-CLI (--shorts Flag)
- BacktestConfig.allowShort: boolean (required, explizit)
- Runner: Short-Entry (stop = close + mult×ATR), updateChandelierShort für Trail,
  Stop-Check auf High >= stop, Gap-Fill nach oben
- Bestehende Runner-Tests: allowShort: false ergänzt (Verhalten byte-identisch)
- Neuer E2E-Test: Short-Breakout → trailing_stop; Long-Only-Sanity-Check
- walkforward.ts script: --shorts Flag, Ausgabe "Shorts: AN/AUS"
- walkforward.test.ts: allowShort: false ergänzt

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 21:33:58 +00:00
0e1b477e27 feat: Short-Seite — Indikator, Strategie, Chandelier, Sizing, Portfolio
- donchianLow: Spiegelbild von donchianHigh (tiefstes Tief der N Candles vor i)
- evaluateAt(allowShort=false): Short-Signal wenn close < donchianLow && close < trendEma
- IndicatorSet + Evaluation erweitert um donchianLow; signal: 'long'|'short'|null
- updateChandelierShort: ll + mult×ATR, wandert nur abwärts
- sizePosition(side): Short ignoriert Cash-Cap, stopDist = stop − entry
- Portfolio: highestHigh → trailExtreme; open/close/equity für Shorts; side auf Position + ClosedTrade

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 21:29:30 +00:00
26166c5f3c fix: Gate-Check 4 — Fenster <5 Trades maskieren keine Verstöße mehr
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 21:12:11 +00:00