- 精华
- 0
- 在线时间
- 923 小时
- UID
- 397
- 积分
- 4818
- 帖子
- 87
- 阅读权限
- 80
- 注册时间
- 2007-9-22
- 最后登录
- 2021-6-8
- 精华
- 0
- UID
- 397
- 积分
- 4818
- 帖子
- 87
- 主题
- 13
- 阅读权限
- 80
- 注册时间
- 2007-9-22
- 最后登录
- 2021-6-8
|
原帖由 bigbear2046 于 2008-9-18 01:34 发表
文字表述呢?
这样一股脑上来代码 却不写思路 不易理解
这里有一段解说
THE DYNAMIC BREAK OUT II STRATEGY
George Pruitt for Futures Magazine designed the original Dynamic Break Out
system in 1996. This version has done well since it was released for public consumption
in 1996. This version will be included in Appendix B. The newer
version of the Dynamic Break Out is just like the original, except we have
incorporated an additional adaptive filter.
The key to the Dynamic Break Out II system is its ability to adapt its
parameters to current market conditions. This system is based on the triedand-
tested Donchian channel system. Remember how the Donchian system
works; buy when the high of the day penetrates the highest high price of x bars
back, and sell when the low of the day penetrates the lowest low of x bars back.
If you optimize the number of bars to determine your best entry and exit levels,
you will discover that different markets work better with different parameters.
You will also discover that a particular market goes through different
cycles and works better with different parameters through time. For example,
the Japanese Yen may have performed better with a look back of 40 days in the
1980s, but now works better with a look back of 20 days. That is the major
problem with using a static parameter for all markets. The Dynamic Break Out
II system allows the number of look back days to change with the current market.
Instead of using a static parameter, this system changes the parameters
based on an aspect of the current market.
Before you can use an adaptive parameter, you must come up with a function
or adaptive engine that automatically changes the value of the once static
parameter. The input of this adaptive engine should be some form of market
statistic. In the case of the Dynamic Break Out II, we used market volatility.
When market volatility expands, so does the number of look back days in
our break out calculation. Increased market volatility usually equates to market
indecisiveness. By increasing the number of look back days when market
volatility increases, we make it more difficult for the system to initiate a trade.
When market volatility decreases, we reduce the number of look back days.
Low market volatility equates to a trending market. By decreasing the number
of look back days, we encourage the system to initiate a trade. This helps the
Dynamic Break Out II to lock into long-term profits and be on the look out
for a change in the long-term trend. We used market volatility to fuel our
adaptive engine, but you could use any market characteristic. We can visualize
an engine that uses a market’s overbought/oversold state. If we had a long
position in a market, and it became overbought, we could use an overbought/
oversold indicator to adapt the parameter that determines the sell point.
Once an adaptive engine is dreamed up and it is pumping out values, you
must maintain the values in an acceptable range. The Dynamic Break Out II
system will not let the look back days go above 60 or below 20. Through optimization,
we discovered that look back lengths that fell beyond these bound-
aries did not generate acceptable expectations. An adaptive engine that generates
useless values is useless in itself.
The Dynamic Break Out II initially looks back 20 days to determine its
buy and sell levels. So when you start trading this system, your first buy point
is the highest high of the past 20 days and your sell point is the lowest low of
the past 20 days. At the end of each day, you measure the current market
volatility by calculating the standard deviation of the past 30 day’s closing
prices. Market volatility can be measured using different calculations: average
range, average true range, standard deviation of change in closing prices, and
others. Once we determine today’s market volatility, we compare it with yesterday’s.
If the volatility increases, then the number of look back days also
increases. We change the number of look back days to the exact amount of the
change in market volatility; if volatility increases by ten percent, then so does
the number of look back days and vice versa.
The original Dynamic Break Out made its buying and selling decisions
solely based on the highest high and lowest low values that were generated by
our volatility-based adaptive engine. Once a position was initiated, a simple,
yet effective, $1500 money management stop was put into place. The newer
version uses the same entry technique in concert with an adaptive Bollinger
Band. The length of the Bollinger Band calculation is the same number of look
back days that is generated by the adaptive engine. The close of yesterday must
be above the upper band and today’s high must be greater than or equal to the
highest high of x bars back before a long position can be initiated (x bars back
is equal to our adaptive look back days value). Yesterday’s close must be below
the lower band and today’s low must be less than or equal to the lowest low of
x bars back before a short position can be taken. Instead of the simple money
management stop, we incorporated a dynamic trailing stop. As we have discussed,
the number of look back days changes on a daily basis. The adaptive
engine decides the amount of change. The liquidation point of an existing
trade is determined by calculating a simple moving average of closing prices for
the past look back days. The sell liquidation would be just the opposite of the
buy liquidation. |
|