extrema trainer WIP

This commit is contained in:
Dobromir Popov
2025-08-10 03:20:13 +03:00
parent 1cc8509e87
commit b2faa9b6ca
5 changed files with 315 additions and 35 deletions

View File

@ -976,15 +976,21 @@ class TradingOrchestrator:
# The presence of features indicates a signal. We'll return a generic HOLD
# with a neutral confidence. This can be refined if ExtremaTrainer provides
# more specific BUY/SELL signals directly.
return {
"action": "HOLD",
"confidence": 0.5,
"probabilities": {
"BUY": 0.33,
"SELL": 0.33,
"HOLD": 0.34,
},
}
# Provide next-pivot prediction vector capped at 5 min
pred = self.model.predict_next_pivot(symbol=symbol)
if pred:
return {
"action": "HOLD",
"confidence": pred.confidence,
"prediction": {
"target_type": pred.target_type,
"predicted_time": pred.predicted_time,
"predicted_price": pred.predicted_price,
"horizon_seconds": pred.horizon_seconds,
},
}
# Fallback neutral
return {"action": "HOLD", "confidence": 0.5}
return None
except Exception as e:
logger.error(