Analysis and Prediction of Bollinger Bands to Predict Stock Prices in Determining Investment Strategies

: It is critical for stock investors to be able to forecast future stock values in order to determine potential gains or losses. A technical analysis approach can be used to anticipate stock prices in the realm of stock investment. A technical analysis approach was used to construct the Bollinger bands detecting application system. Technical analysis is a means of observing price variations over a specific time period by employing historical data and indicators. The goal of this research is to predict Bollinger bands and define the circumstances for buying and selling stocks in technical analysis. The object of this study is the closing price of BBRI.JK, BBCA.JK and BMRI.JK during 2022. Data is analyzed using Bollinger Bands and decision to buy the right stock is when the actual price of the stock intersects with the lower band because at that time the stock price is increasing, while the decision to sell the right is when the actual price of the stock intersects with the upper band because at that time the stock price will decrease. In addition, the results of the Bollinger bands prediction for n + 1 from the last day of the sample, December 30, are respectively the upper and lower Bollinger bands on January 2, 2023, which are 5.012,948 and 4.775,052 for BBRI.JK shares, 8.755,919 and 8.446,581 for BBCA.JK shares, and 5.321,991 and 4.764,259 for BMRI.JK shares.


INTRODUCTION
Technical analysis is a technique for projecting stock price movements and predicting future market trends that involves monitoring stock price charts, trading volumes, and composite stock price indices.Based on previous market data, technical analysis predicts the direction of movement of stock prices and other stock market indicators (Tandelilin, 2010).Technical analysis generally looks for patterns that occur repeatedly in stock prices (Bodie, Marcus, & Kane, 2009).Despite the ongoing dispute over its profitability, technical analysis remains popular among practitioners.Bollinger Bands (BB) is one of the most prominent methods among several technical indicators.Bollinger Bands were introduced to the Financial News Network, where John Bollinger was the principal market analyst, in 1983.Bollinger Bands have increasingly gained popularity among investors since then.Bollinger Bands are one of the most popular indicators among technical analysts, according to a recent poll.A sample of over 400 currency traders voted Bollinger Bands as the most popular technical indicator, outperforming several other popular technical indicators such as Relative Strength Index (RSI), divergence moving average convergence and moving average crossover (B.S. Abbey & J. Doukas, 2012).The Bollinger band rule, as explained in his work, defines the range of x standard deviations above and below the n-day moving average of the previous closing price (J.Bollinger, 2002).The typical trend-following form of this rule expects that price will continue to move in the direction of penetration; for example, an upper (lower) BB penetration implies that prices will continue to go upward (lower), signaling a buy (sell) signal.Market contrarians, on the other hand, believe that higher (lower) BB penetrations suggest overextended prices with a strong likelihood of an upcoming trend reversal, implying a sell (buy) signal.Bollinger bands provide an indication of market price volatility, which can help traders and investors determine stop-loss levels and profit targets.By knowing the level of market volatility, traders and investors can adjust their trading strategies to reduce risk and increase profit potential.Identifying the direction of the trend and then taking only relevant bets is one way traders might modify a Bollinger Bands technique in a trending market.For example, if the trend is upward, a trader would purchase when the price reached the bottom band but would not short when the price reached the top band.Instead, they could add to their position with the next touch of the (rising) lower band.

THEORITICAL FONDATION A. Moving Average
A moving average is a statistical computation that evaluates data points by generating a series of average values from a selection of complete data sets.It is a kind of limited impulse response filter and is also known as a moving average (Kuo & Chou, 2021).
Moving averages are frequently employed with time series data to smooth out short-term variations while emphasizing longerterm trends or cycles.The application identifies the short-term and long-term thresholds, and the moving average parameters are updated accordingly.In economics, it is also applied to examine gross domestic product, employment, and other macroeconomic time series.Because moving average is a type of convolution, it can be though of as a low-pass filter in signal processing.Moving averages filter out higher frequency components without regard to time when applied to non-series data, but some form of ordering is typically inferred idea.This is known as data smoothing in layman's terms.

B. Simple Moving Average
In financial applications, a simple moving average (SMA) is an unweighted average of n previous data points.Though, in science and engineering, the mean is often determined from an equal number of data points on either side of the central value.This ensures that the variation in the average reflects the variation in the data rather than shifting over time.The basic equal-weighted moving average is the average of the last n entries in a data set containing k elements (Kuo & Chou, 2021).Definition Let those data-points be .This could be the closing price of a stock.The mean of the latest data points is represented by and calculated as (Kuo & Chou, 2021): (1) When calculating the next mean with the same sampling width n the range from to is considered.A new value is included the sum and the oldest value is removed.This simplifies the calculation by reusing the previous mean .
( Because Bollinger Bands are a highly visual technical indicator, dynamic variations in volatility are easily visible on a price chart, particularly at extremes.Some investors use these visual cues into their strategies by assessing band width and price in respect to the bands, and then combining this analysis with additional indicators. Bollinger Bands can be interpreted as follows (J.Bollinger, 2002): 1.When the price approaches the upper band (UB), it may signal overbought conditions, implying a market reversal to the downside.2. When the price approaches the lower band (LB), it may imply oversold circumstances, indicating a possible market reversal to the upside.3. The middle band (MA) represents the average price over the specified period and can serve as a reference point.
Investor often look for price crossovers of the bands or significant price deviations from the bands as potential trading signals.

D. Bollinger Bands Mechanism
Bollinger Bands are a combination of a simple moving average (SMA) and a standard deviation (SD) measure of price volatility.Bollinger Bands are calculated using three main components (J.Bollinger Bands can assist investors in identifying overbought and oversold positions based on the notion of mean reversion, which states that an asset's price will tend to converge on its average or mean price over time.When a stock's price is trading toward the upper band, it signals that it has become overbought and is due for a price correction.When the price is near the bottom band, it indicates that the stock has been oversold and is due for a rebound.This can be used as a range-bound market strategy, with the traders placing long trades when the price hits the lower band and short when it hits the upper band.However, when a stock is in a strong trend, these indications may not be as effective.Trending prices might "walk" over the upper or lower bands for a lengthy period of time.Identifying the direction of the trend and then taking only relevant bets is one way traders might modify a Bollinger Bands technique in a trending market.For example, if the trend is upward, a trader would purchase when the price reached the bottom band but would not short when the price reached the top band.Instead, they could add to their position with the next touch of the (rising) lower band (J.Bollinger, 2002).Bollinger Bands can be a very effective technical tool for stock market investors.Bollinger Bands provide insight into probable price reversals, overbought or oversold circumstances, and market volatility by combining a moving average with a measure of price volatility.Keep in mind that no single indicator can guarantee profitable trading outcomes.Before making any financial choice, investors should always exercise caution and conduct thorough research.The moving average in the middle acts as the mean of the prices, and as price gaps up to the upper and lower Bollinger Bands, there is a suggestion of value.So, if the price moves up and touches or moves past the upper line of the Bollinger Band, then it is very likely that the stock will be overbought and reverse.If the price moves down and touches or moves past the bottom Bollinger Band, the stock is likely to be oversold and reverse.Bollinger Bands can also give a sense of volatility of the stock or market.As Bollinger Bands get closer together, there tends to be less volatility and as they get further apart, there tends to be more volatility (Day, Ni, Yu, & Huang, 2020).

A. Data & Methodology
The research was conducted using daily data on the stock prices of state-owned enterprises, especially Bank BRI, Bank BCA, Bank Mandiri, which are engaged in banking, which were taken directly from the yahoo finance website and processed using an excel program.The stock code used to import data into the program is BBRI.JK for BRI bank code, BBCA.JK for BCA bank code, and BMRI.JK for Mandiri bank code.The data taken for this study starts from January 3, 2022 to December 30, 2022.This research uses technical analysis methods on stocks specifically on the Bollinger bands method.Analysis of stock prices using the Bollinger bands method will be used as a reference in determining investment strategies so that investors can maximize profits and minimize losses in determining their investment steps and strategies.

B. Data Descriptive Analysis
This descriptive analysis only describes the characteristics or properties possessed by a group or series of data (both sample data and population data), without generalizing, namely drawing a general conclusion based on sample data information imposed on the parent population.As depicted in Figure 1, it is known that the daily data on BBCA.JK stock prices has a higher stock price value compared to the daily stock prices of BBRI.JK and BMRI.JK.while the daily stock prices of BBRI.JK and BMRI.JK seem to intersect with each other, but this price comparison is only to see how the price movements of each stock price in the past year, the next table will be presented from the descriptive daily data of BBRI.JK, BBCA.JK, and BMRI.JK stock prices.The standard deviation of the stock price will then be calculated.

Thus, b) Result Of Lower Bollinger Bands
Bollinger bands indicators are indicators that function between or within a predetermined range of numbers or attributes.Bollinger bands' standard parameters are a 20-day period with two standard deviations of the price above and below the moving average line.Bollinger bands, in essence, are a method of measuring and visualizing volatility.The bands become wider as volatility rises.Similarly, as volatility falls, the gaps between the bands close.The lower Bollinger bands are calculated using the same features as the higher Bollinger bands, the difference is in the operations in the Bollinger bands formula.Upper Bollinger bands add the moving average to the standard deviation, whereas lower Bollinger bands subtract the moving average from the standard deviation.Lower Bollinger bands can be found using the following equation: By taking the daily data of BBRI.JK stock price as an example sample, here is a manual calculation of the upper Bollinger bands.

D. Discussion
The values of upper Bollinger bands and lower Bollinger bands calculated from daily data of BBRI.JK, BBCA.JK, and BMRI.JK stock prices are shown in Tables 4, 5     Visualization of the results of the calculation of upper and lower Bollinger bands on BMRI.JK shares can be seen in Figure 4. January and July are periods with the lowest lower band during 2022.While the highest upper band value is seen in Figure 4 in the year-end period in December.It can be seen in Figure 4 that if the actual share price intersects with the lower band then in the next period the actual share price increases.But in June the actual price of the stock experienced an extreme decline so that the actual price of the stock and the lower band crossed each other and even the actual price came out of the lower band.However, in July the actual share price intersected again and in the next period the share price increased.
Based on the visualization of the results of the upper and lower Bollinger bands of BBRI.JK, BBCA.JK, and BMRI.JK stock prices, it can be concluded that if the actual share price intersects with the upper band, then for the next period the price has decreased and the strategy that can be taken by investors is to sell their shares.Conversely, if the actual share price intersects with the lower band, the share price in the next period will increase and the strategy taken by investors is to buy the share price in order to gain profit and minimize their losses in investing.
In this study, the standard settings of Bollinger bands were used, namely a 20-day moving average and 2 standard deviations.Technical analysis using Bollinger bands uses historical data as a reference in analyzing stock prices, therefore we can determine the prediction of Bollinger bands for from the last day of the sample, namely December 30, then the prediction of upper and lower Bollinger bands on January 2, 2023 can each be seen in

CONCLUSION
The Bollinger Bands indicator is used to determine the continuity of a trend's direction as well as the level of stock price volatility reflected by the Bollinger bands.Bollinger Bands employ a calculation time of 20 and 2 standard deviations.The purpose of this study is that investors and readers can determine stock strategies in investing so as to minimize losses and maximize utility in investing.In accordance with the results of research and analysis of the previous description, it can be concluded that the decision to buy the right stock is when the actual price of the stock intersects with the lower band because the stock price is increasing, and the decision to sell the right stock is when the actual price of the stock intersects with the upper band because the stock price is decreasing.
More detailed investigations are required to obtain better application results; employing various combinations may boost profit and minimize loss.Using more stock data may also help to improve the application's accuracy.Further development is needed by testing using technical indicators other than the indicators used in this study.In addition, future research is expected to test different index stocks with a short observation period or continue to use banking sub-sector stocks but with a longer observation period.Practically, for investors, in using technical analysis to make an investment decision, you should not only use one indicator, but also use a combination of indicators with other methods such as machine learning so that they can be compared so that good predictive results and the right investment decisions can be obtained.

Bollinger
Bands can be a very effective technical tool for stock market traders.Bollinger Bands provide insight into probable price reversals, overbought or oversold circumstances, and market volatility by combining a moving average with a measure of price volatility.Keep in mind that no single indicator can guarantee profitable trading outcomes.Before making an investing decision, traders should always take care and conduct extensive research.(Fadhillah & Baining, 2017) demonstrated that Bollinger Bands are more suitable for viewing signals and generating higher profits.Though, this study contradicts the findings of a study conducted by(Roy & Hermuningsih, 2016), which found that using Bollinger Bands was less accurate than using the Relative Strength Index.The study's (Roy & Hermuningsih, 2016) explanation that the RSI indicator is more accurate is also supported by research findings by(Sarwo & Richard, 2012) that indicate that the accuracy of the RSI indicator is clearer.
) C. Bollinger Bands Bollinger Bands are a common technical analysis tool that stock traders use to measure price volatility and detect potential buy or sell signals.Bollinger Bands, discovered by John Bollinger in the early 1980s, provide insights into market conditions by of a moving average and a volatility measure in a single indicator.Bollinger bands are calculated at a distance of two standard deviations from the SMA.The standard deviation is a measure of how spread out the data is and how far it deviates from the mean (J.Bollinger, 2002): Bollinger Bands are made up of three lines: 1. Middle Band (MA): This is the closing price simple moving average (SMA) for a given time period.A 20-period SMA is a popular choice.2. Upper Band (UB): This is the sum of the 20-period SMA and twice the 20-period standard deviation ( ) of the closing prices.3. Lower Band (LB): This is the 20-period SMA minus two times the 20-period of the closing prices.
Bollinger, 2002): 1.A simple moving average is used.The SMA is computed by adding a number of closing prices and dividing the total by the period of interest.A 20-day SMA, for example, sums the closing prices of the previous 20 trading days and divides the total by 20. 2. Deviation from the mean.The standard deviation measures how far prices deviate from the mean.It quantifies the price series' volatility.The standard deviation is often computed over the same time period as the SMA. 3. Bands at the top and bottom.Bollinger Bands are typically created by adding and subtracting a certain number of standard deviations (usually two) from the SMA.This results in an upper and lower band enveloping the price series, establishing a channel that expands and shrinks as volatility rises and falls.Lower Bollinger bands SMA = Simple Moving Average Standard deviation over the last n periods n = Number of days in the smoothing period m = Sum of standard deviations Bollinger Bands are unique in that they include a moving average as well as standard deviations.Bollinger Bands reflect both the trend (by the moving average) and volatility (via the standard deviations) by integrating these two variables.As a result, they are especially valuable for identifying times of high or low volatility as well as prospective price reversals (Day, Ni, Yu, & Huang, 2020).ISSN: 2581-8341 Volume 06 Issue 11 November 2023 DOI: 10.47191/ijcsrr/V6-i11-20, Impact Factor: 6.789 IJCSRR @ 2023 7161 * Corresponding Author: Muhammad Beyazid Yeldrim Alhaziva Volume 06 Issue 11 November 2023 Available at: www.ijcsrr.orgPage No. 7158-7168 E. Using Bollinger Bands In A Trading Strategy

Figure 1 . 2022 ISSN
Figure 1.Comparison of Daily Data on BBRI.JK, BBCA.JK, BMRI.JK Stock Prices For The Period January 3, 2022 -December 30, 2022 Of Upper Bollinger BandsAs the first data point, the 20-day moving average computes the average closing price over the first 20 days.The next data point drops the earliest price, adds the price on 21st day and takes the average, and so on.By using daily data of BBRI.JK, BBCA.JK, and BMRI.JK stock prices for the period January 3, 2022 to December 30, 2022, the results of the upper Bollinger bands can be found using the following equation: By taking the daily data of BBRI.JK stock price as an example sample, here is a manual calculation of the upper Bollinger bands.

Figure 2 .
Figure 2. Overview Of The Calculation Results Of Bollinger Bands BBRI.JK

Figure 3 .Figure 3
Figure 3. Overview Of The Calculation Results Of Bollinger Bands BBCA.JK

Figure 4 .
Figure 4. Overview Of The Calculation Results Of Bollinger Bands BMRI.JK

TABLE 1 .
Descriptive Daily Data of BBRI.JK Stock Price

TABLE 2 .
Descriptive Daily Data of BBCA.JK Stock Price

TABLE 3 .
Descriptive Daily Data of BMRI.JK Stock Price Bollinger bands are a technical analysis tool that can be used to produce oversold or overbought indications.This method is intended to identify buy and sell signals by determining whether an asset is oversold or overbought.The first stage in constructing Bollinger bands is to compute a moving average on the data, which is typically a 20-day moving average.

TABLE 4 .
Calculation results of upper & lower Bollinger bands BBRI.JK

TABLE 5 .
Calculation results of upper & lower Bollinger bands BBCA.JK

TABLE 6 .
Calculation results of upper & lower Bollinger bands BMRI.JK

Table 4 ,
Table 5and Table6show the upper and lower Bollinger band values of the daily stock price data of BBRI.JK, BBCA.JK and BMRI.JK for the period January 3, 2022 to December 30, 2022, the calculation is done using Excel software.Visualization of Bollinger band daily stock price data BBRI.JK, BBCA.JK and BMRI.JK can be seen in Figures2, 3