Skip to main content
Strategy Learning Hub

Strategy #0000000061 · Text classification and market sentiment

Social text sentiment with Bernoulli Naive Bayes
Use binary features to illustrate Bernoulli Naive Bayes, exposing the prior, conditional likelihoods and decision threshold.

Bernoulli Naive Bayes represents each word or text feature as present or absent, then combines class priors and conditional likelihoods. It is simple and interpretable, but semantics, sarcasm, bots, reposts, timestamps and sampling affect the signal. The posterior is a text-class score, not a market-return probability.

Beginner-friendlyAbout 8 minutesEvidence and practical analysis

Three ways in

Understand the story. Then inspect the risk.

Start with a familiar situation, check the payoff, then test how the numbers change.

The idea · in two minutes

How do observed text features update the posterior score for an up class?

Ava encodes two toy text features as present or absent and enters their historical frequencies in up- and down-class text.

The simulator updates the up-class score with Bayes’ rule. It only takes a hypothetical position beyond the selected threshold, then applies a manually entered market return.

The example assumes features are conditionally independent and ignores language context and event-time alignment. It reads no social data and has no labelled corpus, calibration or out-of-sample results.

  • Posterior up-class score from two present featuresEnter the up-class prior, two feature flags and class-conditional rates to inspect posterior classification and a hypothetical trade.
  • Assumed long-signal return after costsA binary teaching example with no social-platform connection; omits spam, context, availability time, label error and calibration.
  • Market data and forecast calibrationIllustrative expiry outcome.

Illustrative research examples only. They are not live signals or a recommendation.

Variants · same family, different risk levers

Related methods still carry different exposures and failure modes.

Compare the input, position and assumptions that can fail.

Related strategyRelationshipWhat changesNew cost or risk
Bag-of-words sentimentToken representationBuilds text features from word presence or counts.Ignores context and word order.
FinBERT sentimentFinancial-language embeddingUses a finance-trained language model for context.Label bias, versioning and inference latency.
Contrarian social sentimentCrowd sentiment extremesTests contrarian exposure at sentiment extremes.Sentiment extremes can persist.

A binary teaching example with no social-platform connection; omits spam, context, availability time, label error and calibration.

Read beyond the summary

References

Primary sources and research used to describe the strategy and its limits.

  1. 01Antweiler & Frank (2004), Is All That Talk Just Noise? The Information Content of Internet Stock Message Boardsresearch
  2. 02Related research / methodologyresearch