HKUDS/Vibe-Trading · error · RuntimeError
{alpha_id}: IC series empty — insufficient overlap between f
Error message
{alpha_id}: IC series empty — insufficient overlap between factor and returns What it means
After computing the IC series for an alpha, _bench_one_alpha requires a non-empty result. Empty means the factor DataFrame and the forward-return DataFrame share no overlapping timestamps (or symbols), so no rank correlation can be computed.
Source
Thrown at agent/src/tools/alpha_bench_tool.py:693
raise ValueError("panel missing 'close' — cannot derive forward returns")
# Next-period return aligned to current row (use t+1 close, shift back).
fwd = close.pct_change(fill_method=None).shift(-1)
return fwd
def _bench_one_alpha(
registry: Any,
alpha_id: str,
panel: dict[str, pd.DataFrame],
return_df: pd.DataFrame,
) -> dict[str, Any]:
"""Compute IC stats for one alpha. Returns a dict, may raise SkipAlpha / RegistryError."""
from src.factors.factor_analysis_core import compute_ic_series # local import
factor_df = registry.compute(alpha_id, panel)
ic_series = compute_ic_series(factor_df, return_df)
if ic_series.empty:
raise RuntimeError(
f"{alpha_id}: IC series empty — insufficient overlap between factor and returns"
)
ic_mean = float(ic_series.mean())
ic_std = float(ic_series.std())
ir = ic_mean / ic_std if ic_std > 0 else 0.0
ic_pos = float((ic_series > 0).mean())
alpha = registry.get(alpha_id)
meta = alpha.meta or {}
return {
"id": alpha_id,
"zoo": alpha.zoo,
"theme": meta.get("theme", []),
"formula_latex": meta.get("formula_latex", ""),
"ic_mean": round(ic_mean, 6),
"ic_std": round(ic_std, 6),
"ir": round(ir, 4),
"ic_positive_ratio": round(ic_pos, 4),
"ic_count": int(len(ic_series)),View on GitHub (pinned to 80ffdda44c)
Solutions
- Reindex/align factor_df and return_df to a common trading calendar before benching
- Extend the period so factor and return dates overlap by at least a few bars
- Verify the alpha's compute() output is not empty or all-NaN for the requested panel
Defensive patterns
Strategy: validation
Validate before calling
common = factor_df.index.intersection(return_df.index)
assert len(common) >= 5, f'only {len(common)} overlapping dates' Type guard
def has_overlap(factor_df, return_df, min_bars: int = 5) -> bool:
return len(factor_df.index.intersection(return_df.index)) >= min_bars Try / catch
try:
_bench_one_alpha(...)
except RuntimeError as e:
if 'IC series empty' in str(e):
reindex_factor_to_calendar(); retry or skip alpha Prevention
- Align factor and price data to one calendar before benching
- Timezone-normalize all index timestamps at load time
When it happens
Trigger: Factor timestamps that don't align with return timestamps (different calendars/timezones); a factor computed only on dates after the returns window ends; all-NaN factor columns causing row-wise drops in compute_ic_series.
Common situations: Factors built on a different trading calendar (e.g. crypto 24/7 vs A-share calendar); timezone misalignment between factor and close panels; too-short windows where next-bar shifting removes all overlap.
Related errors
- var_backtest needs at least 2 aligned observations, got {ret
- period must be string, got {type(period).__name__}
- period {period!r} must be YYYY-YYYY or YYYY-MM-DD/YYYY-MM-DD
- start_date ({start}) > end_date ({end})
- universe {universe!r} not recognized; expected one of {sorte
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/1c243388b1651770.
Report an issue: GitHub.