Generate trading signals using neural-trader's anomaly detection engine.
Steps:
- Ensure neural-trader is available:
npm ls neural-trader 2>/dev/null || npm install --ignore-scripts neural-trader - Scan for signals:
With a specific strategy:npx neural-trader --signal scan --symbols <TICKERS>npx neural-trader --signal scan --strategy <name> --symbols <TICKERS> - If --strategy specified, load strategy filters:
mcp__claude-flow__memory_retrieve({ key: "strategy-NAME", namespace: "trading-strategies" }) - neural-trader classifies anomalies automatically:
- spike (maxZ > 5): breakout — momentum entry or mean-reversion fade
- drift (sustained high Z): trend forming — trend-following signal
- flatline (low Z): consolidation — prepare for breakout
- oscillation (alternating): range-bound — mean-reversion at extremes
- pattern-break (multiple dims): regime change — close and reassess
- cluster-outlier (>50% dims): multi-factor dislocation — arbitrage
- Use SONA for regime prediction:
mcp__claude-flow__neural_predict({ input: "anomaly types: [DETECTED], scores: [SCORES]" }) - Search historical pattern matches:
mcp__claude-flow__agentdb_pattern-search({ query: "ANOMALY_TYPE score RANGE", namespace: "trading-signals" }) - Present ranked signals: instrument, direction, confidence, anomaly type, entry/stop/target
- Store signals with a 24-hour TTL (intraday signals shouldn't pollute long-running memory; the
MemoryConsolidator.sweepExpired()pass introduced in ADR-125 Phase 4 — shipped in@claude-flow/memory@3.0.0-alpha.18— sweeps them out after they expire):mcp__claude-flow__memory_store({ key: "signal-TIMESTAMP", value: "SIGNALS_JSON", namespace: "trading-signals", expiresAt: Date.now() + 24 * 60 * 60 * 1000 })