Modern C#/.NET 8 Port of the Cofieu with Blazor Web UI
A multi-agent financial analysis and trading system powered by LLMs (OpenAI), integrating with Alpaca for trading and data, Finnhub for fundamentals, and news sources.
- .NET 8.0 SDK
- Docker (optional)
- API Keys: OpenAI, Alpaca (Paper/Live), Finnhub
-
Configure Keys: Edit
appsettings.jsonor set environment variables (see.env.examplefor reference). -
Run the Web UI:
dotnet run -- webui # Opens at http://localhost:7860CLI mode is also available:
dotnet run -- analyze --tickers NVDA,AMD
-
Setup Environment:
cp .env.example .env # Edit .env and fill in your API keys -
Run with Compose:
docker compose up --build -d
The Web UI will be available at http://localhost:7860. Logs are persisted to the
trading-logsvolume.
- Frontend: Blazor Server (Server-side rendering, real-time SignalR)
- Backend: .NET 8, Dependency Injection, Serilog
- Core Logic:
TradingGraph: Direct Acyclic Graph (DAG) orchestration of agentsAlpacaService: Async wrapper for Alpaca.Markets SDKDataFlows: Services for News, Reddit, Fundamentals, TechnicalsAgents: LLM-powered analysts (Market, Macro, Risk, etc.)
The solution includes a comprehensive test suite using xUnit, bUnit (Blazor components), and Moq.
dotnet testCurrent Status: 75 tests passed, 0 failed.
App/— Application entry point and DI setupWebUI/— Blazor components (Pages,Panels) and servicesServices/— Backend services (Alpaca,DataFlows)Core/— Graph engine and LLM integrationAgents/— Analyst logicCofieu.Tests/— Unit and integration tests
Configuration is handled via appsettings.json and supports environment variable overrides (e.g., TradingConfig__LLM__QuickThinkModel).
Key settings:
- TradingConfig: LLM models, debate rounds, risk parameters
- ApiKeys: Service credentials