能量转化的例子:四周规则----最著名也最成功的技术

来源:百度文库 编辑:九乡新闻网 时间:2024/07/14 21:12:02

四周规则----最著名也最成功的技术

  在我们设计跟踪趋势系统的时候,除了移动平均线外,也有别的选择。其中最著名也最成功的技术之一,称为周价格管道,或简称周规则。本方法也具有移动平均线的许多优点,而且省了不少麻烦,使用起来也简便一些。
  在过去十年中,随着计算机技术的进步,关于在期货市场建立技术性交易系统的问题,人们进行了大量的研究。这些系统在本质上是自动化的,消除了人类情感和主观判断的影响。另一方面,它们也越来越臻于复杂。起初用的是简单的移动平均法,后来,又加入了双移动平均线交叉、三移动平均线交叉的内容,再后来,又把移动平均值线性加权、指数加权。最近,人们又引入了高级的统计学系统,例如线性回归系统。上述系统的首要目的依然是追随趋势,即首先识别趋势.然后顺着既有趋势的方向交易。
  不过,随着越来越复杂、越来越富于想象力的系统和指标的出现,也有些不妥的倾向。人们往往忽视了那些简单、基本的工具,而它们的效果相当好,经受住了时间的考验。下面我们就来说说其中一种最简便的方法——周规则。
  1970年,邓恩和哈吉特公司的金融服务部门推出了一本《交易商手册》。其中对当时最流行的自动交易系统进行了模拟测试和比较研究。该项研究的最后结果表明,在所有的测试对象中,“四周规则”系统最为成功。这种系统是由理查德?唐迁创立的。唐迁先生目前在希尔森?莱曼?运通公司工作,担任其高级副总裁兼金融顾问。他被推祟为商品期货自动交易系统领域的先驱(在1983年,《投资帐户管理报道》推举唐迁为首届“最佳获利奖”得主,表彰他对商品市场资金运作领域的巨大贡献。该机构目前向后来的受奖人颁发“唐迁奖”)。
  四周规则
  根据四周规则建立的系统很简单:
  1、只要价洛涨过前四个日历周内的最高价,则平回空头头寸,开立多头头寸。
  2、只要价格跌过前四个周内(照日历算满)的最低价,则平回多头头寸,建立空头头寸。
  如上所述,本系统属于连续工作性质(连续在市),即系统始终持有头寸,或者是多头,或者是空头。一般地,连续在市系统具有一个基本的缺陷。当市场进入了无趋势状态时,它仍处在市场中,难免出现“拉锯现象”。我们曾经强调过在市场处于这种无趋势的横向状态时,趋势顺应系统效果很差。
  我们也可以对四周规则进行修正,使之不连续在市。办法是采用较短的时间跨度,比如一周或二周,作为平仓的信号。换言之,必须出现了“四周突破”,我们才能建立头寸,但是只要朝相反方向的一周或二周的信号出现,就平回该头寸。之后,交易商将居于市场外,直到下一个四周突破信号出现再入市。
  本系统坚实地建立在技术分析原理之上。信号自动给出,并且清晰、分明。因为它是顺应趋势的,所以实际上能够保证,每当市场出现重大趋势时,用户总站在正确的一边。同时,它的结构也体现了商品交易一句老生常谈的格言——“让利润充分增长,把损失控制在小额”。本系统还有一个特点,由之引生的交易往往不太频繁,所以其佣金成本较低。这一点,正是很多资金管理者所重视的。因而这种系统(或其变体)很流行。不过,经纪商们的态度当然就两样了。最后一点,既可以应用计算机来实施本系统,也可以不用。
  周规则也有自己的反面意见。同所有趋势顺应系统所遭受的指责一样,反对者怪它不能捕捉顶或底。那么,趋势顺应系统到底做了些什么呢?最重要的一点是,四周规则的表现同绝大多数趋势顺应系统一样漂亮,甚至超过其中许多种方法;同时,它还有个长处:惊人地简明。

以周期理论为主要工具的分析者认为,市场运动的最终线索就在其运行周期上。不可否认,时间周期的研究成果,为我们的测市手段增加了时间维度。作为理论,经过不断丰富和发展之后,变得繁复而深奥是可以理解的;作为手段,其存在和发展必定有其特殊理由,但任何一种技术都会因其自身利弊、得失而无法概全。在这里,笔者力求以简练的语言和朋友们交流其核心内容的应用心得。

  通常,周期分析者认为,波谷比波峰可靠,所以周期长度的度量都是从波谷到波谷进行的,原因大概是绝大多数周期的变异出现在波峰上,也就是说波峰的形成比较复杂,因而认为波谷更可靠些。从实际应用结果来看,在牛市中周期分析远比在熊市中表现优异。原因何在,笔者认为,这与周期理论研究倾向于关注底部有关。同时笔者发现,在牛市中,波谷比波峰形成或驻留的时间相对较短,而波峰因常出现强势整理的态势,变得复杂起来,所以较难把握。在熊市中则相反,因为市态较弱,市场常以整理形态取代反弹,所以波峰比波谷形成时间要短,易于发现。在运用周期理论测市的时候,牛市中以波谷法度量较为准确,熊市中以波峰法度量胜算更高些。笔者之所以倾向于度量构筑时间较短的形态,是因为这样的形态比较容易判别,预测时间目标与实际发生时间的偏差较小。有兴趣的朋友不妨一试。

  在决定使用峰测法还是谷测法度量的时候,除了使用趋势线来筛选之外,还有一种方法也可以给您很大的帮助,那就是先观察上一层次周期中,波峰是向周期时间中线左移还是右移,即一个涨跌周期如是40天,波峰是向20天之前移还是向20天之后移,左移看跌,右移看涨。看跌时用峰测法,看涨时用谷测法。波峰左移和右移作为辅助工具之一,适用于任何趋势和长度的周期。周期理论中四个重要的基本原理:叠加原理、谐波原理、同步原理、比例原理,以及两个通则原理:变通原理、基准原理,本文中不再赘述了。

  关于时间周期,则不能不提神奇的菲波纳契数列1、1、2、3、5、 8、12、21、34、55、89、144……,这组数字之间的关系,有书籍专论,本文不详细述及。由于它是波浪理论的基础,波浪理论与周期理论也颇有渊源,在运用周期理论测市的时候,不论是从重要的市场顶部只是底部起向未来数算,得出菲波纳契时间目标,这些日子都可能意味着成为市场重要的转折点。在这些时间窗口,如何取得交易信号,还需辅以其他技术手段以验证。对于神奇数字,笔者从江恩理论及其小说中体会到一种默契,江恩将“7”及其倍数的周期视作重要的转折点。笔者发现,如果这个数字是菲波纳契数×7,那这个数字更神奇。我们如何理解“7”这个数字呢,在江恩眼里,上帝用7天创造了世界,因此“7”是一个完整的数字;在圣经中,人类最大的敌人-死亡的恐俱也是可以克服的,耶酥在死后的第3天站起来,第7天复活,这意昧着7天是一个周期,“3”是菲波纳契数字,就是“4”也相当不平凡。地球自转一周为360度,每4分钟旋转1度,因此,最短的循环可以是4 分钟,地球启转一周需再24小时,也是4的倍数,所以4×7天的周期也是一个很重要的短期周期。而上述一系列数字构成了价格变化的时间窗,一旦市场进入了时间窗,我们还须依靠其他技术工具做过滤器,如摆动指标KDJ、W%、RSI等,过滤伪杂信息来判断转折点的出现,并得出交易信号。

  需要特别指出的是,在运用周期理论、波浪理论菲波纳契数列的时候,要注意它们都是以群体心理为基础的,也就是说市场规模越大,参与的人数越多,就越符合上述理论,比如股指远比个股符合上述理论,况且波浪理论本意也是应用于股市平均指数的。

四周规则系统的文华公式(ZT)

CLOSE>REF(HHV(HIGH,20),1),BPK;
CLOSE


金字塔

 

 


HHN:=ref(HHV(HIGH,20),1);


HLN:=ref(LLV(LOW,20),1);


 


IF H>=HHN then


begin


sellshort(holding<0,0,thisclose);


buy(holding=0,1,thisclose);


end


 


IF L<=HLN then


begin


sell(holding>0,0,thisclose);


buyshort(holding=0,1,thisclose);


end





{在新交易系统中,还可以使用下列函数输出,以便查看当前帐户信息

用户应该根据品种的性质,在图表显示交易中合理设置交易费率}

{资产:ASSET,LINETHICK0;

可用现金:CASH(0),LINETHICK0;

持仓:HOLDING,LINETHICK0;}

 


四周规则公式模型:(简洁高效,N,M可相反设置)

 

CLOSECLOSE>REF(HHV(HIGH,N),1),BK;
CLOSECLOSE>REF(HHV(HIGH,M),1),Bp;



 

英文版《四周规则》及《周规则》!

A technical charting interpretation of the
Donchian's Four Week Rule/Price Channel

By Alex Martin

The Four-week Rule is a basic method that may not seem glamorous in the company of Fibonacci Numbers and Japanese Candlesticks - but it is a profitable method that is still used today.
Despite its obvious shortcomings, as a trend-following system, - it works well in up or down trends, but not sideways trends - the Four-week Rule is a tool that should be in every technical analyst's repertoire. It was developed by Richard Donchian in the early 1970s for commodities and futures, and has been successfully applied to stock analysis.
The question is: How can you make it work for you?
Also known as the "Price Channel" or "Donchian Channels," the Four-week Rule may be a basic tool. But in the right hands, it can be powerful. In other words, the rules may be simple, but applying them is not. It works to the extent of the analyst's abilities.
The rules according to Donchian
The Four-week Rule is a method that includes a set of charting rules that are generated from the price channel as well as a set of trading rules. The mistake that some analysts make is to use the price channels without the trading rules. It is the combination of both sets of rules that make the method effective.
The charting rules
The price channel generates the following signals when applied to stock charts:
        buy signals are produced when the price closes above the upper band of the price channel; and,
        sell signals are generated when the price closes below the lower band of the price channel.

The trading rules
1.        When the price is at its highest in a four week period, buy long and cover short positions.
2.        When the price falls below the lows of a four week period, sell short and liquidate long positions.
3.        This last rule only applies to future traders, which is "to roll forward, if necessary, into the next contract on the last day of the month prior to expiration.

As you can see from Figure 2, trend-following systems react to movements rather than attempting to predict them. The trend breaks before the price closes below the lower band of the price channel.

When interpreting the price channel on charts, buy signals are generated when the price channel has closed above the upper band as shown in Figure 3. The price channel tends to create quite a few signals during the course of the up trend.
For those who use technical stock screeners, use a screen with a rising close condition where the price closes higher than the day before for three days, as well as a price that closes above the upper band. When we include a three-day rising close as well as a price channel breakout, the number of false signals is reduced as can be seen in Figure 4 below.

The stock used in all of the chart illustrations, was found using the following stock screen:
        price-channel buy, where the price penetrates the upper band, as well as the condition that the close for the last three days was higher than the day before it.
(The reverse does not apply during sell conditions, three consecutive days down is not the best pattern to wait for.)
Complimenting the Four-week Rule
So what can you do to increase the effectiveness of the Four-week Rule so that you don't miss opportunities due to the lagging indicators? And equally as important, how can you ensure that you aren't going to lose money in a volatile or sideways-trending market due to false signals?
One way to add certainty to the Four-week Rule is to use complimentary indicators or methods to generate additional signals that provide a warning or confirmation.
For example, you can use another trend-following system, the Five- and 20-day Moving Averages Method, also developed by Donchian, in conjunction with the Four-week Rule, to create combined signals that help you determine if the price has really generated a strong trend. Note: The rules in these two systems do not conflict with one another.
The Five- and 20-day Moving Averages Method
The Five- and 20-day Moving Averages Method includes several general and supplemental rules. These rules where initially intended for currency markets but can also be used to analyze stocks.
The method consists of the following rules:
Basic Rule A: Act on all closes that cross the 20-day moving average by an amount exceeding by one full unit the maximum penetration in the same direction of any previous closing when the closing was on the same side of the moving average.
Basic Rule B: Act on all closes that cross the 20-day moving average and close one full unit beyond the previous 25 closes.
Basic Rule C: Within the first 20 days after the first day of a crossing that leads to a trading signal, reverse on any close that crosses the 20-day moving average and closes one full unit beyond the previous 15 closes.
Basic Rule D: Sensitive five-day moving average rules for closing out positions and for reinstating position in the direction of the 20-day moving average are:
1.        Close out positions when the currency closes below the 5-day moving average for long positions and above the 5-day moving average for short positions, by at least one full unit more than the greater of either the previous penetration on the same side of the 5 day moving average, or the maximum point of any penetration within the preceding 25 trading days. Should the range between the closing price in the opposite direction to the Rule D closeout signal be greater than the prior 15 days than the range from the 20-day moving average in either direction within 60 previous sessions, do not act on Rule D closeout signals unless the penetration of the 5-day moving average exceeds by one unit the maximum range both above and below the 5-day moving average during the preceding 25 sessions.
2.        Reinstate positions in the direction of the basic trend (a) when the condition in paragraph 1 are achieved, (b) If a new Rule A basic trend is given, or (c) if new Rule B and Rule C signals in the direction of the basic trend are given by closing in a new low or new high ground.
3.        Penetrations of two units or less do not count as points to be exceeded by Rule D unless at least two consecutive closes were on the side of the penetration when the point to be exceeded was set up. (Richard Donchian, December 1974 Futures article), as quoted by Cornelius Luca in Technical Analysis Applications in the Global Currency Markets, 1997.

When we look at the charting signals in Figure 5 generated by the 5- and 20-day method, we can see that signals are generated earlier on in the trend than the price channel shown in Figure 6.
To better interpret the signals generated by the 5- and 20-day method, it is advisable to include an MA cross system such as Japanese Crosses.

Combining the 5- and 20- day moving average cross system with the Four-week Rule can help to confirm information about the potential trend change. These modifications are not intended to replace basic trend-following techniques - but to provide more information about the trend when price channel signals are generated.
In summary, getting the Four-week Rule to work for you may be as simple as - following the rules.
1.        Use it right - as a method with a set of trading rules and charting.
2.        Have discipline - buy and sell strictly according to the trading rules.
3.        Compensate for its shortcomings - no system is perfect.


The Weekly Rule

May 21, 2002 | By Shaun Taylor

Here we introduce you to the 'weekly price channel', or 'the weekly rule' for short. The history behind the weekly rule starts in 1970, a handbook entitled "The Trader’s Notebook", published by Dunn and Hargitt’s Financial Services, set out to compare the best trading systems of the day and present the findings to its readers. Richard Donchian, the developer of the 'four-week rule' (4WR) won the honor the best system. Designed to recognize trends in the commodities markets, the weekly rule was quickly adapted by others in the early stages of the development of technical analysis, as we know it today.  

How does this system apply to the stock markets? The 4WR is really no different from the rules surrounding the single-line moving average. It can be used to identify breakout patterns and trend reversals, and it can be used as filters. Critics point out that the weekly rule has the same kind of problem that the parabolic SAR system has when it comes to the inability for the system to be timely on market tops and bottoms. That being a negative aspect, a positive of the system is that it allows the investor to get involved in major trends as they are unfolding, with greater conviction that you are on the right side of the market.

If the technician wishes to make the system somewhat more sensitive to his or her trading technique, then he or she will shorten the time period of the number of trading days. For clarification, the 4WR has 20 trading days inside the system. On the other side of the coin, the investor may want to lengthen the number of trading days to be somewhat more conservative in markets where, for the most part, trends are non-existent, or sideways.

The more popular single-line moving averages are 10, 20 and 40 as well as 25, 50, 100 and 200. Notice that all these measurements can be both divided and multiplied by two. The relationship between the weekly rule and the single-line moving average is similar, in that increasing or decreasing the number of weeks or days creates more or less sensitivity. Start with the 4WR, and then divide or multiply by two. A principle of harmonics now comes into play, which states that each cycle moves in harmony with the other cycles that can be created with two being the multiplier or divisor.


Chart Created with Tradestation

You can see in the 2002 chart of Electronics Arts (ERTS) we are using a 20-day (four-week) price channel. Now, as the daily price action moves away from the lower band toward the higher band, the trend is developing in an upward direction and conversely the downtrend is in place as the price action moves away from the top band. You can also see that the buyer of this issue over 2002 was "whipsawed", back and forth as no real trend developed.

It's your money, invest it wisely. Learn, understand and then execute.
By Shaun Taylor