莎士比亚戏剧作品:Moving?Averages?各种均线计算_

来源:百度文库 编辑:九乡新闻网 时间:2024/04/19 21:04:31
原文地址: http://www.whool.net/archives/13009网上找的一个计算各种均值的公式和一些图。
我对中间的lsma还是很有兴趣的。
Simple, Weighted, Exponential, Wilder, Least Square, Adaptive, Endpoint, Sine-Weighted, Triangular, Modified, Volume Weighted
The Formula . . .
Simple Moving Average
SMA = SUM(PRICE, n) / n
       where  n = Period
Weighted Moving Average
WMA = ( PRICE * n + PRICE(1) * n-1 + … PRICE(n-1) * 1) / ( n * (n + 1) / 2 )
         n = Period
Exponential Moving Average
EMA = EMA.1 + (PRICE – EMA.1 ) * K
or
    EMA = K * PRICE + (1 – K) * EMA.1
    where…
K = 2 / (n + 1)
         n = Period
Zero Lag Exponential Moving Average
("Zero Lag" is an option within the Exponential Moving Average indicator)
EMA = K * ( 2 * PRICE – PRICE.X) + (1 – K) * EMA.1
    where…
K = 2 / (n + 1)
         n = Period
         x = lag = (n – 1) / 2
Wilder Moving Average
WiMA = ( PRICE + (n – 1) * WiMA.1 ) / n
Least Square Moving Average
   LSMA = Endpoint of Regression Line including current bar and previous n – 1 bars
Adaptive Moving Average

irection = Price – price(n)  ; where n = AMA Period
Volatility = Sum(abs(price – price[1], n)
Effeciency Ratio (ER) = Direction / Volatility
Fast Smoothing Constant (FastC) = 2/(p + 1)  ; where p = FSC Period
Slow Smoothing Constant (SlowC) = 2/(q + 1)  ; where q = FSC Period
Scaled Smoothing Constant (SSC) = ER(FastC – SlowC) + SlowC
c = SSC*SSC
AMA = AMA[1] + c(price – AMA[1])
Endpoint Moving Average

Triangular Moving Average
(example of 5 period triangular moving average, more details below)
   TMA = (PRICE + 2 * PRICE.1 + 3 * PRICE.2 + 2 * PRICE.3 + PRICE.4 ) /  9
Sine Weighted Moving Average

Hull Moving Average
HMA = WMA(2*WMA(PRICE, n/2) – WMA(PRICE, n), sqrt(n))
    where…
         n = Period
Smoothed Moving Average
The first value of this smoothed moving average is calculated as the simple moving average (SMA):
SUM.1 = SUM(CLOSE, n)
SMMA.1 = SUM.1 / n
The second and succeeding moving averages are calculated according to this formula:
SMMA = (SUM.1 – SMMA.1+CLOSE) / n
The Presentation . . .


Above are two Daily Candlestick Charts of an QQQ (Nasdaq tracking stock).  The daily bars are replicated 14 times, with a different 20-period moving average overlaying the bars each time.  The moving average type is labeled above the bars/lines.
http://www.whool.net/ @ Crews.He.