【學習筆記】指數移動平均線 Exponential Moving Average
指數移動平均線(Exponential Moving Average, EMA)
計算方式
1 | Today EMA = (Today CP * K) + Yesterday EMA * (1 - K) |
舉例陽明(2609) 111/02/18 的 5 EMA
加權指數
K = 平滑因子 / (時間週期 + 1)
= Something / (N + 1)
= 2 / (5 + 1)
= 2 / 6
= 0.333333333
今日 EMA
Today EMA = (今日收盤價 * 加權指數) + 昨日 EMA * (1 - 加權指數)
= (Today CP * K) + Yesterday EMA * (1 - K)
= (116.50 * 0.333333333) + 111.53 * (1 - 0.333333333)
= 38.833332945 + 111.53 * 0.666666667
= 38.833332945 + 74.35333337051
= 113.18666631551
約等於 133.19
舉例陽明(2609) 111/02/18 的 10 EMA
加權指數
K = 平滑因子 / (時間週期 + 1)
= Something / (N + 1)
= 2 / (10 + 1)
= 2 / 11
= 0.181818182
今日 EMA
Today EMA = (今日收盤價 * 加權指數) + 昨日 EMA * (1 - 加權指數)
= (Today CP * K) + Yesterday EMA * (1 - K)
= (116.50 * 0.181818182) + 110.24 * (1 - 0.181818182)
= 21.181818203 + 110.24 * 0.818181818
= 21.181818203 + 90.19636361632
= 111.37818181932
約等於 111.38
舉例陽明(2609) 111/02/18 的 20 EMA
加權指數
K = 平滑因子 / (時間週期 + 1)
= Something / (N + 1)
= 2 / (20 + 1)
= 2 / 21
= 0.095238095
今日 EMA
Today EMA = (今日收盤價 * 加權指數) + 昨日 EMA * (1 - 加權指數)
= (Today CP * K) + Yesterday EMA * (1 - K)
= (116.50 * 0.095238095) + 109.94 * (1 - 0.095238095)
= 11.0952380675 + 109.94 * 0.904761905
= 11.0952380675 + 99.4695238357
= 110.5647619032
約等於 110.57
範例資料
日期 | 開盤價 | 最高價 | 最低價 | 收盤價 | 成交量 | 5EMA | 10EMA | 20EMA |
---|---|---|---|---|---|---|---|---|
111/02/18 | 112.00 | 118.00 | 111.00 | 116.50 | 103,926 | 113.19 | 111.38 | 110.57 |
111/02/17 | 113.00 | 114.50 | 111.50 | 112.00 | 39,731 | 111.53 | 110.24 | 109.94 |
111/02/16 | 113.50 | 113.50 | 112.00 | 112.50 | 30,104 | 111.30 | 109.85 | 109.73 |
111/02/15 | 112.00 | 112.50 | 110.50 | 111.00 | 31,536 | 110.70 | 109.26 | 109.43 |
111/02/14 | 111.50 | 115.50 | 110.50 | 110.50 | 71,168 | 110.55 | 108.88 | 109.27 |
111/02/11 | 114.00 | 115.00 | 112.00 | 112.00 | 55,575 | 110.57 | 108.52 | 109.14 |
111/02/10 | 113.50 | 114.50 | 111.50 | 114.00 | 42,037 | 109.86 | 107.74 | 108.84 |
111/02/09 | 114.00 | 115.50 | 111.00 | 112.00 | 62,258 | 107.79 | 106.35 | 108.30 |
111/02/08 | 109.00 | 116.50 | 108.50 | 112.50 | 155,773 | 105.68 | 105.10 | 107.91 |
111/02/07 | 100.50 | 108.00 | 100.00 | 108.00 | 59,599 | 102.27 | 103.45 | 107.42 |
111/01/26 | 96.10 | 99.90 | 96.10 | 98.60 | 51,052 | 99.41 | 102.44 | 107.36 |
111/01/25 | 99.00 | 99.10 | 95.10 | 95.10 | 48,479 | 99.81 | 103.30 | 108.28 |
111/01/24 | 97.00 | 101.00 | 96.50 | 99.90 | 48,844 | 102.17 | 105.12 | 109.67 |
111/01/21 | 103.00 | 103.50 | 99.00 | 99.00 | 65,444 | 103.31 | 106.28 | 110.70 |
111/01/20 | 104.00 | 105.50 | 103.50 | 104.00 | 28,239 | 105.46 | 107.90 | 111.93 |
111/01/19 | 105.00 | 107.50 | 103.00 | 104.00 | 51,633 | 106.19 | 108.76 | 112.77 |
111/01/18 | 104.50 | 108.00 | 104.00 | 106.50 | 31,750 | 107.29 | 109.82 | 113.69 |
111/01/17 | 106.00 | 106.50 | 104.50 | 105.50 | 30,165 | 107.68 | 110.56 | 114.44 |
111/01/14 | 105.00 | 107.50 | 103.00 | 107.50 | 55,764 | 108.77 | 111.68 | 115.39 |
111/01/13 | 108.50 | 109.50 | 105.00 | 105.00 | 47,851 | 109.41 | 112.61 | 116.22 |
111/01/12 | 113.50 | 114.00 | 107.50 | 108.00 | 54,098 | 111.61 | 114.31 | 117.40 |
111/01/11 | 112.00 | 115.00 | 110.50 | 112.00 | 41,157 | 113.42 | 115.71 | 118.39 |
111/01/10 | 111.50 | 114.50 | 109.00 | 111.50 | 47,052 | 114.13 | 116.53 | 119.06 |
111/01/07 | 115.50 | 116.00 | 111.00 | 113.50 | 37,537 | 115.45 | 117.65 | 119.85 |
111/01/06 | 113.50 | 117.00 | 113.50 | 114.50 | 35,949 | 116.42 | 118.57 | 120.52 |
111/01/05 | 115.00 | 117.00 | 113.50 | 115.00 | 35,370 | 117.39 | 119.48 | 121.16 |
111/01/04 | 115.00 | 116.00 | 113.50 | 115.50 | 36,842 | 118.58 | 120.47 | 121.80 |
111/01/03 | 120.00 | 120.50 | 113.00 | 114.50 | 106,847 | 120.12 | 121.58 | 122.47 |
範例資料: 陽明(2609) 111/02/18 ~ 111/01/03 個股股價行情
資料來源: https://stock.wearn.com/cdata.asp?Year=111&month=02&kind=2609