Update tradingagents/cross_asset_correlation/correlation_regimes_fixed.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
d7cee37e01
commit
5bc5d224c2
|
|
@ -203,11 +203,11 @@ class CorrelationRegimeDetector:
|
||||||
Returns:
|
Returns:
|
||||||
Tuple of (predicted regime, probability)
|
Tuple of (predicted regime, probability)
|
||||||
"""
|
"""
|
||||||
if current_regime.value not in transition_matrix.index:
|
if current_regime not in transition_matrix.index:
|
||||||
return current_regime, 1.0
|
return current_regime, 1.0
|
||||||
|
|
||||||
# Get transition probabilities from current regime
|
# Get transition probabilities from current regime
|
||||||
probs = transition_matrix.loc[current_regime.value]
|
probs = transition_matrix.loc[current_regime]
|
||||||
|
|
||||||
# Adjust based on market conditions if provided
|
# Adjust based on market conditions if provided
|
||||||
if market_conditions:
|
if market_conditions:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue