Navigation

Unified Agent Layout

unified_agent/ |-- data_client.py # OptiverDataClient: data access layer |-- tool_registry.py # ToolRegistry: 84 tools organized by category |-- execution_context.py # ExecutionContext: shared state |-- plan_builder.py # PlanBuilder: regex -> execution plan |-- agentic_engine.py # State machine orchestrator |-- feature_engineering.py # V2 feature generation |-- model_pipeline.py # LightGBM training with time-series CV |-- optuna_tuner.py # Hyperparameter optimization |-- walk_forward.py # Walk-forward backtesting |-- feature_drift.py # Feature drift detection |-- target_drift.py # Target/concept drift detection |-- data_quality.py # Data quality monitoring |-- monitoring_alerts.py # Alert routing |-- smart_tools.py # Meta-tools (SmartAnalyze, SmartMonitor) `-- report_templates.py # Structured report outputs

Execution Flow

CLI + REPL

cli/main.py provides interactive commands and one-shot queries.

Planner

PlanBuilder compiles regex patterns into ordered execution steps.

Engine

AgenticEngine executes plan steps and updates ExecutionContext.

Reports

report_templates generate analysis, model, and monitoring summaries.

Data Source

Trading at the Close data is loaded from ~/Python/Optiver/OptFeatureViz/train.csv.

~480k rows 200 stocks 481 dates 17 columns