Skip to content
All library documents

Naive Bayes Classification for Trading Signals and Its Limitations

Article QuantInsti blog

Summary

The document introduces Bayesian classification and applies a Bernoulli Naive Bayes model to a long-only stock trading example. The features are binary signals derived from RSI and the stochastic oscillator; the target labels whether the following day's return is positive. It explains the model's simplifying assumption that features are conditionally independent, outlines multinomial, Gaussian, and binomial variants, and notes that smoothing can address zero-probability issues.

The example uses Apple price data over a stated historical period and reports test-set accuracy of about 51.3 percent. The author characterizes this as a demonstration with room for improvement, not evidence of a profitable strategy. The indicators are derived from price data and may not be independent, illustrating a central limitation of the model. The article also notes that the example has no short-selling rules and that accuracy alone does not establish trading performance; it does not provide broader validation or risk-adjusted results in the supplied text.

Key ideas

  • Naive Bayes estimates class probabilities from features using conditional probability.
  • Its simplifying assumption is that features are independent given the target class.
  • The example classifies next-day return direction from RSI and stochastic signals.
  • The reported accuracy is close to chance and does not establish profitability.
  • Laplace-style smoothing can prevent a zero feature probability from zeroing the combined estimate.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.