HKUDS/Vibe-Trading · warning · SkipAlpha

: panel missing extras

Error message

{alpha_id}: panel missing extras {missing_extra}

What it means

Same pre-flight check as the columns check, but for meta['extras_required'] — additional panel keys an alpha needs beyond core OHLCV columns (e.g. benchmark returns, cap, dividends). Missing extras raise SkipAlpha.

Solutions

  1. Supply the declared extra key(s) in the panel
  2. Inspect registry.get(alpha_id).meta['extras_required'] to know what to build
  3. Skip such alphas when the extra dataset is unavailable

Example fix

# before
panel = {'close': close, 'open': open, ...}
# after
panel = {'close': close, 'open': open, ..., 'benchmark': benchmark_returns}
Defensive patterns

Strategy: validation

Validate before calling

extras = registry.get(alpha_id).meta.get('extras_required', [])
if not all(e in panel for e in extras): skip(alpha_id)

Type guard

def has_extras(panel: dict, meta: dict) -> bool:
    return all(e in panel for e in meta.get('extras_required', []))

Try / catch

try:
    out = registry.compute(aid, panel)
except SkipAlpha:
    continue

Prevention

When it happens

Trigger: compute(alpha_id, panel) where the alpha declares extras_required (like 'benchmark') and the panel dict does not include that key.

Common situations: Running Alpha101 alphas that need 'benchmark' returns without supplying an index/benchmark series; panels built from a minimal loader without extra datasets.

Related errors


AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28). Data as JSON: /api/errors/c183667312b83594. Report an issue: GitHub.

Appendix: source

Thrown at agent/src/factors/registry.py:337

        }

    def compute(self, alpha_id: str, panel: dict[str, pd.DataFrame]) -> pd.DataFrame:
        """Lazy-import the alpha module and run its ``compute(panel)``.

        Raises:
            KeyError: alpha_id unknown.
            SkipAlpha: required column / sector tag absent in panel.
            RegistryError: import/compute failed or output failed sanity checks.
        """
        alpha = self.get(alpha_id)
        meta = alpha.meta

        missing = [c for c in meta.get("columns_required", []) if c not in panel]
        if missing:
            raise SkipAlpha(f"{alpha_id}: panel missing required columns {missing}")
        missing_extra = [c for c in meta.get("extras_required", []) if c not in panel]
        if missing_extra:
            raise SkipAlpha(f"{alpha_id}: panel missing extras {missing_extra}")
        if meta.get("requires_sector") and "sector" not in panel:
            raise SkipAlpha(f"{alpha_id}: panel missing sector tag")

        try:
            module = self._load_module(alpha)
        except Exception as exc:  # noqa: BLE001 — isolate import failure
            raise RegistryError(f"{alpha_id}: import failed: {exc}") from exc

        compute_fn = getattr(module, "compute", None)
        if compute_fn is None:
            raise RegistryError(f"{alpha_id}: module has no compute() function")

        try:
            result = compute_fn(panel)
        except Exception as exc:  # noqa: BLE001 — isolate compute failure
            raise RegistryError(f"{alpha_id}: compute() raised: {exc}") from exc

        return self._validate_output(alpha_id, result, panel)

View on GitHub (pinned to 80ffdda44c)