The Market Context card shown on individual stock detail views and the Intelligence tab is computed by bayesian_signals.py. It has three parts, and each is scoped to exactly what it can honestly claim.
1. Regime classifier. Deterministic thresholds on real MPR, inflation, external reserves, and Brent crude inputs classify the current macro regime (e.g. restrictive/accommodative rates, high/low inflation, oil-positive/negative) and map it to a plain-English sector implication.
2. Composite score (descriptive, not predictive). A base rate of up-days over the last 30 trading days (Laplace-smoothed), adjusted by real filing activity, NGN/USD correlation, S&P 500 correlation, and market breadth. Composite score = base_rate × filing × FX × global × breadth × 100. This is a summary statistic describing recent history, shown as "highest score," never as "validated" or "significant" on its own.
3. Directional significance (a real hypothesis test, added Phase 2, August 2026). A stock's daily direction is tested against the null hypothesis that it is no better than a coin flip, using an exact two-tailed binomial test, with a real Benjamini-Hochberg FDR correction at q=0.10 across every ticker tested that run. A zero-change day (no real trade printed a new price) is excluded from the count entirely rather than treated as a "down" day - a stock needs at least 15 real (nonzero-change) trading days in its trailing 30 before a test is attempted at all. A stock only shows a "Directionally significant" badge when it actually passed this test; every other stock shows no badge, not a false negative.
An earlier version of this feature (through July 2026) computed a "statistical significance" figure from a transform of the composite score itself, rather than a real hypothesis test - a circular calculation that could describe itself as "FDR-validated" but never actually tested anything. It was removed in August 2026 once identified, and rebuilt as the binomial test described above. If you saw an "FDR-validated" or "not FDR-significant" badge on AfriTerminal before this date, it should not be relied on; the current badge is a different, real calculation.
Every score on this card - composite score, regime label, and significance result alike - carries a confidence label and the number of trading days it was computed from. A score is never shown without that context. None of this is investment advice, and no part of it constitutes a buy, sell, or hold signal.