How kkvamshee/strat-trading-exp works
This is a modular crypto trading system for historical replay/backtesting and real-time paper or live trading. The principal workflow starts at the CLI, obtains candle data, builds market features, dispatches a selected strategy through risk checks, then records decisions and executes approved orders; replay also summarizes strategy performance. The graph preserves the separate market-ingestion, strategy, execution, persistence, and analytics responsibilities. README content was empty, so documented capabilities rely on the CLI excerpt; unsampled modules are included only where the source index or excerpts support them.
Main entry points: main.py Trading CLI · replay_engine.py Historical replay · database.py SQLite database · brain.py Strategy brain
Components 17
Trading workflows
- Trading CLI
main.py - Historical replay
src/replay_engine.py - Configuration
src/config.py
Market data
- Coinbase connector
src/coinbase_connector.py
Strategy decisions
- Strategy brain
src/brain.py - Strategy factory
src/strategies/registry.py - Jev AI strategy
src/strategies/jev_strategy.py - Technical strategies
src/strategies/technical_strategies.py - Strategy interface
src/strategies/base.py - Trading models
src/models.py
Trade execution
- Paper engine
src/paper_engine.py - Live executor
src/order_executor.py
Persistence and analytics
- SQLite database
src/database.py - Trading monitor
src/monitor.py - Performance tracker
src/performance_tracker.py
Other components
- Operator
- Coinbase API
Connections 28
- Operator → Trading CLI: invokes
main.py - Trading CLI → Historical replay: runs replay
main.py - Trading CLI → Coinbase connector: starts streaming
main.py - Trading CLI → Strategy brain: evaluates candles
main.py - Trading CLI → Paper engine: executes paper
main.py - Trading CLI → Live executor: selects live
main.py - Trading CLI → SQLite database: records decisions
main.py - Trading CLI → Configuration: loads settings
main.py - Historical replay → Coinbase connector: backfills candles
src/replay_engine.py - Coinbase connector → Coinbase API: fetches market data
src/coinbase_connector.py - Coinbase connector → SQLite database: stores candles
src/coinbase_connector.py - Historical replay → SQLite database: loads history
src/replay_engine.py - Historical replay → Strategy factory: builds strategies
src/replay_engine.py - Trading CLI → Strategy factory: builds strategy
main.py - Strategy factory → Jev AI strategy: constructs
src/strategies/registry.py - Strategy factory → Technical strategies: constructs
src/strategies/registry.py - Jev AI strategy → Strategy interface: implements
src/strategies/jev_strategy.py - Technical strategies → Strategy interface: implements
src/strategies/technical_strategies.py - Strategy brain → Strategy interface: dispatches signal
src/brain.py - Strategy brain → Trading models: builds state
src/brain.py - Historical replay → Strategy brain: evaluates history
src/replay_engine.py - Strategy brain → Trading models: returns intent
src/brain.py - Historical replay → Paper engine: simulates orders
src/replay_engine.py - Paper engine → SQLite database: persists portfolio
src/paper_engine.py - Live executor → SQLite database: uses trading state
src/order_executor.py - Historical replay → Performance tracker: summarizes runs
src/replay_engine.py - Trading monitor → Trading models: uses market models
src/monitor.py - SQLite database → Trading models: stores records
src/database.py