Spaces:
Running
Running
| # src/strategy.py | |
| def get_market_regime(prediction_prob): | |
| """ | |
| Translates model probability into actionable trading zones. | |
| """ | |
| if prediction_prob >= 0.578: | |
| return { | |
| "zone": "GREEN ZONE (Sniper)", | |
| "color": "green", | |
| "icon": "๐", | |
| "action": "Move/Stay to 3x S&P 500 (SPXL/UPRO)", | |
| "tag": "High Conviction Bullish" | |
| } | |
| elif 0.530 <= prediction_prob < 0.578: | |
| return { | |
| "zone": "YELLOW ZONE (Normal)", | |
| "color": "orange", | |
| "icon": "โ๏ธ", | |
| "action": "Move/Stay to 1x S&P 500 (SPY/VOO)", | |
| "tag": "Standard Market Beta" | |
| } | |
| else: | |
| return { | |
| "zone": "RED ZONE (Cash)", | |
| "color": "red", | |
| "icon": "๐ก๏ธ", | |
| "action": "Move/Stay to CASH (0x)", | |
| "tag": "Risk Aversion / Defensive" | |
| } |