Moving Averages(2): What Are They?

来源:互联网 发布:java数组转字符串 编辑:程序博客网 时间:2024/06/06 11:44

By Casey Murphy, Senior Analyst ChartAdvisor.com 

Among the most popular technical indicators, moving averages are used to gauge the direction of the current trend. Every type of moving average (commonly written in this tutorial as MA) is a mathematical result that is calculated by averaging a number of past data points. Once determined, the resulting average is then plotted onto a chart in order to allow traders to look at smoothed data rather than focusing on the day-to-day price fluctuations that are inherent in all financial markets. 

在众多技术分析指标中,滑动平均(MA)常常是一个用来评估当前趋势的指标。

MA的计算有很多种,但每一种都是利用过去的一些数据,经过某一些规则的加工,平均以后生成出来的“平滑”的的数据。(去掉一些价格的波动,就更能体现出趋势。所谓的低通滤波器。)



The simplest form of a moving average, appropriately known as a simple moving average (SMA), is calculated by taking the arithmetic mean of a given set of values. For example, to calculate a basic 10-day moving average you would add up the closing prices from the past 10 days and then divide the result by 10. In Figure 1, the sum of the prices for the past 10 days (110) is divided by the number of days (10) to arrive at the 10-day average. If a trader wishes to see a 50-day average instead, the same type of calculation would be made, but it would include the prices over the past 50 days. The resulting average below (11) takes into account the past 10 data points in order to give traders an idea of how an asset is priced relative to the past 10 days.


Figure 1

最简单的MA,大概就是SMA了。确定窗长,加窗,算术平均。滑动窗口,重复操作。


Perhaps you're wondering why technical traders call this tool a "moving" average and not just a regular mean? The answer is that as new values become available, the oldest data points must be dropped from the set and new data points must come in to replace them. Thus, the data set is constantly "moving" to account for new data as it becomes available. This method of calculation ensures that only the current information is being accounted for. In Figure 2, once the new value of 5 is added to the set, the red box (representing the past 10 data points) moves to the right and the last value of 15 is dropped from the calculation. Because the relatively small value of 5 replaces the high value of 15, you would expect to see the average of the data set decrease, which it does, in this case from 11 to 10. 


Figure 2

What Do Moving Averages Look Like? 

Once the values of the MA have been calculated, they are plotted onto a chart and then connected to create a moving average line. These curving lines are common on the charts of technical traders, but how they are used can vary drastically (more on this later). As you can see in Figure 3, it is possible to add more than one moving average to any chart by adjusting the number of time periods used in the calculation. These curving lines may seem distracting or confusing at first, but you'll grow accustomed to them as time goes on. The red line is simply the average price over the past 50 days, while the blue line is the average price over the past 100 days. 

注意啊,国外的K线和中国的K线,颜色是反的-_-!

我大中华的大A股,绿油油一片,你就完蛋了!


Figure 3

MA的窗口长度,time period。常常听见有人说10日均线,60日均线,就是MA的窗口长度不同。MA10,MA60。


Now that you understand what a moving average is and what it looks like, we'll introduce a different type of moving average and examine how it differs from the previously mentioned simple moving average. 

下面,我们将介绍另一种类型的MA(指数MA,EMA),并看看它和上文提到的SMA的区别。


The simple moving average is extremely popular among traders, but like all technical indicators, it does have its critics. Many individuals argue that the usefulness of the SMA is limited because each point in the data series is weighted the same, regardless of where it occurs in the sequence. Critics argue that the most recent data is more significant than the older data and should have a greater influence on the final result. In response to this criticism, traders started to give more weight to recent data, which has since led to the invention of various types of new averages, the most popular of which is the exponential moving average (EMA). (For further reading, see Basics Of Weighted Moving Averages and What's the difference between an SMA and an EMA?

虽然这种最简单的、最常规的MA,即SMA,非常流行,但仍受到一些质疑和批评。

许多人这样抨击SMA,SMA的作用有限,因为过去的数据,只要是在窗口中,它们就等权重。其实似乎应该考虑它们出现的先后顺序。

批评者认为离当前时刻近的数据“应该”比离当前更远的数据更为重要。这似乎是有道理的。因此,我们可以赋予距离当前时刻更近的点更高的权重,而赋予更古老的数据更小的权重。(想一想,这和很多现代频谱仪的造法是一样的。历史数据是一种被逐渐遗忘的过程。)

这也可以认为是对信号加不同类型的窗。(想想信号处理里也会有很多窗函数。SMA就是矩形窗,还有各种窗……)其中,最流行的就是加指数形状的窗函数。


Exponential Moving Average 
The exponential moving average is a type of moving average thatgives more weight to recent prices in an attempt to make it more responsive to new information. Learning the somewhat complicated equation for calculating an EMA may be unnecessary for many traders, since nearly all charting packages do the calculations for you.However, for you math geeks out there, here is the EMA equation: 可以看看EMA的算法。尽管现在很多软件和工具可以直接计算EMA。

Figure 4

When using the formula to calculate the first point of the EMA, you may notice that there is no value available to use as the previous EMA. This small problem can be solved by starting the calculation with a simple moving average and continuing on with the above formula from there. We have provided you with a sample spreadsheet that includes real-life examples of how to calculate both a simple moving average and an exponential moving average. 

这是一个递推的方程。关于初值的话,可以简单地用EMA计算。


The Difference Between the EMA and SMA 
Now that you have a better understanding of how the SMA and the EMA are calculated, let's take a look at how these averages differ. By looking at the calculation of the EMA, you will notice that more emphasis is placed on the recent data points, making it a type of weighted average. In Figure 5, the numbers of time periods used in each average is identical (15), but the EMA responds more quickly to the changing prices. Notice how the EMA has a higher value when the price is rising, and falls faster than the SMA when the price is declining. This responsiveness is the main reason why many traders prefer to use the EMA over the SMA. 

Figure 5

从上图可以看出EMA和SMA的一些区别。EMA的响应比SMA更为灵敏。对于价格变化的灵敏度更高。这种快速的响应也是投资者更青睐于EMA的主要原因。当然,这不一定永远是好事。比如,交易频率越高,手续费就会更高。


What Do the Different Days Mean? 

Moving averages are a totally customizable indicator, which means that the user can freely choose whatever time frame they want when creating the average. The most common time periods used in moving averages are 15, 20, 30, 50, 100 and 200 days. The shorter the time span used to create the average, the more sensitive it will be to price changes. The longer the time span, the less sensitive, or more smoothed out, the average will be. There is no "right" time frame to use when setting up your moving averages. The best way to figure out which one works best for you is to experiment with a number of different time periods until you find one that fits your strategy. 

窗口长度会给MA的结果带来怎样的影响?窗口长度越长,结果越平滑,平滑能力更强,“噪声”去掉得越干净。

这对应于更小的低通滤波器的截止频率。Low Pass Filter。

对应于奇异值分解中仅保留更少的数值较大的奇异值。Singular Value Decomposition。[U,S,V] = svd(Mat);

对应于小波分析里的更低阶的空间V。f ≈ fj-1 + wj-1 = (fj-2 + wj-2) + wj-1 = ...

当然,没有正确的窗长,只有合适的窗长。最好的窗长,就是那个适合你的交易策略的窗长。

然而,这可能会导致过分依赖参数的问题。

不管怎么说,均线系统还是很霸气的!

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 苹果6splus很卡怎么办 苹果6s卡槽坏了怎么办 在京东买的电脑没发票怎么办 京东上买的空调没发票怎么办 分期手机被坑了怎么办 京东退货发票丢了怎么办 买东西的发票丢了怎么办 淘宝买东西发票丢了怎么办 网上买的手机没有发票怎么办 网上买的手机没发票怎么办 手机店花呗分期额度不够怎么办 买了手机没有开票怎么办 在京东上买苹果手机没有发票怎么办 买到苹果演示机怎么办 京东白条借不了怎么办 买了东西不给退怎么办 邮政储蓄银行买东西多扣钱了怎么办 快递送错地方了怎么办 菜鸟驿站超过5天怎么办 消费者买到不合格产品怎么办 如果买到不合格的产品怎么办 买到不合格的种子怎么办 买到不合格的空调怎么办 买到不合格的家具怎么办 灭火器买到不合格产品怎么办 路边买到假手机怎么办 网上买的手机屏幕碎了怎么办 天猫订单删除了怎么办 华为入职预约满怎么办 三星c5玩王者荣耀卡怎么办 三星s8背部碎了怎么办 保修期内发动机坏了怎么办 6s主板进水了怎么办 新买的狗晚上叫怎么办 官网手机坏了怎么办 小米商城买手机不发货怎么办 小米商城分期额度不够怎么办 京东买家未退款怎么办 京东自营不退款怎么办 苏宁易购的无门槛15元怎么办 小米5shome键失灵怎么办