How user-nmmmmm/quanttradingv2 works
Still Water QuantTrading is a Python quantitative-trading research framework whose main workflow runs from market data through regime detection, strategy routing, portfolio allocation and risk controls to simulated or live execution and reporting. Backtesting uses aligned historical bars and next-bar execution; live trading adds polling, account/order reconciliation, durable state and safety gates. The README also documents data-source adapters, research validation, signal-analysis capabilities and a read-only operations dashboard. Some connections below are documented only at the architecture level; unsampled implementation details are not inferred.
Main entry points: runtime.py Event Processor · live_trading/engine.py Live Engine · backtest/engine.py Backtest Engine · main.py Backtest CLI
Components 27
Entry and Data
- Backtest CLI
main.py - Data Fetcher
core/data_fetcher.py - Market Data Adapters
core/market_data.py
Decision Core
- Event Processor
core/runtime.py - Market State Machine
core/state.py - Strategy Router
router/router.py - Trading Strategies
strategies/base.py - Portfolio Allocation
core/allocation.py - Risk Manager
core/risk/__init__.py - Portfolio and Lots
core/portfolio.py
Execution
- Backtest Engine
backtest/engine.py - Live Engine
live_trading/engine.py - Tick Orchestrator
live_trading/tick_orchestrator.py - Simulated Execution
backtest/execution_adapter.py - Broker Matching
core/broker/matching.py - Safe Live Broker
core/live_broker/__init__.py
Operations
- Durable State
core/state_store_v2.py - Health and Alerts
core/health.py - Operations Dashboard
dashboard/web.py
Research and Reporting
- Backtest Reporting
backtest/reporting/__init__.py - Research Validation
analysis/research_validation.py - Signal Analysis
core/signal_adaptive.py
Other components
- Backtest Operator
- Live Operator
- Market Data Sources
- CCXT Exchange
- Dashboard User
Connections 31
- Backtest Operator → Backtest CLI: starts backtest
README.md - Backtest CLI → Data Fetcher: requests data
README.md - Market Data Sources → Data Fetcher: supplies prices
README.md - Data Fetcher → Market Data Adapters: normalizes data
README.md - Backtest CLI → Backtest Engine: runs backtest
main.py - Market Data Adapters → Event Processor: delivers bars
README.md - Backtest Engine → Event Processor: processes bars
README.md - Live Operator → Live Engine: starts polling
README.md - Live Engine → Tick Orchestrator: runs ticks
live_trading/engine.py - Live Engine → Market Data Adapters: refreshes prices
README.md - Live Engine → Safe Live Broker: syncs account
README.md - Event Processor → Market State Machine: checks regime
README.md - Event Processor → Strategy Router: collects candidates
README.md - Strategy Router → Trading Strategies: routes signals
router/router.py - Event Processor → Portfolio Allocation: allocates candidates
README.md - Portfolio Allocation → Risk Manager: checks exposure
README.md - Event Processor → Risk Manager: checks circuit breaker
README.md - Risk Manager → Portfolio and Lots: constrains positions
README.md - Event Processor → Simulated Execution: submits orders
README.md - Simulated Execution → Broker Matching: adapts execution
README.md - Broker Matching → Portfolio and Lots: records fills
README.md - Tick Orchestrator → Event Processor: routes bars
README.md - Tick Orchestrator → Safe Live Broker: submits orders
README.md - Safe Live Broker → CCXT Exchange: places orders
README.md - Live Engine → Durable State: persists state
README.md - Live Engine → Health and Alerts: assesses health
README.md - Backtest Engine → Backtest Reporting: produces reports
README.md - Backtest Engine → Research Validation: supports validation
README.md - Backtest Engine → Signal Analysis: records signal evidence
README.md - Dashboard User → Operations Dashboard: views status
README.md - Operations Dashboard → Health and Alerts: reads operations status
README.md