Align structural trade cues with market context

This commit is contained in:
2569718930@qq.com
2026-03-24 02:07:15 +08:00
parent 5796d380c5
commit fc72b3539d
3 changed files with 183 additions and 12 deletions
+6 -2
View File
@@ -43,13 +43,15 @@ def _build_vertical_profile_signal(
hourly_next_48h: Dict[str, list],
local_date: str,
local_hour: int,
first_peak_h: int,
last_peak_h: int,
) -> Dict[str, Any]:
times = hourly_next_48h.get("times") or []
if not times:
return {}
preferred_start = max(local_hour, 12)
preferred_end = 19
preferred_start = max(local_hour, max(0, first_peak_h - 2))
preferred_end = min(23, last_peak_h + 1)
candidate_indexes = [
index
for index, ts in enumerate(times)
@@ -766,6 +768,8 @@ def _analyze(city: str, force_refresh: bool = False) -> Dict[str, Any]:
next_48h_hourly,
local_date_str,
local_hour,
first_peak_h,
last_peak_h,
)
# ── 13. Cloud description (METAR primary, MGM fallback) ──