Privacy Policy Cookie Policy Terms and Conditions 移動平均 - Wikipedia

移動平均

维基百科,自由的百科全书

Image:03wiki-zn-frontpage-icon.gif移動平均正在翻译。欢迎您积极翻译与修订

移動平均技術分析其中一種分析时间序列數據的工具。最常見的是利用股價、回報或交易量等變數計算出移動平均。

移動平均可撫平短期波動,將長線趨勢或周期顯現出來。數學上,移動平均可視為一種卷积

目录

[编辑] 簡單移動平均

簡單移動平均(SMA)是之前n個數值的未作加權算術平均。例如,收市價的10日簡單移動平均指之前10日收市價的平均數。設收市價為p1pn,則方程式為:

SMA = { p_1 + p_2 + \cdots + p_n \over n }

當計算連續的數值,一個新的數值加入,同時一個舊數值剔出,所以無需每次都重新逐個數值加起來:

SMA_{today} = SMA_{yesterday} - {p_1 \over n} + {p_{n+1} \over n}

在技術分析中,有幾個n的數值較為普遍,如10日、40日、200日,視乎分析時期長短而定。投資者冀從移動平均線的圖表中分辨出支持位或阻力位。

[编辑] 加權移動平均

加權移動平均(WMA)指計算平均時個別數據以不同數值,在技術分析中,n日WMA的最近期一個數值乘以n、次近的乘以n-1,如此類推,一直到0:

WMA = { n p_1 + (n-1) p_2 + \cdots + 2 p_{n-1} + p_n \over n + (n-1) + \cdots + 2 + 1}
WMA,N=15
WMA,N=15

計算連續數值時,方程式如下:

今日總和 = 昨日總和 + p1pn + 1
分子 = N = 昨日分子 + np1 昨日總和
WMA_{today} = { N_{today} \over n + (n-1) + \cdots + 2 + 1}

留意分母為三角形數,方程式為n(n+1)\over2

右圖顯示出加權是隨日子遠離而算術式遞減,直至0。

[编辑] 指數移動平均

EMA,N=15
EMA,N=15

指數移動平均(EMA或EWMA)是以指數式遞減加權的移動平均。各數值的加權而隨時間而指數式遞減,越近期的數據加權越重,但較舊的數據也給予一定的加權。右圖是一例子。

加權的程度以常數α決定,α數值介乎0至1,. α may be expressed as a percentage, so a smoothing factor of 10% is equivalent to α=0.1. Alternately, α may be expressed in terms of N time periods, where \alpha={2\over{N+1}}. For example, N=19 is equivalent to α=0.1.

The observation at a time period t is designated Yt, and the value of the EMA at any time period t is designated St. S1 is undefined. S2 may be initialized in a number of different ways, most commonly by setting S2 to Y1, though other techniques exist, such as setting S2 to an average of the first 4 or 5 observations. The prominence of the S2 initialization's effect on the resultant moving average depends on α; smaller α values make the choice of S2 relatively more important than larger α values, since a higher α discounts older observations faster.

The formula for calculating the EMA at time periods t≥2 is[1]

S_{t} = \alpha \times Y_{t-1} + (1-\alpha) \times S_{t-1}

This formulation is according to Hunter (1986)[2]; an alternate approach by Roberts (1959) uses Yt in place of Yt-1[3]

This formula can also be expressed in technical analysis terms as follows, showing how the EMA steps towards the latest price, but only by a proportion of the difference (each time),[4]

EMA_{today} = EMA_{yesterday} + \alpha \times (price - EMA_{yesterday})

Expanding out EMAyesterday each time results in the following power series, showing how the weighting factor on each price p1, p2, etc, decrease exponentially,

EMA = { p_1 + (1-\alpha) p_2 + (1-\alpha)^2 p_3 + (1-\alpha)^3 p_4 + \cdots \over 1 + (1-\alpha) + (1-\alpha)^2 + (1-\alpha)^3 + \cdots }

In theory this is an infinite sum, but because 1-α is less than 1, the terms become smaller and smaller, and can be ignored once small enough. The denominator approaches 1/α, and that value can be used instead of adding up the powers, provided one is using enough terms that the omitted portion is negligible.

The N periods in an N-day EMA only specifies the α factor. It isn't a stopping point for the calculation in the way N is in an SMA or WMA. The first N days in an EMA do represent about 86% of the total weight in the calculation though.

The power formula above gives a starting value for a particular day, after which the successive days formula shown first can be applied.

The question of how far back to go for an initial value depends, in the worst case, on the data. If there are huge p price values in old data then they'll have an effect on the total even if their weighting is very small. If one assumes prices don't vary too wildly then just the weighting can be considered, and work out how much weight is omitted by stopping after say k terms. This is (1-\alpha)^k + (1-\alpha)^{k+1} + \cdots, which is (1-\alpha)^k \times (1 + (1-\alpha) + (1-\alpha)^2 \cdots), ie. a fraction {(1-\alpha)^k \over \alpha} out of the total weight.

Thus if the aim was to have 99.9% of the weight then k={ \log (0.001 \times \alpha)  \over \log (1-\alpha)} many terms should be used. And what's more it can be shown \log\,(1-\alpha) approaches -2 \over N+1 as N increases, so this simplifies to (roughly) k=3.45\times(N+1) for this example 99.9% weight.

[编辑] J. Welles Wilder

Noted technical analyst J. Welles Wilder uses a different form for specifying the period of an EMA. For say 14 days he writes[5]

EMA_{today} = {1\over14} \times price + {13\over14} \times EMA_{yesterday}

So α=1/N rather than α=2/(N+1) as described above. The calculation and properties are all the same, it's just a different reckoning of the rate of smoothing. Clearly care must be taken with which is intended. A conversion can be easily made, for instance 14-days from Wilder is equivalent to 27-days in the above (conversion 2N-1).

The formula for calculating the EMA at time periods t≥2 is[2]

[编辑] Other weightings

Other weighting systems are used occasionally – for example, a volume weighting will weight each time period in proportion to its trading volume.

There are weighting systems designed using a combination of moving averages: The DEMA indicator (and TEMA indicator (Triple Exponential Moving Average) are unique composites of a single exponential moving average, a double exponential moving average, and in the latter case a triple exponential moving average that provides less lag than either of the three components individually. They were originally introduced January 1994 by Patrick Mulloy.

The TRIX indicator uses a triple-EMA in its calculation. This ends up as just a certain set of weights on past data, and a set quite different to a plain EMA actually.

[编辑] 參閱

  • MACD

[编辑] 參考資料

  1. NIST/SEMATECH e-Handbook of Statistical Methods: Single Exponential Smoothing at the National Institute of Standards and Technology
  2. NIST/SEMATECH e-Handbook of Statistical Methods: Single Exponential Smoothing at the National Institute of Standards and Technology
  3. NIST/SEMATECH e-Handbook of Statistical Methods: EWMA Control Charts at the National Institute of Standards and Technology
  4. Moving Averages page at StockCharts.com
  5. Relative Strength Index construction at IncredibleCharts.com

[编辑] 對外連結

THIS WEB:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2006:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu