Data Methodology

Last updated: 24 August 2026 · Version 1.2

AfriTerminal is a data aggregation and display platform, not a regulated financial services provider. Nothing on this platform constitutes investment advice. This document is provided for transparency and auditability purposes.

1. Overview

AfriTerminal aggregates publicly available financial data from multiple sources and presents it in a unified interface for African capital markets professionals. All data is sourced from official exchange feeds, government publications, and reputable public APIs. No proprietary or licensed data is used without permission.

Data is retrieved by automated Python scrapers running as GitHub Actions workflows. Outputs are committed as static JSON and CSV files served via GitHub Pages. There is no real-time streaming infrastructure - all data represents end-of-day or intra-day snapshots with the delays noted in the table below.

2. Data Sources

Data type Source Refresh Delay Limitation
NGX equity prices NGX Group (doclib.ngxgroup.com) Up to 16× per weekday ~30 min Daily change% only; no intraday tick data
NGX corporate filings NGX Group SharePoint API Daily 09:30 WAT Same-day AI summary may misinterpret; always verify the original PDF
FX rates open.er-api.com Daily End-of-day 8 focus currencies (NGN, GHS, KES, ZAR, EGP, XOF, AOA, DZD). Reference rate only; not interbank or CBN official rate
Macro indicators IMF World Economic Outlook, CBN, NBS Monthly / quarterly 1–7 days post-publication Revisions not auto-captured; historical data may lag
Sovereign bond yields DMO Nigeria, World Government Bonds, public sources Daily Same-day Indicative yields; not tradeable quotes
Global equity indices Yahoo Finance (scraper) Daily ~15 min Subject to Yahoo Finance terms of service; not real-time
NGX market flows NGX Group monthly investor activity report Monthly ~30 days post-period Aggregated totals only; not security-specific
BRVM / GSE / NSE / EGX Official exchange websites (public feeds) Daily End-of-day Partial coverage; fewer stocks than NGX
AfriTerminal Sector Indices Computed from NGX prices (sector_indices.py) and Yahoo Finance (global_indices.py) Daily post-market Same-day Phase 1A: equal-weighted. Free-float adjustment deferred to Phase 2A post-NGX data partnership

3. AI Market Intelligence

AI-generated narratives are produced by Claude Haiku (Anthropic) running in GitHub Actions. The daily market intelligence briefing is generated for 07:00 WAT on trading days and analyses the previous session; news intelligence refreshes approximately every 2 hours. The model is given a structured prompt containing only data drawn from the files listed in Section 2 - it is explicitly prohibited from inventing figures, extrapolating from training data, or making buy/sell/hold recommendations.

Hard rules enforced in every generation: no invented figures; no buy/sell/hold signals; every number must trace to a named data file; disclaimer on every output. These rules are enforced at the prompt level.

Each narrative includes a data_sources field listing which files the model cited. Where available, an invalidation_condition field describes what specific data or event would change the narrative's conclusion.

AI outputs are refreshed on weekdays only. The timestamp shown on the INTELLIGENCE tab reflects the actual generation time. If a generation run fails, the previous day's output is shown with its age clearly labelled.

4. Anomaly Detection

The ⚡ anomaly flag on stock rows identifies statistically unusual price moves. The method is a rolling z-score:

  • Compute daily % changes from the last 30 trading days of price history.
  • Calculate mean and standard deviation of those changes.
  • Compute z-score for today's move: z = (today_change − mean) / std.
  • Flag as anomaly if |z| > 2 AND |today_change| > 2%.
  • Stocks with standard deviation < 0.3% (illiquid - price barely moves) are excluded from z-score scoring.

The z-score, mean, and standard deviation are surfaced on the per-stock anomaly card inside the dashboard. This flag does not imply directional prediction - it indicates the move is statistically unusual relative to recent history. Minimum 11 days of price history required before any stock can receive a flag.

5. Market Context Layer

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.

6. AfriTerminal Sector Indices

AfriTerminal publishes two families of proprietary sector indices, Phase 1A (launched May 2026):

  • NGX Sector Indices (ATBI-NG, ATCI-NG, ATOI-NG, ATTI-NG, ATCGI-NG, ATII-NG, ATAGI-NG): 7 equal-weighted sector indices across NGX-listed equities. Base level: 1,000 on launch date.
  • Global Sector Benchmarks (ATGBI, ATGMI, ATGEI, ATGTI, ATGCI, ATGII, ATGAI): 7 market-cap weighted indices tracking the same sectors' largest global companies via Yahoo Finance.

Index level formula: Level(t) = Level(t−1) × Σ(weight_i × Price_i(t) / Price_i(t−1)). Weight constraints: maximum 35% per single constituent; minimum 2%; top-3 combined maximum 65%. Applied iteratively (up to 10 passes).

Phase 1A uses equal weighting for NGX indices because reliable free-float adjusted market capitalisation data is not yet available via the public NGX feed. Market-cap weighting with free-float adjustment is planned for Phase 2A, subject to an NGX data partnership.

7. Financial History, Peer Comparisons & Implied Valuation

AfriTerminal maintains a structured database of NGX company fundamentals (profit after tax, EPS, revenue, dividends) extracted from official filings. Sources are strictly limited to the filed documents themselves: annual reports and results announcements from NGX Group's document library. News articles and third-party aggregators are never used as a source for a financial figure.

Extraction verification. Every extracted figure is verified against the literal text printed in the source PDF before it can be stored. Figures pass through relational validation checks (profit against revenue, EPS arithmetic, year-on-year magnitude bands, unit and scale reconciliation between kobo and naira). Each figure carries an extraction confidence level (high, medium, or low). Figures below the confidence threshold are withheld from display and routed to manual review; they are never published. Where a displayed figure carries less than high confidence, a visible badge marks it.

FY-only standard. All displayed comparisons (financial history cards, peer comparisons, the relative value screener, implied valuations) use full-year (FY) figures exclusively. Interim periods (quarterly, half-year) are stored but never mixed into displayed comparisons, because NGX interim reporting is too inconsistently labelled to support reliable trailing-twelve-month construction.

Peer comparisons group companies by NGX subsector (falling back to sector where a subsector is thin) and show each company's fundamentals side by side. Implied valuation multiplies a company's statistically projected EPS (bear, base, and bull scenarios derived from its own filing history) by the trailing P/E median of its sector peers. Peers with implausible multiples (outside a 0.3x to 60x band) are excluded from the median. Where the resulting figure sits far from the current market price (beyond 3x in either direction), it is still shown, marked with an explicit out-of-band note and capped at Low confidence, rather than hidden.

Implied valuation figures are data comparisons, not price targets. They show what projected earnings would be worth at peer-median multiples; they carry no view on whether price converges toward them. Every implied valuation card carries its own confidence score, peer count, and disclaimer.

8. Portfolio Risk Analytics

Where you record positions in the Portfolio view, AfriTerminal computes four analytics directly from your recorded positions and its own live/historical market data - never a fabricated or estimated figure:

  • Concentration: largest single position and top-3 combined, as a percentage of total recorded portfolio value at live prices.
  • FX sensitivity: a value-weighted average of each holding's own NGN correlation (from the Market Context Layer, Section 5). If not every holding has an FX signal yet, the card reports partial coverage explicitly (e.g. "2 of 3 positions") rather than silently excluding the rest.
  • Benchmark-relative return: each position's return since it was added is compared against the NGX All-Share Index's return over that same holding period (not one shared window - different positions have different start dates), then rolled up into a value-weighted portfolio-level figure. The NGX ASI series is limited to its trailing 30 recorded data points; a position held longer than that has no matching starting point yet and is reported as "not yet comparable," not silently dropped.
  • Correlation matrix: pairwise Pearson correlation of daily price changes across your holdings, computed only where a pair has at least 15 overlapping trading days of price history - a thinner pair shows "n/a" rather than a number computed on too little data.

Portfolio positions are personal record-keeping data you enter yourself; see the Privacy Policy for how they are stored, and Section 9 (Free Access & Future Subscriptions) of the Terms of Use for the record that this is not a brokerage or execution service.

9. Coverage Graph

The Coverage Graph aggregates every analyst's coverage universe into per-ticker counts, surfacing which names are most and least covered relative to their liquidity, and how coverage has shifted quarter-on-quarter.

A ticker's coverage count is only ever shown once at least 5 analysts cover it. Below that threshold it is shown only as "<5," in every list, including quarter-on-quarter change figures - a smaller exact count, or a delta computed against one, would let a reader work backward toward who is covering a thinly-covered name. Phrasing is generated from fixed templates, not by an AI model, to keep this legally sensitive surface free of directive language.

10. Financial Data API

Analysts on eligible tiers can generate an API key from the dashboard to pull financial_history data programmatically, including into Excel via Power Query. The API returns full-year (FY) figures only, on the same confidence-verified basis described in Section 7, one ticker per request, capped at 20 rows per response.

Every request is subject to a daily quota per key; requests beyond it are rejected, not queued. See Section 9 (API Access) of the Terms of Use for usage terms.

11. Data Retention

  • NGX price history: rolling 1,095 days (3 years)
  • FX history: rolling 90 days
  • Sector index history: rolling 1,095 days
  • Market intelligence outputs: current run only (no archive)
  • Company fundamentals (financial history): retained indefinitely (the multi-year comparison base)
  • NGX filings: rolling ~90-day display window, with a permanent internal archive per year

12. Limitations

  • Coverage: Nigeria (NGX), Ghana (GSE), Kenya (NSE), South Africa (JSE), Egypt (EGX), BRVM West Africa. Other African markets are not yet covered.
  • NGX price history is accumulating daily from May 2026. Features requiring 30+ days of history (Bayesian signals, full z-score coverage) activate progressively.
  • No real-time data. All prices are delayed by at least 15–30 minutes. Do not use for intraday trading decisions.
  • AI narratives may contain errors. Always verify figures against primary sources before acting on them.
  • Yahoo Finance data is subject to Yahoo's terms of service. AfriTerminal uses it via server-side scrapers only, not from browser requests.

Contact

For methodology questions, data corrections, or institutional access enquiries:

info@afriterminal.com