Bollinger Bands
bbands
(candles: List[[Candle]], period: int = 20, multiplier: float = 2, column: str = "close") -> List[BBANDS]
Parametrs:
candles: List[[Candle]]
period: int, default 20
multiplier: float, default 2
column: str, deafault 'close'
OHCLV - open high close low
Returns:
BBANDS
this is object with fieldsupper
,middle
,lower
Bollinger Bands
Bollinger Bands serve as a technical analysis tool used to identify when prices may be high or low in comparison to recent trends.
Constructing Bollinger Bands Bollinger Bands are created by plotting three lines based on the price movements of a security. The central line represents the intermediate-term trend, usually calculated as a 20-day simple moving average (SMA) of closing prices. The upper and lower bands are drawn at a set number of standard deviations above and below the central line, typically two standard deviations.
To calculate the bands, the number of periods used for the SMA and the standard deviation must be determined. The standard deviation indicates the degree of price variation, while the number of standard deviations determines how wide the bands are. Although settings can be customized, the standard setup of a 20-day SMA with two standard deviations is most common.
The upper band is calculated by adding two standard deviations to the central SMA, while the lower band is found by subtracting two standard deviations. The distance between the upper and lower bands varies depending on market volatility—when volatility increases, the bands widen, and when volatility decreases, the bands narrow.
Key Takeaways
Bollinger Bands are a technical analysis tool designed to assess the relative high and low of an asset’s price by examining its historical fluctuations.
These bands consist of three lines: a central moving average, and an upper and lower band positioned at specific distances from this central line.
The upper and lower bands are typically set at two standard deviations above and below the 20-day simple moving average (SMA).
This construction provides a framework to measure market volatility and determine potential overbought or oversold conditions.
The Role of Bollinger Bands
The bands are a direct reflection of the market’s price volatility. As volatility rises, the bands widen, indicating larger price fluctuations. Conversely, when volatility decreases, the bands contract, signaling a period of consolidation.
Traders often use Bollinger Bands to identify potential entry and exit points. When an asset’s price approaches or breaches the upper band, it may indicate that the asset is overbought and due for a price correction. Similarly, when the price nears the lower band, it suggests the asset may be oversold and a price rebound is likely.
Understanding Moves Within the Bands
The construction of Bollinger Bands is grounded in the principles of statistical analysis, specifically the normal distribution. Standard deviation, a measure of how much a value deviates from its average, is used to define the distance between the bands.
The bands are typically set two standard deviations from the SMA, which theoretically contains 95% of an asset's price movements if the price distribution follows a normal curve. This statistical framework helps capture the majority of price fluctuations while accounting for typical volatility. The bands adjust dynamically to market changes, ensuring their relevance across different market conditions.
When prices breach the upper or lower bands, it suggests that the asset is trading at an extreme relative to its recent history. A breach of the upper band could signal an overbought condition, while a breach of the lower band may indicate an oversold condition. However, prices can remain outside these bands for extended periods during strong trends.
Signals at the Upper Band
When the price reaches or exceeds the upper band, this can indicate that the asset is overbought, signaling a potential reversal or slowdown in momentum. This scenario often occurs when the price exceeds its typical trading range, suggesting that buyers may be exhausting their enthusiasm.
The movement of the price beyond the upper band also signifies heightened volatility. The widening of the bands indicates that price fluctuations have become more significant, often in response to news events, earnings reports, or shifts in market sentiment.
For traders employing mean reversion strategies, the upper band can serve as a price target. In markets without a clear trend, hitting the upper band could signal an opportunity to sell or short the asset, with the expectation that the price will move back toward the central band.
During a strong uptrend, it is not uncommon for the price to repeatedly touch or even stay above the upper band for extended periods. This persistent movement above the upper band may indicate sustained buying pressure and a continuation of the trend. However, confirmation from other indicators is recommended to ensure that the uptrend is not weakening.
The upper band can also serve as a potential breakout point. A price move that starts at the upper band and continues beyond it could indicate the beginning of a new trend, particularly if accompanied by increased trading volume.
Signals at the Lower Band
The lower band of Bollinger Bands is used to identify oversold conditions. When the price touches or falls below the lower band, it may indicate that the asset is undervalued or that selling pressure has gone too far. This condition could lead to a price reversal or a pause in the downward trend.
Just as the upper band signifies increased volatility, the lower band marks greater volatility in the context of a downtrend. A price breach of the lower band could indicate that the asset is experiencing significant bearish sentiment.
For mean reversion traders, the lower band presents a potential buying opportunity. If the price has fallen to the lower band, it might rebound toward the central band or even higher, particularly in a market without a strong downtrend.
However, if the price stays below the lower band for an extended period, this could signal the onset of a stronger downtrend. Continued movement below the band may indicate that bearish momentum is likely to persist. Traders should confirm this signal with other indicators to avoid false signals.
A decisive move below the lower band, accompanied by high trading volume, could suggest the start of a new bearish trend, warranting a sell or short position.
What Widening Bands Mean
When Bollinger Bands widen, it indicates an increase in volatility, as the price moves further away from the SMA. This heightened volatility can result from various factors, including economic news, earnings releases, or significant shifts in market sentiment.
Widening bands often signal the beginning of a major price trend. As volatility increases, the likelihood of sustained price movements in one direction also rises. Traders should confirm these signals with other technical indicators or price patterns before taking action.
Widening bands can also occur after a period of contraction, known as a "squeeze." A squeeze often precedes a breakout, although the direction of the breakout is uncertain. To gauge the potential direction, traders should monitor the price movement in relation to the bands and other technical indicators.
What Tightening Bands Mean
A contraction of the bands suggests lower volatility, with price movements becoming more confined. Tightening bands indicate that market interest may be waning, and price fluctuations are becoming smaller.
Despite reduced volatility, tightening bands can be a precursor to major price movements or breakouts. Traders closely watch for a breakout after a period of tight bands, as these are often followed by strong trends in either direction.
Tightening bands also indicate uncertainty in the market. If prices remain within a narrow range, traders may wait for new information or a breakout event to trigger a more decisive price movement.
How Reliable are Bollinger Bands? The reliability of Bollinger Bands as a predictive tool depends on several factors:
Asset Characteristics
Different assets exhibit varying degrees of volatility, affecting the utility of Bollinger Bands. Assets prone to sudden volatility spikes may behave unpredictably within the bands.
Parameter Settings
The standard settings for Bollinger Bands are a 20-period SMA and bands placed at two standard deviations. However, these parameters can be adjusted depending on the asset or time frame being analyzed.
Complementary Indicators
Bollinger Bands work best when used in conjunction with other technical indicators, such as volume or momentum oscillators like the RSI or MACD. These additional tools can help confirm signals and provide further context.
Outlier Events
Bollinger Bands assume a normal distribution of price returns, but financial markets often experience "fat tails," where prices deviate significantly from the mean. In such cases, prices can breach the bands without indicating a reversal or significant change. Another strategy based on Bollinger Bands is the Bollinger Bounce, which involves buying or selling when the price rebounds from the upper or lower bands toward the central line. This strategy works well in ranging markets where prices oscillate between the bands without a clear trend.
In conclusion, while Bollinger Bands are a powerful tool for assessing market volatility and identifying potential entry and exit points, they should be used in conjunction with other indicators and analysis techniques to confirm trading signals and manage risk effectively.
Limitations of Using Bollinger Bands Bollinger Bands, while a valuable tool in technical analysis, do have several limitations that traders should be mindful of.
First, they are a lagging indicator, meaning they react to price movements rather than predict them. As a result, they may signal changes only after the price has already begun to move, potentially causing traders to miss the optimal moment for action.
Second, during periods of high market volatility, when the bands expand significantly, Bollinger Bands can sometimes produce false signals. In such times, price movements may breach the bands without indicating a true reversal, leading to misleading or premature conclusions.
Third, the default settings of Bollinger Bands—using a 20-day simple moving average (SMA) and two standard deviations—may not be appropriate for every trading scenario. These settings, while effective in many cases, may need adjustment depending on the asset or market conditions being analyzed.
Finally, while Bollinger Bands can provide useful insights, they are often more reliable when used in conjunction with other indicators, such as volume analysis or momentum oscillators. Relying solely on Bollinger Bands without additional confirmation can result in poor trading decisions, as they may not capture the full scope of market dynamics.
In short, while Bollinger Bands are a powerful tool for identifying price extremes and volatility, traders should use them with caution and in combination with other strategies to ensure more accurate predictions and sound decision-making.
Last updated