How vijish18/indian-regime-trader works
This is an India-focused, long-only NSE cash-equity trading system. Its main workflow is point-in-time market data → regime assessment and stock ranking → portfolio construction → independent risk checks → order execution, with orchestration coordinating trading sessions. Separate research paths provide walk-forward backtesting and performance analysis; paper trading, broker adapters, operational monitoring, and live-safety controls support deployment. Several subsystem paths and links are based on README documentation or source-index references rather than inspected implementations.
Main entry points: orchestrator.py Trading orchestration · order_manager.py Order lifecycle · feature_engineering.py Market features · allocation.py Exposure allocation
Components 21
Market data
- Ingestion and data
data/ingestion.py - Local data storage
data/storage.py
Strategy
- Point-in-time universe
universe/universe.py - Stock selection
universe/stock_selector.py - Market features
core/features/feature_engineering.py - Regime model
core/regime/hmm_engine.py - Exposure allocation
core/regime/allocation.py - Portfolio construction
portfolio/portfolio_constructor.py
Backtesting
- Backtest engine
backtest/engine.py - Walk-forward analysis
backtest/walk_forward.py - Indian trading costs
backtest/costs.py
Trading operations
- Risk management
risk/risk_manager.py - Trading orchestration
orchestration/orchestrator.py - Order lifecycle
execution/order_manager.py - Paper broker
broker/adapters/paper_broker.py - Zerodha adapter
broker/zerodha/kite_broker.py - Paper trading runtime
app/paper_runtime.py
Operations
- Configuration
config/models.py - Monitoring and alerts
monitoring/alerts.py - Live safety gate
live/preflight.py
Other components
- Operator
Connections 23
- Operator → Trading orchestration: runs sessions
- Configuration → Trading orchestration: configures
orchestration/orchestrator.py - Ingestion and data → Local data storage: persists data
data/ingestion.py - Local data storage → Market features: supplies observations
- Ingestion and data → Point-in-time universe: supports eligibility
- Point-in-time universe → Stock selection: filters candidates
universe/stock_selector.py - Market features → Regime model: provides features
core/regime/hmm_engine.py - Regime model → Exposure allocation: classifies regime
core/regime/allocation.py - Exposure allocation → Portfolio construction: sets exposure budget
portfolio/portfolio_constructor.py - Stock selection → Portfolio construction: provides rankings
portfolio/portfolio_constructor.py - Portfolio construction → Risk management: submits proposed targets
risk/risk_manager.py - Trading orchestration → Market features: coordinates regime inputs
orchestration/orchestrator.py - Trading orchestration → Exposure allocation: coordinates allocation
orchestration/orchestrator.py - Trading orchestration → Order lifecycle: manages orders
orchestration/orchestrator.py - Risk management → Order lifecycle: authorizes trades
- Order lifecycle → Paper broker: dispatches orders
broker/adapters/paper_broker.py - Order lifecycle → Zerodha adapter: dispatches orders
- Paper trading runtime → Paper broker: runs simulation
- Walk-forward analysis → Backtest engine: runs folds
backtest/walk_forward.py - Backtest engine → Indian trading costs: prices trades
backtest/engine.py - Trading orchestration → Monitoring and alerts: emits operational alerts
orchestration/orchestrator.py - Operator → Monitoring and alerts: views status
- Live safety gate → Zerodha adapter: gates live trading