How richkuo/go-trader works
go-trader is a Go-orchestrated, Python-powered trading system. Its principal workflow is a scheduler cycle that launches Python strategy checks, receives JSON signals, applies portfolio risk controls, executes paper or live trades through supported venue integrations, persists state, and reports through status and messaging channels. The repository also includes a substantial research workflow for fetching market data, backtesting strategies, and analyzing regime and Hurst-gate behavior. The README establishes the runtime flow; source-index references support selected Python-module connections. Unsampled scheduler and strategy implementations are represented only at documented subsystem level.
Main entry points: main.go Go scheduler · eval_windows.py Window evaluation · backtester.py Simulation engine · hurst_1410_gate_calibration.py Hurst gate studies
Components 25
Trading runtime
- Go scheduler
scheduler/main.go - Portfolio risk
scheduler/risk.go - Trade execution
scheduler/executor.go - Runtime state
scheduler/state_store.go - Status and UI
scheduler/ui_server.go - Trade alerts
scheduler/notifier.go
Strategy execution
- Python strategy checks
shared_scripts - Strategy registry
shared_strategies/open/registry.py - Entry strategies
shared_strategies/open - Exit strategies
shared_strategies/close
Venue integrations
- Venue adapters
platforms
Backtesting research
- Backtest runner
backtest/run_backtest.py - Simulation engine
backtest/backtester.py - Window evaluation
backtest/eval_windows.py - Regime labels
backtest/regime_label_columns.py - Regime statistics
backtest/regime_stats.py - Hurst gate studies
backtest/research/hurst_1410_gate_calibration.py
Shared Python services
- Market data fetch
shared_tools/data_fetcher.py - Market-data store
shared_tools/storage.py - Egress policy
shared_tools/egress_policy.py - Strategy indicators
shared_strategies/open/indicators_core.py - ATR calculations
shared_tools/atr.py - Closed-bar data
shared_tools/closed_bar.py
Other components
- Operator
- Researcher
Connections 25
- Operator → Go scheduler: configures and starts
README.md - Go scheduler → Python strategy checks: spawns each cycle
README.md - Python strategy checks → Go scheduler: returns JSON signals
README.md - Go scheduler → Portfolio risk: manages risk
README.md - Go scheduler → Trade execution: executes trades
README.md - Go scheduler → Runtime state: persists state
README.md - Go scheduler → Status and UI: serves status
README.md - Go scheduler → Trade alerts: posts alerts
README.md - Trade execution → Venue adapters: uses venue integrations
- Python strategy checks → Strategy registry: loads strategies
- Strategy registry → Entry strategies: loads entry strategies
- Strategy registry → Exit strategies: loads exit strategies
- Researcher → Backtest runner: runs backtests
README.md - Backtest runner → Simulation engine: runs simulations
- Window evaluation → Simulation engine: evaluates legs
backtest/eval_windows.py - Window evaluation → Market data fetch: loads market data
backtest/eval_windows.py - Window evaluation → Regime labels: uses regime labels
backtest/eval_windows.py - Hurst gate studies → Window evaluation: evaluates windows
backtest/research/hurst_1410_gate_calibration.py - Hurst gate studies → Regime statistics: computes significance
backtest/research/hurst_1410_gate_calibration.py - Hurst gate studies → Strategy indicators: uses indicators
backtest/research/hurst_1410_gate_calibration.py - Simulation engine → ATR calculations: uses ATR
backtest/backtester.py - Simulation engine → Market-data store: uses storage
backtest/backtester.py - Market data fetch → Market-data store: reads and writes candles
shared_tools/data_fetcher.py - Market data fetch → Egress policy: uses network policy
shared_tools/data_fetcher.py - Entry strategies → Closed-bar data: uses closed-bar data
shared_strategies/open/adaptive_moving_average.py