The Bollinger Bandit Trading Strategy


SUBMITTED BY: evensteven

DATE: Feb. 21, 2022, 9:39 a.m.

FORMAT: Text only

SIZE: 8.2 kB

HITS: 374

  1. THE BOLLINGER BANDIT TRADING STRATEGY
  2. Standard deviation is a number that indicates how much on average each of the
  3. values in the distribution deviates from the mean (or center) of the distribution.
  4. Bollinger Bands, created by John Bollinger in the 1960s, is an indicator that uses
  5. this statistical measure to determine support and resistance levels. This indica-
  6. tor consists of three lines and is very simple to derive; the middle line is a sim-
  7. ple moving average of the underlying price data and the two outside bands are
  8. equal to the moving average plus or minus one standard deviation. Based on
  9. theory, two standard deviations equates to a 95 percent confidence level. In
  10. other words, 95 percent of the time the values used in our sampling fell within
  11. two standard deviations of the average. Initially, Bollinger Bands were used to
  12. determine the boundaries of market movements. If a market moved to the
  13. upper band or lower band, then there was a good chance that the market would
  14. move back to its average. We have carried out numerous tests on this hypothe-
  15. sis and seemed to always come back with failure. Instead of using the upper
  16. band as a resistance point, we discovered, as others have, that it worked much
  17. better as a breakout indicator. The same goes for the lower band. The Bollinger
  18. Bandit uses one standard deviation above the 50-day moving average as a poten-
  19. tial long entry and one standard deviation below the 50-day moving average as
  20. a potential short entry. This system is a first cousin of King Keltner. They are
  21. similar in that they are longer-term channel breakout systems. However, this is
  22. where the similarities end. Instead of simply liquidating a position when the
  23. market moved back to the moving average, we concocted a little twist to this exit
  24. technique. From observing the trades on the King Keltner, we discovered that
  25. we gave back a good portion of the larger profits waiting to exit the market at
  26. the moving average. So, for the Bollinger Bandit, we incorporated a more
  27. aggressive trailing stop mechanism. When a position is initiated, the protec-
  28. tive stop is set at the 50-day moving average. Every day that we are in a position,
  29. we decrement the number of days for our moving average calculation by one.
  30. The longer that we are in a trade, the easier it is to exit the market with a profit.
  31. We keep decrementing the number of days in our moving average calculation
  32. until we reach ten. From that point on, we do not decrement. There is one
  33. more element to our exit technique: the moving average must be below the
  34. upper band if we are long and above the lower band if we are short. We added
  35. this element to prevent the system from going back into the same trade that we
  36. just liquidated. If we hadn’t used this additional condition and we were long and
  37. the moving average was above the upper band, the long entry criteria would still
  38. be set up and a long trade would be initiated.
  39. Previously, we stated that the upper band and lower band were potential
  40. buy/sell entries. Potential is the key word. One more test must be passed
  41. before we initiate a position; the close of today must be greater than the close
  42. of 30 days ago for a long position and the close of today must be less than the close of 30 days ago for a short position. This additional requirement is a trend
  43. filter. We only want to go long in an uptrend and short in a downtrend.
  44. The Bollinger Bandit requires four tools: (1) Bollinger Bands, (2) a mov-
  45. ing average of closing prices, (3) a rate of change calculation, and (4) a counter.
  46. This system is longer term in nature, so we will use 50 days in our calculations.
  47. Bollinger Bandit Pseudocode
  48. LiqDay is initially set to 50
  49. upBand = Average(Close,50) + StdDev(Close,50) *1.25
  50. dnBand = Average(Close,50) - StdDev(Close,50) *1.25
  51. rocCalc = Close of today - Close of thirty days ago
  52. Set liqLength to 50
  53. If rocCalc is positive, a long position will be initiated when
  54. today's market action >= upBand
  55. If rocCalc is negative, a short position will be initiated when
  56. today's market action <= dnBand
  57. liqPoint = Average(Close, 50)
  58. If liqPoint is above the upBand, we will liquidate a long position if
  59. today's market action <= liqPoint
  60. If liqPoint is below the dnBand, we will liquidate a short position
  61. if today's market action >= liqPoint
  62. If we are not stopped out today, then liqLength = liqLength - 1
  63. If we are stopped out today, then reset liqLength to fifty
  64. Bollinger Bandit Program
  65. {Bollinger Bandit by George Pruitt—program uses Bollinger Bands and Rate of
  66. change to determine entry points. A trailing stop that is proportional with
  67. the amount of time a trade is on is used as the exit technique.}
  68. Inputs: bollingerLengths(50),liqLength(50),rocCalcLength(30);
  69. Vars: upBand(0),dnBand(0),liqDays(50),rocCalc(0);
  70. upBand = BollingerBand(Close,bollingerLengths,1.25);
  71. dnBand = BollingerBand(Close,bollingerLengths,-1.25);
  72. rocCalc = Close - Close[rocCalcLength-1]; {remember to subtract 1}
  73. if(MarketPosition <> 1 and rocCalc > 0) then Buy("BanditBuy")tomorrow upBand
  74. stop;
  75. if(MarketPosition <>-1 and rocCalc < 0) then SellShort("BanditSell") tomorrow
  76. dnBand stop;
  77. if(MarketPosition = 0) then liqDays = liqLength;
  78. if(MarketPosition <> 0) then
  79. begin
  80. liqDays = liqDays - 1;
  81. liqDays = MaxList(liqDays,10);end;
  82. if(MarketPosition = 1 and Average(Close,liqDays) < upBand) then
  83. Sell("Long Liq") tomorrow Average(Close,liqDays) stop;
  84. if(MarketPosition = -1 and Average(Close,liqDays) > dnBand) then
  85. BuyToCover("Short Liq") tomorrow Average(Close,liqDays) stop;
  86. The Bollinger Bandit program demonstrates how to:
  87. • Invoke the Bollinger Band function. This function call is less than intu-
  88. itive and must be passed three parameters: (1) price series, (2) number
  89. of elements in the sample used in the calculation for the standard devi-
  90. ation, and (3) number of deviations above/below moving average. You
  91. must use a negative sign in the last parameter to get the band to fall
  92. under the moving average.
  93. • Invoke the MaxList function. This function returns the largest value in
  94. a list.
  95. • Do a simple rate of change calculation.
  96. • Create and manage a counter variable, liqLength.
  97. Bollinger Bandit trading performance is summarized in Table 6.2.
  98. Trading Strategies That Work 117
  99. Table 6.2
  100. Bollinger Bandit Performance
  101. System Name: Bollinger Bandit Commission/Slippage = $75
  102. Tested 1982 – 3/19/2002
  103. Total Net Max. # of Max. Cons.
  104. Markets Profit DrawDown Trades % Wins Losers
  105. British Pound $ 38,750.00 $ (43,612.50) 194 33.51% 20
  106. Crude Oil $ 47,242.50 $ (17,522.50) 170 41.76% 8
  107. Corn $ (5,112.50) $ (12,937.50) 213 29.58% 13
  108. Copper $ 2,300.00 $ (9,587.50) 138 36.23% 12
  109. Cotton $ 26,695.00 $ (12,437.50) 220 32.73% 8
  110. Deutsch Mark $ 51,075.00 $ (13,812.50) 186 41.40% 6
  111. Euro Currency $ 8,737.50 $ (9,012.50) 29 44.83% 7
  112. Euro Dollar $ 31,927.50 $ (6,622.50) 196 35.71% 19
  113. Heating Oil $ 16,883.14 $ (18,378.89) 201 38.81% 10
  114. Japanese Yen $ 121,937.50 $ (21,462.50) 180 37.22% 8
  115. Live Cattle $ (16,867.50) $ (25,411.50) 224 26.79% 18
  116. Natural Gas $ 85,897.50 $ (21,737.50) 113 44.25% 6
  117. Soybeans $ (15,925.00) $ (40,862.50) 215 31.16% 15
  118. Swiss Franc $ 76,312.50 $ (9,987.50) 188 40.96% 5
  119. Treasury Note $ 39,625.00 $ (11,487.50) 202 38.12% 9
  120. U.S. Bonds $ 48,381.25 $ (15,343.75) 204 36.27% 6
  121. Wheat $ (20,037.50) $ (21,931.25) 219 29.68% 11
  122. Total $ 537,821.89 3092 Overall trading performance was positive. You can see the similarities between
  123. the Bollinger and Keltner-based systems. The same markets that made good
  124. money in one system made good money in the other. These systems would not
  125. work well together due to their high level of correlation. This system did
  126. exceptionally well in the Japanese Yen and Natural Gas. Through further
  127. investigation, we discovered that our trailing stop mechanism only marginally
  128. increased profit and decreased draw down. Nonetheless, the concept probably
  129. adds a higher comfort level when a trade is initiated. We know that our risk
  130. should diminish the farther we get into a trade. This is due to the fact that a
  131. shorter-term moving average follows closer to the actual market than a longer-
  132. term average.

comments powered by Disqus