From 92919cb1efbdae43a8daa9e873f7b8aecef0326b Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Thu, 17 Jul 2025 21:50:27 +0300 Subject: [PATCH] adjust weights --- core/orchestrator.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/orchestrator.py b/core/orchestrator.py index 1c6bfc3..0e4bb25 100644 --- a/core/orchestrator.py +++ b/core/orchestrator.py @@ -424,7 +424,7 @@ class TradingOrchestrator: if self.rl_agent: try: rl_interface = RLAgentInterface(self.rl_agent, name="dqn_agent") - self.register_model(rl_interface, weight=0.3) + self.register_model(rl_interface, weight=0.2) logger.info("RL Agent registered successfully") except Exception as e: logger.error(f"Failed to register RL Agent: {e}") @@ -433,7 +433,7 @@ class TradingOrchestrator: if self.cnn_model: try: cnn_interface = CNNModelInterface(self.cnn_model, name="enhanced_cnn") - self.register_model(cnn_interface, weight=0.4) + self.register_model(cnn_interface, weight=0.25) logger.info("CNN Model registered successfully") except Exception as e: logger.error(f"Failed to register CNN Model: {e}") @@ -528,7 +528,7 @@ class TradingOrchestrator: return 50.0 # MB cob_rl_interface = COBRLModelInterfaceWrapper(self.cob_rl_agent, name="cob_rl_model") - self.register_model(cob_rl_interface, weight=0.15) + self.register_model(cob_rl_interface, weight=0.4) logger.info("COB RL Agent registered successfully") except Exception as e: logger.error(f"Failed to register COB RL Agent: {e}") @@ -769,15 +769,15 @@ class TradingOrchestrator: async def start_cob_integration(self): """Start the COB integration to begin streaming data""" - if self.cob_integration and hasattr(self.cob_integration, 'start_streaming'): + if self.cob_integration and hasattr(self.cob_integration, 'start'): try: logger.info("Attempting to start COB integration...") - await self.cob_integration.start_streaming() - logger.info("COB Integration streaming started successfully.") + await self.cob_integration.start() + logger.info("COB Integration started successfully.") except Exception as e: - logger.error(f"Failed to start COB integration streaming: {e}") + logger.error(f"Failed to start COB integration: {e}") else: - logger.warning("COB Integration not initialized or streaming not available.") + logger.warning("COB Integration not initialized or start method not available.") def _on_cob_cnn_features(self, symbol: str, cob_data: Dict): """Callback for when new COB CNN features are available""" @@ -885,9 +885,9 @@ class TradingOrchestrator: if hasattr(self, 'rl_agent') and self.rl_agent: self.model_weights["dqn_agent"] = 0.3 - # Add COB RL model weight if it exists + # Add COB RL model weight if it exists (HIGHEST PRIORITY) if hasattr(self, 'cob_rl_agent') and self.cob_rl_agent: - self.model_weights["cob_rl_model"] = 0.2 + self.model_weights["cob_rl_model"] = 0.4 # Add extrema trainer weight if it exists if hasattr(self, 'extrema_trainer') and self.extrema_trainer: