stability
This commit is contained in:
@ -3406,7 +3406,7 @@ class TradingOrchestrator:
|
||||
"""Evaluate prediction outcome and train model"""
|
||||
try:
|
||||
model_name = record["model_name"]
|
||||
prediction = record["prediction"]
|
||||
prediction = record.get("prediction") or {}
|
||||
timestamp = record["timestamp"]
|
||||
|
||||
# Convert timestamp string back to datetime if needed
|
||||
@ -3451,10 +3451,8 @@ class TradingOrchestrator:
|
||||
return
|
||||
|
||||
# Enhanced reward system based on prediction confidence and price movement magnitude
|
||||
predicted_action = prediction["action"]
|
||||
prediction_confidence = prediction.get(
|
||||
"confidence", 0.5
|
||||
) # Default to 0.5 if missing
|
||||
predicted_action = prediction.get("action", "HOLD")
|
||||
prediction_confidence = prediction.get("confidence", 0.5)
|
||||
|
||||
# Calculate sophisticated reward based on multiple factors
|
||||
current_pnl = self._get_current_position_pnl(symbol)
|
||||
|
Reference in New Issue
Block a user