Project

General

Profile

N8n Workflows und Knoten

##Workflow: mf_workflow – Add Security (ISIN → Listing → Prices)

Knotenübersicht und Verbindungen

  • Form: Add ISIN

    • Zweck: Nimmt eine ISIN über ein n8n-Formular entgegen.
    • Verbindungen: Start → Form: Add ISIN → OpenFIGI: ISIN → XETR mapping
  • OpenFIGI: ISIN → XETR mapping

    • Zweck: Fragt bei OpenFIGI das Primärlisting auf XETRA (MIC XETR) inkl. Ticker/Name ab.
    • Verbindungen: Form: Add ISIN → OpenFIGI → Set: ISIN+Name+Ticker+MIC
  • Set: ISIN+Name+Ticker+MIC

    • Zweck: Kombiniert ISIN (vom Form-Trigger) mit Name/Ticker (von OpenFIGI) und setzt MIC = XETR.
    • Verbindungen:
      • Set → PG: Upsert security
      • Set → PG: Upsert listing (XETR)
      • Set → AlphaVantage: Daily (compact, JSON)
      • Set → Stooq: Daily CSV (full)
      • Set → PG: Update indicators (SMA200/52W/3D)
      • Set → PG: Compute signal (price-only test)
      • Set → PG: Inspect last signal (Ad-hoc)
  • PG: Upsert security

    • Zweck: Legt den Stammdatensatz in core.securities an/aktualisiert (ISIN, Name).
    • Verbindungen: Set → PG: Upsert security
  • PG: Upsert listing (XETR)

    • Zweck: Speichert/aktualisiert Listing in core.listings (ISIN, MIC=XETR, Ticker, primary_flag).
    • Verbindungen: Set → PG: Upsert listing (XETR)
  • AlphaVantage: Daily (compact, JSON)

    • Zweck: Lädt die letzten Tageskurse (compact) als JSON für Symbol „.DE“.
    • Verbindungen: Set → AlphaVantage → Code: Parse AV JSON → rows
  • Code: Parse AV JSON → rows

    • Zweck: Wandelt „Time Series (Daily)“ in Zeilen (isin, date, mic, close_local, volume, source).
    • Verbindungen: AlphaVantage → Code: Parse AV JSON → rows → PG: Upsert prices (AV, last 100)
  • PG: Upsert prices (AV, last 100)

    • Zweck: Schreibt/aktualisiert die letzten ~100 AV-Kurszeilen in core.prices_daily.
    • Verbindungen: Code: Parse AV JSON → rows → PG: Upsert prices (AV, last 100)
  • Stooq: Daily CSV (full)

    • Zweck: Lädt vollständige Historie als CSV für „.de“.
    • Verbindungen: Set → Stooq → Code: Parse Stooq CSV → rows
  • Code: Parse Stooq CSV → rows

    • Zweck: Parsed CSV in Zeilen (isin, date, mic=XETR, close_local, volume, source=stooq).
    • Verbindungen: Stooq → Code: Parse Stooq CSV → rows → PG: Upsert prices (Stooq, full)
  • PG: Upsert prices (Stooq, full)

    • Zweck: Schreibt/aktualisiert volle Kurs-Historie in core.prices_daily (Upsert je ISIN/Datum/MIC).
    • Verbindungen: Code: Parse Stooq CSV → rows → PG: Upsert prices (Stooq, full)
  • PG: Update indicators (SMA200/52W/3D)

    • Zweck: Berechnet SMA200, 52W-High, 3‑Day‑High und Drawdown; setzt close_eur/adj_close_eur (hier = close_local).
    • Verbindungen: Set → PG: Update indicators (SMA200/52W/3D)
  • PG: Compute signal (price-only test)

    • Zweck: Bewertet Trend (Close ≥ 1.01×SMA200), Pullback (10–25% unter 52W-High), Timing (Close > 3‑Tage‑Hoch) und schreibt Status in core.signals.
    • Verbindungen: Set → PG: Compute signal (price-only test)
  • PG: Inspect last signal

    • Zweck: Utility-Select, zeigt die letzte Signalzeile für die ISIN (Status + rule_breakdown).
    • Verbindungen: Set → PG: Inspect last signal (nur Ad-hoc genutzt)

Workflow: mf_workflow - Market State Update

Knotenübersicht und Verbindungen

  • VIX Fetch

    • Zweck: Holt VIX-Historie (Stooq Symbol: vi.c) als CSV.
    • Verbindungen: Start → VIX Fetch → VIX Parse
  • VIX Parse

    • Zweck: Parsed CSV, baut einfachen Fear-&-Greed‑Proxy aus VIX (Mapping + 5‑Tage‑Delta).
    • Verbindungen: VIX Fetch → VIX Parse → Market State Upsert
  • Market State Upsert

    • Zweck: Speichert F&G‑Proxy in core.market_state (Upsert pro Datum, inkl. Komponenten/Quelle).
    • Verbindungen: VIX Parse → Market State Upsert

Hinweise

  • Der Market-State-Workflow läuft unabhängig (z. B. täglich 23:30 Europe/Berlin).
  • Im Hauptworkflow ist der Marktfilter noch nicht eingebunden; das kommt, sobald wir den globalen State im Signals‑Schritt berücksichtigen.