Bayesian reference coverage audit

The initial port covered the buy-side consensus tutorial’s independent forecast update. It did not cover the entire production signal. The complete numerical workflow is now exposed through bayesian_kpi_predictions and BayesianPredictionSettings, preserving the reference method and output names.

Audited source

Calculation coverage

Reference behavior Implementation
Actual growth series_math.actual_growth
Previous-actual estimate growth series_math.estimate_growth
Growth-to-level conversion prediction_math
Dispersion-to-growth conversion prediction_math
Shifted expanding prior series_math.prior_moments
Fixed forecast prior series_math.prior_moments
Shifted expanding error precision series_math.error_precision
Fixed forecast error precision series_math.error_precision
Absolute and relative growth errors series_math.growth_errors
Dispersion, count exponent and variance multiplier prediction_math
Shifted consensus bias and Kalman filter series_math.adjust_consensus_for_bias
Independent posterior prediction_math
Correlation-adjusted posterior series_math.correlation_adjusted_expectation
Joint-history alignment and sample covariance prediction_math
Student-t growth and ordered level bounds prediction_math
All 25 output names prediction_settings.BAYESIAN_VALUES
Per-output historical/forward stitching prediction_math.calculate_prediction_series
Publication availability gate preparation
Fixed and latest publication-relative horizons preparation
Training-window start preparation

Verification

  • Numerical parity: 36 golden scenarios generated by executing the reference’s numerical methods in isolation, without the Exabel runtime. Cases cover both methods, all output selections, bias, error modes, missing histories, dispersion fallback and forecast stitching. Expected missingness is checked alongside values.
  • Point-in-time behavior: Later model revisions, actual restatements and observations at or after as_of cannot change the result.
  • Panel contracts: Separate entities, nullable values, empty frames, explicit UTC dates, training starts and publication schedules have runnable tests.
  • Historical leakage: Changing later actuals and errors cannot change earlier backtests.
  • Compatibility: The earlier BayesianPosterior API and its golden tests remain unchanged. It is the tutorial interface, not the full reference workflow.

Integration boundaries

  • Data access: Model IDs, KPI groups, vendor acquisition and hierarchy resolution remain with callers. The library accepts the existing estimate panel.
  • Calendars: Callers provide fiscal period ends and publication schedules. Exabel’s calendar lookup and signal-evaluation machinery are not dependencies.
  • Units: Values are ordinary numeric data. Currency conversion and Exabel’s custom currency dtype remain upstream.
  • Time windows: start_date selects the training sample. Callers filter the output display window after calculation; it must not change the training sample. Exabel’s two-year query prefetch is a loading concern.
  • Timestamp boundary: All panel reads use the package’s exclusive known_at boundary. Publication availability uses the reference’s inclusive previous-actual date comparison. External date-version loading semantics are not reproduced.
  • Delayed actuals: A historical output is refused if earlier realized history was not available at its own reading cutoff; its diagnostics are masked.
  • Refusal rows: The package retains subject keys and an explicit eligibility reason where the signal would return no value. Diagnostic columns can still be populated when the prediction is unavailable.
  • Forward universe: The panel entry point reports predictions for unrealized subjects. In particular, it does not relabel historical consensus-only subjects as forward predictions when the model is excluded.

Mathematical derivations: