R8: Accounting- + Supervisor-Modul + Core-Datenfundament (S-0)
Portierung der beiden fehlenden Grundbausteine aus PolytraderSharp (voller Ausbau). Core S-0 (Datenfundament fuer Analyse/Forensik): - core_decision_journal + core_order_events (+ ReasonCode/Decision/OrderEvent-Enums), IDecisionJournal/IOrderEventLog mit fehlertoleranten EF-Impls (Handel bricht nie). - SignalId-Durchreichung TradeSignal -> ExecutionService -> core_trade_history; ExecutionService schreibt an jeder Verzweigung Journal/Order-Events. - JSONL-Log-Sink (LogJson + Dual-Sink), pure Analytik: RealizedPnlEngine (FIFO), TradeAnalytics, DossierBuilder. Migration AddAnalysisFoundation. Accounting-Modul (acc_): unabhaengiger IBKR-Kontoauszug (Activity Flex Query) hinter Interfaces mit Offline-Null-Stubs -> append-only Ledger + Periodenabrechnung/BWA + FX (USD/EUR) + CSV/PDF (PDFsharp/MigraDoc). Steuerschicht bewusst offen (Platzhalter-Tab). Kein Handel. Migration InitialAccounting. Supervisor-Modul (sup_): read-only OpenRouter-Agent (Function-Calling-Loop) + read-only Tool-Registry (8 Tools) + Profile + Dossier-Browser + Counterfactual-Job (Stub) + Tagesbericht/MCP-Light (opt-in). Migration InitialSupervisor. Verdrahtung: Program.cs (beide Module + Icons), slnx/App/Tests-Referenzen, provision-db.ps1, AppSettings-Sektionen, docs/konzepte, README. Tests: 79 -> 117 gruen (FIFO/KPIs/Dossier/JSONL, Classifier/Engine/FX/Idempotenz, OpenRouter/Registry/Agent/MCP, STA-Konstruktion beider neuen Fenster). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
cbbedb2e0e
commit
2a312ca035
@@ -214,6 +214,53 @@ public class TradingSettings
|
||||
public override string ToString() => $"{Mode} – {(TradingEnabled ? "aktiv" : "inaktiv")}";
|
||||
}
|
||||
|
||||
// ─── Accounting ──────────────────────────────────────────────────────────────
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class AccountingSettings
|
||||
{
|
||||
[Category("Accounting")]
|
||||
[DisplayName("Basiswährung")]
|
||||
[Description("Kontobasiswährung für die Abrechnung (Standard: USD)")]
|
||||
public string BaseCurrency { get; set; } = "USD";
|
||||
|
||||
[Category("Accounting")]
|
||||
[DisplayName("Ingest-Intervall (Stunden)")]
|
||||
[Description("Abstand der automatischen Kontoauszug-Abrufe (Live-Quelle; offline ungenutzt)")]
|
||||
public int IngestIntervalHours { get; set; } = 6;
|
||||
|
||||
[Category("Accounting")]
|
||||
[DisplayName("Flex Query-Id")]
|
||||
[Description("IBKR Activity Flex Query-Id (Zielland – Live-Abruf; leer = offline)")]
|
||||
public string FlexQueryId { get; set; } = "";
|
||||
|
||||
[Category("Accounting")]
|
||||
[DisplayName("Flex-Token")]
|
||||
[Description("IBKR Flex Web Service Token (Zielland; verschlüsselt ablegen, nicht im Klartext)")]
|
||||
[PasswordPropertyText(true)]
|
||||
public string FlexToken { get; set; } = "";
|
||||
|
||||
public override string ToString() => $"Basis {BaseCurrency}, alle {IngestIntervalHours} h";
|
||||
}
|
||||
|
||||
// ─── Supervisor ──────────────────────────────────────────────────────────────
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class SupervisorSettings
|
||||
{
|
||||
[Category("Supervisor")]
|
||||
[DisplayName("Modell")]
|
||||
[Description("OpenRouter-Modell für die Analyse (Standard: openrouter/auto)")]
|
||||
public string Model { get; set; } = "openrouter/auto";
|
||||
|
||||
[Category("Supervisor")]
|
||||
[DisplayName("Token-Budget/Analyse")]
|
||||
[Description("Weiches Token-Budget je Analyse-Lauf (Hinweis; harte Grenze = max. Tool-Iterationen)")]
|
||||
public int TokenBudgetPerRun { get; set; } = 60000;
|
||||
|
||||
public override string ToString() => Model;
|
||||
}
|
||||
|
||||
// ─── Root ────────────────────────────────────────────────────────────────────
|
||||
|
||||
public class AppSettings
|
||||
@@ -252,4 +299,14 @@ public class AppSettings
|
||||
[DisplayName("Trading")]
|
||||
[Description("Handelsmodus und Risiko-Parameter")]
|
||||
public TradingSettings Trading { get; set; } = new();
|
||||
|
||||
[Category("Accounting")]
|
||||
[DisplayName("Accounting")]
|
||||
[Description("Buchhaltung/Reporting (unabhängiger Kontoauszug-Ingest)")]
|
||||
public AccountingSettings Accounting { get; set; } = new();
|
||||
|
||||
[Category("Supervisor")]
|
||||
[DisplayName("Supervisor")]
|
||||
[Description("KI-Analyse/Forensik (OpenRouter, read-only)")]
|
||||
public SupervisorSettings Supervisor { get; set; } = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user