Data Methodology

Last updated: July 2026 · Version 1.1

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 Signals

The Bayesian Context card shown on individual stock detail views is computed by bayesian_signals.py. The method uses a Naive Bayes composite score:

  • Base rate: fraction of the last 30 trading days that were positive for this stock (Laplace-smoothed).
  • Filing factor: multiplier if a recent filing (last 7 days) is present (1.1–1.4 depending on type).
  • FX factor: Pearson correlation of NGN/USD daily changes vs stock daily changes, scaled by today's NGN move.
  • Global factor: same method using S&P 500 daily changes.
  • Breadth factor: advance/decline ratio over last 5 days (1.05 if bullish, 0.97 if bearish).

Composite score = base_rate × filing × FX × global × breadth × 100. Scores above 50 reflect more historical up-days than down-days; below 50, the reverse.

A Benjamini-Hochberg FDR correction at q=0.10 is applied across all scored stocks to identify which scores are statistically distinguishable from noise. Stocks not meeting the FDR threshold are labelled "Not FDR-significant."

The signals system remains in an accumulation and validation phase. Price history per stock is still building toward the depth this method requires, and the scoring framework is under internal review before scores are treated as meaningful. During this period any displayed score should be read as an early estimate with LOW confidence, alongside the confidence label and data-day count shown with it. Not investment advice.

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. 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

9. 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