Factors Directory

Quantitative Trading Factors

Bullish/Bearish Ratio

Technical Factors

factor.formula

BR(N) = ∑(MAX(0, HIGH - CLOSE[1]), N) / ∑(MAX(0, CLOSE[1] - LOW), N)

The BR indicator calculates the ratio of the sum of long forces to the sum of short forces in the past N trading days. N is the lookback period, which defaults to 20.

  • :

    The lookback period represents the number of trading days used to calculate the BR indicator. It is usually between 10 and 30, and the default value is 20. Shorter periods are more sensitive to price fluctuations, while longer periods are smoother.

  • :

    Highest price of the day

  • :

    Previous day's closing price

  • :

    Lowest price of the day

factor.explanation

The Bollinger Buy-Sell Propensity Ratio (BR) measures the relative strength of long and short positions in the market by quantifying the range of daily price fluctuations relative to the previous day's close. Specifically:

  • Numerator (∑(MAX(0, HIGH - CLOSE[1]), N)): measures long-side sentiment, calculated as the sum of the daily highs that were higher than the previous day's close over the past N trading days. If the daily high is lower than or equal to the previous day's close, the contribution is 0, indicating that long positions do not have an advantage on that day.

  • Denominator (∑(MAX(0, CLOSE[1] - LOW), N)): measures short-side sentiment, calculated as the sum of the daily highs that were higher than the daily lows over the past N trading days. If the daily low is higher than or equal to the previous day's close, the contribution is 0, indicating that short positions do not have an advantage on that day.

Interpretation of BR indicator:

  • High BR value: Indicates that the bulls are relatively strong, the market may be overbought, and the stock price may face the risk of a correction. Especially when the BR value rises rapidly, it may indicate an excessive rise in stock prices in the short term.
  • Low BR value: Indicates that the bears are relatively strong, the market may be oversold, and the stock price may have a chance to rebound. Especially when the BR value is lower than 1, it may indicate an excessive decline in stock prices.
  • Combining BR indicator with AR indicator: BR indicator is often used in combination with AR indicator to more accurately judge market trends. When both BR and AR are in a state of sharp decline, it may indicate that the stock price is about to peak; when BR is lower than AR and AR is low (for example, < 50), it may indicate that the stock price has bottomed out; when BR rises rapidly and AR is in a state of consolidation or decline, it may indicate that the stock price is rising; when BR is higher than AR and turns lower than AR, it may be a buy signal; when BR reaches a peak and falls sharply (for example, the decline exceeds 50), it may also be a bargain hunting opportunity.

Limitations of BR indicator:

  • Hysteresis: As a technical indicator, the BR indicator has a certain hysteresis and cannot accurately predict future price trends.

  • False signals: The BR indicator may generate false signals, so it needs to be combined with other indicators and market conditions for comprehensive judgment.

  • Parameter sensitivity: The results of the BR indicator are sensitive to the choice of the lookback period N, so it needs to be adjusted according to different market conditions.

Related Factors