HKUDS/Vibe-Trading · error · ValuationError
fcff_bridge: ebit forecast is empty; at least one projection
Error message
fcff_bridge: ebit forecast is empty; at least one projection year is required
What it means
fcff_bridge() requires at least one projection year; an empty ebit sequence raises ValuationError rather than returning an empty/zero result.
Source
Thrown at agent/src/quantlib/valuation/dcf.py:611
length as ``ebit``.
delta_nwc: Net-working-capital change forecast (positive = cash
outflow; see the module docstring), same length as ``ebit``.
Returns:
One :class:`FCFFYear` per projection year, in order.
Raises:
ValuationError: If ``tax_rate`` is outside ``[0, 1]``, if ``ebit`` is
empty, if the other three forecasts are not the same length as
``ebit``, or if any forecast entry is not a finite number.
"""
if not 0.0 <= tax_rate <= 1.0:
raise ValuationError(f"fcff_bridge: tax_rate must be within [0, 1], got {tax_rate!r}")
ebit_list = list(ebit)
horizon = len(ebit_list)
if horizon == 0:
raise ValuationError(
"fcff_bridge: ebit forecast is empty; at least one projection year "
"is required"
)
forecasts = {
"depreciation_amortization": list(depreciation_amortization),
"capex": list(capex),
"delta_nwc": list(delta_nwc),
}
for name, values in forecasts.items():
if len(values) != horizon:
raise ValuationError(
f"fcff_bridge: {name} has {len(values)} year(s), expected "
f"{horizon} to match ebit"
)
years = []
for index in range(horizon):
ebit_value = _require_finite(ebit_list[index], f"ebit[{index}]", "fcff_bridge")View on GitHub (pinned to 80ffdda44c)
Solutions
- Check len(ebit) > 0 before calling; skip or flag empty cases
- Fix the upstream filter/join that dropped all forecast rows
- If empty inputs are expected in your flow, branch to a non-DCF valuation path
Example fix
# before
result = fcff_bridge(ebit=df['ebit'], ...)
# after
if len(df) == 0:
raise ValueError(f'no forecast rows for {ticker}')
result = fcff_bridge(ebit=df['ebit'], ...) Defensive patterns
Strategy: validation
Validate before calling
if len(list(ebit)) == 0:
raise ValueError('no forecast years available')
fcff_bridge(ebit=ebit, ...) Type guard
def has_rows(seq) -> bool:
return len(list(seq)) > 0 Try / catch
try:
fcff_bridge(...)
except ValuationError as e:
if 'empty' in str(e):
return None # skip entity
raise Prevention
- Check row counts after filters/groupbys
- Skip empty segments explicitly in batch jobs
- Fail loudly on empty upstream data pulls
When it happens
Trigger: fcff_bridge(ebit=[], depreciation_amortization=[], capex=[], delta_nwc=[]) — e.g. a filtered forecast frame that ended up with zero rows.
Common situations: Date-range filters or per-segment groupbys that legitimately produce zero rows; upstream data pull returning an empty frame for one ticker.
Related errors
- FCFFYear.year must be >= 1, got {self.year!r}
- FCFFYear(year={self.year}).nopat={self.nopat!r} does not mat
- FCFFYear(year={self.year}).fcff={self.fcff!r} does not match
- fcff_bridge: tax_rate must be within [0, 1], got {tax_rate!r
- fcff_bridge: {name} has {len(values)} year(s), expected {hor
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/d636f03723c88192.
Report an issue: GitHub.