more info at signals

This commit is contained in:
Dobromir Popov
2025-07-29 00:20:07 +03:00
parent e1e453c204
commit ea4db519de
2 changed files with 50 additions and 17 deletions

View File

@ -4581,6 +4581,9 @@ class TradingOrchestrator:
logger.debug(f"Skipping disabled model {pred.model_name} in decision making")
continue
# DEBUG: Log individual model predictions
logger.debug(f"Model {pred.model_name}: {pred.action} (confidence: {pred.confidence:.3f})")
# Get model weight
model_weight = self.model_weights.get(pred.model_name, 0.1)
@ -4598,8 +4601,18 @@ class TradingOrchestrator:
# Choose best action - safe way to handle max with key function
if action_scores:
# Add small random component to break ties and prevent pure bias
import random
for action in action_scores:
# Add tiny random noise (±0.001) to break exact ties
action_scores[action] += random.uniform(-0.001, 0.001)
best_action = max(action_scores.keys(), key=lambda k: action_scores[k])
best_confidence = action_scores[best_action]
# DEBUG: Log action scores to understand bias
logger.debug(f"Action scores for {symbol}: BUY={action_scores['BUY']:.3f}, SELL={action_scores['SELL']:.3f}, HOLD={action_scores['HOLD']:.3f}")
logger.debug(f"Selected action: {best_action} (confidence: {best_confidence:.3f})")
else:
best_action = "HOLD"
best_confidence = 0.0