Skip to content
All library documents

Price Percentile Forecast Fan and Naive Bayes Bar Classifier

Article ProRealCode

Summary

This indicator projects five future price percentiles using a geometric Brownian motion model calibrated from recent log returns. The median follows estimated drift, while the upper and lower bands spread with the square root of the forecast horizon. A separate Gaussian Naive Bayes panel classifies whether the current bar closes up or down using relative volume and 10-bar momentum. The indicator can anchor calculations to the last completed candle to avoid unstable prices and partially accumulated volume during a live bar.

The document gives the model formula, parameter descriptions, and an analysis of limitations. Drift estimates become increasingly uncertain as the horizon grows; the author illustrates this with default settings and cautions that the median’s tilt can become uninformative. The classifier, by default, describes the bar being observed because its features overlap with the target; lagging features makes it a one-bar-ahead prediction. The author frames the fan as a tool for estimating potential price travel and setting risk levels, not as a reliable directional forecast. No out-of-sample validation or trading performance results are reported.

Key ideas

  • The forecast fan derives price percentiles from recent return mean and volatility under a geometric Brownian motion assumption.
  • Its bands widen with the square root of the forecast horizon, while the median drift scales with the horizon.
  • A separate Gaussian Naive Bayes classifier uses relative volume and 10-bar momentum to assess bar direction.
  • Anchoring features to the last closed candle avoids distortions from provisional prices and incomplete volume.
  • The default classifier describes the current bar; lagging its features is needed for a one-bar-ahead prediction.
  • The document recommends using the fan to assess price travel and risk levels, while noting substantial model uncertainty.

Tags

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