StockTalk SA
Back to About

How the StockTalk Sentiment Index works

The StockTalk Sentiment Index is a per-ticker measure of how the JSE retail-investor community is leaning on each stock right now. This page documents exactly what goes into the number, how it's calculated, when it refreshes, and where its blind spots are. If you're going to quote a sentiment percentage in your own analysis, this is the page to read first.

What we measure

For every JSE-listed stock with a community page on StockTalk, we track the share of bullish, bearish, and neutral posts written by community members over a rolling 7-day window. The output is three percentages that sum to 100 (e.g. 58% bullish, 22% bearish, 20% neutral) along with the raw post count those percentages were computed from.

Inputs

Each input post comes from one of two sources:

Posts that are deleted, hidden by moderation, or flagged as spam are excluded from the window before percentages are computed. Reply posts (i.e. comments inside a thread) are included in the same window as their parent; the post-author's own sentiment tag applies, not the parent's.

Calculation

For a given ticker T and the current moment:

  1. Collect every non-deleted, non-flagged post on T from the last 7 calendar days (rolling, not calendar-aligned).
  2. Filter to posts that carry a sentiment tag. Untagged posts are visible in the feed but do not count toward the index — only explicit sentiment counts as a signal.
  3. Tally bullish, bearish, and neutral. The displayed percentages are each count divided by the total tagged-count and rounded to the nearest whole number; ties are broken in favour of neutral so the bars always sum to 100.
  4. Compute the sample size (total tagged posts in the window). The widget always shows this number alongside the percentages so readers can judge confidence.

Posts are weighted equally. We do not weight by author reputation, upvote count, post length, or sentiment confidence. This is a deliberate simplicity choice — a more sophisticated weighting scheme would be harder to explain and easier to game.

Refresh cadence

The sentiment widget on each stock page is server-rendered with a 60-second revalidation interval. The sector-level rollup on each /sector/[slug] page revalidates every 60 seconds against a 7-day window as well. Once cached, an individual page can be served from the edge for up to 60 seconds before the next read triggers a re-aggregation at the origin. For high-traffic tickers the practical lag from a new tagged post to it being visible in the index is under two minutes.

What the index is good for

What it is not

Known limitations

When this page was last updated

This methodology document is versioned in git alongside the code that computes the index. Last updated: . Significant changes to the calculation will be reflected here on the day of the change and noted in the StockTalk SA blog.


Questions about the methodology, or a specific ticker where the index looks wrong? Email support@stocktalk.co.za and we'll investigate. We treat anomaly reports as bugs first, opinion second.