EMA指数平滑移动平均

英文参考:http://www.incrediblecharts.com/indicators/exponential_moving_average.php

Exponential moving averages are recommended as the most reliable of the basic moving average types. They provide an element of weighting, with each preceding day given progressively less weighting. Exponential smoothing avoids the problem encountered with simple moving averages, where the average has a tendency to "bark twice": once at the start of the moving average period and again in the opposite direction, at the end of the period. Exponential moving average slope is also easier to determine: the slope is always down when price closes below the moving average and always up when price is above. 

Formula

To calculate an exponential moving average (EMA):

  • Take today's price multiplied by an EMA%.
  • Add this to yesterday's EMA multiplied by (1 - EMA%).

If we recalculate the earlier table we see that the exponential moving average presents a far smoother trend:

 

Day123456789
Price ($)161717101718171717
33.3% (or 1/3) EMA 16.316.514.415.216.216.416.616.8

指数移动平均被认为是最可靠的基本移动平均类型。每个抽样数据都附有以一个权重值,相邻的两个权重值向前递减(也就是前一个权重值比当前权重值减一)。指数移动平均的指数平滑避免了’一般移动平均‘的某些问题,比如一般的移动平均会有“两次跳跃(bark twice)”的现象,从而扭曲数据与实际情况的符合程度。

比如:

Simple Moving Average Formula

To calculate a 5 day simple moving average ("SMA"), take the sum of the last 5 days prices and divide by 5.

Day123456789
Price ($)161717101718171717
5 Day SMA    15.415.815.815.817.2

 

 从上面的表格我们可以看到,在第9天,简单移动平均结果是17.2,与第8天的简单移动平均15.8相比有一个较大的跳跃,而第8、9两天的实际数据为17、17并没有变化。在第4天时的数据不仅仅引起当前数值上的下降,而且还对第9天的简单移动平均造成了扭曲,也就是前面说的那个条约。这就是所谓的“bark twice”。也就是说原始数据一次脉冲式跳跃,会导致后面数据的跳跃,并且两次跳跃的方向相反,从而不能很好描述原始数据的变化趋势。因此才有人提出了指数平滑移动平均线Exponential Moving Average,简称EMA。

EXPMA(Exponential Moving Average)译指数平滑移动平均线,简称EMA,

求当日价格X的N日指数平滑移动平均,在股票公式中一般表达为:EMA(X,N),其中X为当日收盘价,N为天数。它真正的公式表达是:当日指数平均值=平滑系数*(当日指数值-昨日指数平均值)+昨日指数平均值;平滑系数=2/(周期单位+1);由以上公式推导开,得到:EMA(N)=2*X/(N+1)+(N-1)*EMA(N-1)/(N+1);

可是这个公式的前提是要知道前一天的EMA,如果已知N天的价格,我想求取连续N天的EMA,怎么根据这个N个价格计算EMA呢?根据归纳推算得到公式如下:

 

转载于:https://www.cnblogs.com/phoenixdsg/p/9219990.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值