How hkuds/vibe-trading works
Vibe-Trading is a personal trading and finance-research agent with CLI, web/API, and MCP entry points. A principal workflow is a user request handled by the agent, which can use market-data and research capabilities and produce analysis or backtest results. The repository also includes factor signals, options strategies, paper trading, and live-trading controls. The graph preserves these product branches; many internal links are omitted because the sampled source does not establish their callers.
Main entry points: main.py Interactive CLI · skills.py Trading Skills · tools Agent Tools · main.tsx Web Application
Components 17
User Interfaces
- Interactive CLI
agent/cli/main.py - Web Application
frontend/src/main.tsx - HTTP API
agent/src/api - MCP Server
agent/mcp_server.py
Agent Runtime
- Agent Loop
agent/src/agent/loop.py - Trading Skills
agent/src/agent/skills.py - Agent Tools
agent/src/tools
Research and Backtesting
- Market Data Loaders
agent/backtest/loaders - Backtest Engines
agent/backtest/engines/base.py - Factor Registry
agent/src/factors/registry.py - Multi-factor Signals
agent/src/skills/multi-factor/zoo_signal_engine.py - Options Strategies
agent/src/skills/options-strategy/example_signal_engine.py
Trading Operations
- Paper Trading
agent/src/tools/paper_trade/engine.py - Live Trading Controls
agent/src/api/live_routes.py
Configuration and Services
- Runtime Configuration
agent/src/config/accessor.py - HTTP Request Helper
agent/backtest/loaders/_http.py
Other components
- Trader
Connections 16
- Trader → Interactive CLI: submits request
- Trader → Web Application: submits request
- Interactive CLI → Agent Loop: invokes
agent/cli/main.py - Interactive CLI → Agent Tools: loads tools
agent/cli/main.py - Agent Loop → Trading Skills: loads skills
- Web Application → HTTP API: calls API
- MCP Server → Agent Tools: exposes tools
- Trading Skills → Multi-factor Signals: uses signals
- Multi-factor Signals → Factor Registry: computes factors
agent/src/skills/multi-factor/zoo_signal_engine.py - Trading Skills → Options Strategies: provides strategies
- Options Strategies → Backtest Engines: feeds strategies
agent/src/skills/options-strategy/example_signal_engine.py - Backtest Engines → Market Data Loaders: reads market data
- Market Data Loaders → HTTP Request Helper: uses requests
agent/backtest/loaders/eastmoney_client.py - Agent Tools → Paper Trading: runs simulation
agent/src/tools/paper_trade/engine.py - HTTP API → Live Trading Controls: routes live controls
agent/src/api/live_routes.py - Interactive CLI → Runtime Configuration: reads settings
agent/cli/main.py