How purushothamanshanmugam/ai_hft_simulator works
HFT AI Simulator is a multi-asset trading research platform: its documented workflow prepares market data, trains five model types, runs agents against test data, and reports portfolio and risk results. The tree also shows live-feed, sentiment/alpha, regime, dashboard, and exchange-execution capabilities. Some README-described data modules are absent from the supplied tree, so they are not assigned invented paths; connections for unsampled execution internals are omitted.
Main entry points: main.py Pipeline Entry · multi_agent_sim.py Agent Simulation · dashboard.py Trading Dashboard · matching_engine.py Matching Engine
Components 27
Model Research
- Pipeline Entry
main.py - DQN Trainer
src/models/train_dqn.py - PPO Trainer
src/models/train_ppo.py - LSTM Trainer
src/models/train_lstm.py - XGBoost Trainer
src/models/train_xgboost.py - Transformer Trainer
src/models/train_transformer.py
Trading Simulation
- Multi-Asset Environment
src/envs/multi_asset_env.py - Agent Simulation
src/simulation/multi_agent_sim.py
Live Signals
- Live Data Processor
src/live/live_data_processor.py - Kafka Producer
kafka_producer.py - Kafka Consumer
kafka_consumer.py - News Fetcher
src/news/news_fetcher.py - FinBERT Sentiment
src/news/sentiment_engine.py - Sentiment Features
src/news/build_sentiment_features.py - Live Sentiment
src/news/live_sentiment_provider.py - Sentiment Aggregator
src/news/sentiment_aggregator.py - Alpha Signal
src/alpha/alpha_signal.py - Alpha Scoring
src/alpha/alpha_engine.py - Regime Detector
src/regime/regime_detector.py
Exchange Execution
- Matching Engine
src/execution/matching_engine.py - Order Book Engine
src/execution/order_book_engine.py - Order Book
src/execution/order_book.py - Order Model
src/execution/order.py - Latency Model
src/execution/latency_model.py
Monitoring
- Risk Metrics
src/analytics/risk_metrics.py - Trading Dashboard
src/dashboard/dashboard.py
Other components
- Researcher / Operator
Connections 29
- Researcher / Operator → Pipeline Entry: runs
main.py - Pipeline Entry → DQN Trainer: trains
main.py - Pipeline Entry → PPO Trainer: trains
main.py - Pipeline Entry → LSTM Trainer: trains
main.py - Pipeline Entry → XGBoost Trainer: trains
main.py - Pipeline Entry → Transformer Trainer: trains
main.py - Pipeline Entry → Agent Simulation: runs
main.py - DQN Trainer → Multi-Asset Environment: trains in
src/models/train_dqn.py - PPO Trainer → Multi-Asset Environment: trains in
src/models/train_ppo.py - Agent Simulation → Multi-Asset Environment: simulates in
src/simulation/multi_agent_sim.py - Agent Simulation → LSTM Trainer: loads model
src/simulation/multi_agent_sim.py - Agent Simulation → XGBoost Trainer: loads model
src/simulation/multi_agent_sim.py - Agent Simulation → Transformer Trainer: loads model
src/simulation/multi_agent_sim.py - Agent Simulation → Risk Metrics: calculates metrics
src/simulation/multi_agent_sim.py - Researcher / Operator → Trading Dashboard: views results
README.md - Trading Dashboard → Live Data Processor: uses
src/dashboard/dashboard.py - Trading Dashboard → Kafka Consumer: uses
src/dashboard/dashboard.py - Trading Dashboard → Alpha Signal: uses
src/dashboard/dashboard.py - Trading Dashboard → LSTM Trainer: uses
src/dashboard/dashboard.py - Trading Dashboard → Transformer Trainer: uses
src/dashboard/dashboard.py - Sentiment Features → News Fetcher: fetches news
src/news/build_sentiment_features.py - Sentiment Features → FinBERT Sentiment: scores text
src/news/build_sentiment_features.py - Alpha Signal → Alpha Scoring: scores signal
src/alpha/alpha_signal.py - Alpha Signal → Regime Detector: detects regime
src/alpha/alpha_signal.py - Kafka Producer → Kafka Consumer: streams ticks
README.md - Matching Engine → Order Book: matches against
README.md - Order Book Engine → Order Book: uses book
README.md - Matching Engine → Order Model: processes orders
README.md - Matching Engine → Latency Model: models latency
README.md