Introducing the Fibonacci Retracement Channel
Transcription
Introducing the Fibonacci Retracement Channel
Issue 45 Wednesday, December 12, 2012 Introducing the Fibonacci Retracement Channel Indicator Frederic Palmliden, CMT Senior Quantitative Analyst [email protected] Features Focus: Technical Available Studies/Files: Workspace Markets: Equities, Futures, Forex Time Perspective: Short-term, Intermediate-term, Long-term Indicators Download Files Summary Anyone studying price charts will notice that price action often occurs within channels, and these channels often persist for extended periods. Although the judgment of the chartist is usually involved in finding these channels, they may also be detected systematically using linear regression techniques. Fibonacci retracement levels within the channel often act as support and resistance, while breaking a wellestablished channel may reveal a change in trend. This paper will introduce the Fibonacci Retracement Channel indicator and present several applications and analyses using this indicator. Figure 1: @ES with the TSLabs Fibonacci Retracement Channel Introducing the Fibonacci Retracement Channel Indicator Page 1 of 11 Background Leonardo Pisano Bigollo (c. 1170 – c. 1250), also known as Fibonacci, was an Italian mathematician considered by some “the most talented western mathematician of the Middle Ages.” (1-2) Fibonacci is best known to the modern world for spreading the Hindu–Arabic numeral system in Europe, primarily through the 1202 publication of his Liber Abaci (Book of Calculation) and for the eponymous number sequence which he did not discover but documented in the Liber Abaci. (3-4) In the Fibonacci sequence, each number is the sum of the previous two numbers (i.e., 0, 1, 1, 2, 3, 5, 8, 13…). Also, as the numbers in the sequence get larger, the quotient of a number in the series divided by the next number in the series approaches the golden ratio (0.618). Fibonacci sequences appear in nature all around us (see figures 2-3 below) and numerous technical analysis drawing tools utilize the Fibonacci ratios. Figure 2: Yellow Chamomile Head Showing the Arrangement in 21 (Blue) and 13 (Aqua) Spirals (5) Figure 3: Fibonacci Spiral (6-7) The Fibonacci retracement channel is a variation of the common Fibonacci retracement lines. The channel draws lines diagonally rather than horizontally. The diagonal retracement lines are based on the Fibonacci retracement ratios (23.60%, 38.20%, 50.00%, 61.80%, and 76.40%) from the lowest to highest diagonal for a given look-back period. Traditionally, the channel is created manually by a chartist by connecting two significant bottoms or two significant tops and then drawing parallels. The most common application of the channel is to consider the lines as support or resistance. The Fibonacci retracement channel can be used on any time frame, from a short-term to a long-term perspective. TSLabs Fibonacci Retracement Channel Indicator Description The custom indicator first draws a linear regression line for a specified look-back period. The linear regression line is found using the “least squares method” or “best fit,” which attempts to fit a straight line between a given set of data in such a way that the distance between each data point and the line is minimized. All the additional lines used for the Fibonacci Retracement Channel indicator are parallel to the linear regression line. The channel boundaries are the parallels that intercept the high and low of the look-back period. The Fibonacci retracement lines use the boundaries as the starting and ending points to draw lines at the common Fibonacci retracement ratios. The middle line within the channel is always the 50% Fibonacci retracement line, which may not necessarily correspond to the linear regression line since one side of the distribution may be extended. For example, if the lows are closer to the linear regression line than the highs, then the linear regression line will be slightly lower than the 50% Fibonacci retracement line. Multiple display options are available for the TSLabs Fibonacci Retracement Channel indicator. The inputs for the custom indicator are described in table 1 below. Introducing the Fibonacci Retracement Channel Indicator Page 2 of 11 Table 1: TSLabs Fibonacci Retracement Channel Inputs Input Default Price (Open + High + Low + Close) / 4 Length 30 Description Price used for the linear regression calculation. Length used for the linear regression calculation. EndDate 0 {0 or YYMMDD} End date for the linear regression calculation. Use 0 for current date, or specify end date in YYMMDD format (e.g., 121212 for December 12, 2012). EndTime 0 {0 or HHMM} End time for the linear regression calculation. Use 0 for current time, or specify end time in HHMM military format (e.g., 1715 for 5:15 p.m.). LRColor Blue Color used for the linear regression line. FibColor Red Color used for the Fibonacci retracement lines. AllFibs True Switch (True/False) used to display all Fibonacci retracement lines. ExtRight True Switch (True/False) used to extend the indicator lines. Notice that the Fibonacci retracement channel can be drawn as of a particular day and time in the past, or as of the current day and time. If the current day and time are selected, the indicator will have a rolling approach using the Length input as a rolling look-back period. Also, the ExtRight input may be used to project future potential areas of support and resistance. Multiple instances of the custom indicator may be inserted into a TradeStation chart in order to capture different portions of the price action. Notice in figure 1 above that two instances of the indicator were inserted in the chart. TSLabs Fibonacci Retracement Channel Analysis The most direct application of the custom indicator is to use it as a systematic drawing tool for analysis and trading. The systematic approach is one of the main benefits of the indicator, as opposed to relying on discretionary efforts that may not be consistent over time. Another advantage is that the linear regression approach may identify a channel sooner and without requiring connecting two tops or two bottoms. Retests of the channel boundaries then act more as confirmation for a given channel, and a break can provide an early warning of an imminent change in the current trend. Introducing the Fibonacci Retracement Channel Indicator Page 3 of 11 Figure 4: EURUSD with the Fibonacci Retracement Channel Indicator In figure 4 above, two instances of the custom indicator are applied to the EURUSD forex pair using a weekly bar interval and about 10 years of data. The first instance of the indicator is drawn as of September 26, 2008 (EndDate input = 080926), with 360 bars as the look-back (Length input = 360). The second instance is drawn as of the writing of this paper, October 12, 2012 (EndDate input = 121012), with 210 bars as the look-back (Length input = 210). The second instance is drawn in such a way as to capture the data past the point where the first channel was broken. Tests of the channel boundaries and Fibonacci retracement lines are marked in figure 4 using yellow and cyan dots (note: not all inclusive). Overall, notice how well the two channels captured the different reaction lows and highs. Of course, the lines are not “bullet proof.” At times, the price action retreats immediately after testing one of the lines, while at other times it may breach a level momentarily before retreating or go through a line as if it was not even there. There is no way to know for sure that a specific line will hold; however, they may present interesting trading opportunities since they offer clear exits at points such as a break of a line being tested. Also, a principal benefit of the indicator may be to help a trader spot a break of a well-established channel, which happened in the previous example in late 2008. The break of the lower boundary from the first channel led to a move to the downside and the start of a new down-trending channel that has lasted multiple years and persists at the time of this writing. The next example (see figure 5 below) illustrates that the indicator can be useful not only from a long-term perspective as in figure 4 above with a weekly bar interval, but also when used in an intraday chart as well. Similar observations can be made here (copper, 10-minute bar interval) as in the previous example. Notice again how well the channel captures the different reaction lows and highs. Introducing the Fibonacci Retracement Channel Indicator Page 4 of 11 Figure 5: @HG Continuous Copper Contract with the Fibonacci Retracement Channel Indicator Of course, the examples so far enjoy the benefit of hindsight; applying the indicator in real time can be challenging. The following applications will employ the indicator differently. A modified version of the indicator will be used to create a simple strategy in which trading signals are based only on the data available up until that point. TSLabs FRC Modified Indicator Description and Analysis The modified version of the TSLabs Fibonacci Retracement Channel indicator is very similar to the original version with two main adjustments: 1) The indicator uses a rolling approach to draw the lines for the channel using a fixed look-back length and the previous values for the different lines are not adjusted. Therefore, the channel now takes the form of bands around the price action versus straight lines (see figure 6 below). 2) The current bar’s high and low prices are not included in the calculations for the upper and lower boundaries of the channel. Therefore, at times, the price action may breach the channel temporarily (see blue highlighted areas in figure 6 below). The original version’s channel boundaries always intercepted the high and low for the look-back period. The inputs for the indicator are listed in table 2 below. Notice that they are quite similar to the inputs previously described for the original indicator. The date and time inputs were removed since this indicator is applied throughout the chart and not merely on a specified time period. Moreover, all Fibonacci lines are automatically being displayed and no line can be extended to the right as with the original indicator. Observations similar to the previous examples can be made with the modified indicator. For instance, the Fibonacci retracement lines act as support and resistance. Moreover, a breach of the channel can indicate a change in the prevailing trend as illustrated in figure 6. Introducing the Fibonacci Retracement Channel Indicator Page 5 of 11 Figure 6: @GC Daily Continuous Gold Contract with the TSLabs FRC Modified Indicator Table 2 – TSLabs FRC Modified Indicator Inputs Input Default Price (Open + High + Low + Close) / 4 Length 20 Description Price used for the linear regression calculation. Length used for the linear regression calculation. FibColor Red Color used for the Fibonacci retracement lines. MidFibColor Black Color used for the 50% Fibonacci retracement line. Notice in the table above that the 50% Fibonacci retracement line is highlighted by having its own assigned color. The reason behind this is that the line is the center of the rolling channel and will become instrumental in the strategy discussed below. The main advantage of the TSLabs FRC Modified indicator is that the different concepts behind the original version of the indicator can now be tested historically by turning the indicator into a strategy. TSLabs FRC NQ Strategy Description and Analysis Please keep in mind that the strategy discussed in this paper is not meant to be a tradable strategy. Instead, it is presented for educational and demonstration purposes, and could possibly serve as a starting point for an actual tradable strategy after additional research and analysis. The FRC NQ Strategy was built directly upon the modified indicator discussed previously. The strategy was also designed specifically for the E-mini Nasdaq-100 futures using the continuous contract (@NQ). The rules for the strategy are straightforward and are listed below: 1) Buy 1 contract if the closing price crosses under the 38.2% Fibonacci retracement line and the momentum of the 50% Fibonacci retracement line exceeds 2. 2) Sell short 1 contract if the closing price crosses under the 50% Fibonacci retracement line and the momentum of the 50% Fibonacci retracement line is less than -2. Introducing the Fibonacci Retracement Channel Indicator Page 6 of 11 3) Have a profit target of $200.00 per position (1 contract). 4) Have a stop loss of $700.00 per position (1 contract). By default, the value used for the linear regression calculations is the average of the open, high, low and close prices. However, this default setting can be changed using the strategy inputs tab. The default lookback length for the linear regression calculations (20), the default look-back length for the momentum calculation (7), the default profit target (200) and the default stop loss (700) can all be adjusted in the strategy inputs tab as well. The described rules and settings were chosen specifically for the E-mini Nasdaq-100 futures in order to capture both trend-following and temporary mean-reversion tendencies. Some of these settings were obtained by running optimization studies. A trend-following tendency was found when the price crosses the 50% retracement line to the downside while the price channel is sloping downward. At the same time, a temporary mean-reversion tendency was discovered when the price crosses the 38.2% retracement line to the downside while the price channel is sloping upward. The various rules and settings would need to be adjusted if this strategy were to be applied to a different market. Back-testing Settings: Initial Capital: Trade Size: Commissions: Slippage: History: Bar interval: $5,000.00 1 contract $2.36 per trade $0.00 per trade 10 years daily Different portions of interest from the Strategy Performance Report for the TSLabs FRC Strategy are shown below in figures 7-9. Introducing the Fibonacci Retracement Channel Indicator Page 7 of 11 Figure 7: TradeStation Performance Summary for the TSLabs FRC Strategy Introducing the Fibonacci Retracement Channel Indicator Page 8 of 11 Figure 8: Equity Curve Line for the TSLabs FRC Strategy Figure 9: Weekly Equity Curve Underwater for the TSLabs FRC Strategy Introducing the Fibonacci Retracement Channel Indicator Page 9 of 11 Strategy Highlights: • The strategy averaged a 12.91% annualized return on initial capital. • 85.09% of trades were profitable in the last 10 years. • Positions were held only 4.36% of the time in the last 10 years, which helped boost the RINA index value to 1149.98. • The K-Ratio, a risk-adjusted metric that takes into account the consistency of results through time, is quite high at 5.51. • The largest profit and loss as a percentage of gross profit were only 0.57% and 2.94%, respectively. • On a more negative note, the strategy experienced drawdowns exceeding 25%, as illustrated by the weekly equity curve underwater (see figure 9). • Maximum adverse excursion analysis also shows that many profitable trades experienced drawdowns past the halfway point between the entry and the stop loss, which could be hard to endure in real time. Conclusion The concepts presented in this paper offer interesting ideas for both discretionary and strategy trading. Fibonacci retracement lines were unanchored from their traditional horizontal use and were used to draw support and resistance lines within an evolving price channel. The original indicator presented in this paper drew a price channel with straight lines, whereas the modified version draws a price channel that is continuously adjusted. Trading signals can be generated from the interaction of the price action with the calculated levels. Strategy testing revealed that certain trend-following and mean-reversion tendencies appeared consistently for the Nasdaq-100 for the time period analyzed. Ideas similar to the ones presented in this paper can now be explored with other securities. Works Cited 1. “The Fibonacci Series – Biographies – Leonardo Fibonacci (ca. 1175 – ca. 1240).” Library.thinkquest.org. Retrieved 2010-08-02. 2. Howard Eves, “An Introduction to the History of Mathematics. Brooks Cole.”1990: ISBN: 0-03-029558-0 (6th ed.), p 261. 3. Leonardo Pisano - page 3: "Contributions to number theory.” Encyclopedia Britannica Online, 2006. Retrieved 18 September 2006. 4. Parmanand Singh. "Acharya Hemachandra and the (so called) Fibonacci Numbers.” Math. Ed. Siwan , 20(1):28-30, 1986. ISSN 0047-6269 5. http://www.fibonaccisequenceinnature.com/. 6. http://www.world-mysteries.com/sci_17.htm. 7. http://vorpal.us/2006/10/fibonacci-poetry/. Introducing the Fibonacci Retracement Channel Indicator Page 10 of 11 All support, education and training services and materials on the TradeStation website are for informational purposes and to help customers learn more about how to use the power of TradeStation software and services. No type of trading or investment advice is being made, given or in any manner provided by any TradeStation affiliate. This material may also discuss in detail how TradeStation is designed to help you develop, test and implement trading strategies. However, TradeStation does not provide or suggest trading strategies. We offer you unique tools to help you design your own strategies and look at how they could have performed in the past. While we believe this is very valuable information, we caution you that simulated past performance of a trading strategy is no guarantee of its future performance or success. We also do not recommend or solicit the purchase or sale of any particular securities or derivative products. Any symbols referenced are used only for the purposes of the demonstration, as an example—not a recommendation. Finally, this material may discuss automated electronic order placement and execution. Please note that even though TradeStation has been designed to automate your trading strategies and deliver timely order placement, routing and execution, these things, as well as access to the system itself, may at times be delayed or even fail due to market volatility, quote delays, system and software errors, Internet traffic, outages and other factors. All proprietary technology in TradeStation is owned by our affiliate TradeStation Technologies, Inc. Equities, equities options, and commodity futures products and services are offered by TradeStation Securities, Inc., a member of NYSE, FINRA, NFA and SIPC. Forex products and services are offered by TradeStation Forex, Inc., a member of NFA. ©2012 TradeStation. All rights reserved. Introducing the Fibonacci Retracement Channel Indicator Page 11 of 11