Exponential Moving Average

Discussion in 'Trading' started by rrisch, Apr 14, 2002.

  1. it's important to understand the the EMA and SMA with percent=2/(N+1) are NOT identical. The equation simply indicates for which "percent" the exponential MA has the same lag as a simple MA with period N.
     
    #11     Apr 15, 2002
  2. rrisch

    rrisch

    Vikana, please explain what "lag" means and the proof of your assertion. Thanks.:confused:
     
    #12     Apr 15, 2002
  3. rrisch

    rrisch

    I think a psychologist would have a field day, observing some of the ridiculous comments here from people who are probably compensating for their poor performance in the stock market by trying to impress their fellow traders by bluffing that they have some scientific understanding of what they do. Unless you have a math/scientific background, please do not comment on this thread. Thank you. :p
     
    #13     Apr 15, 2002
  4. dottom

    dottom

    Robert, you looking the mirror again? :p
     
    #14     Apr 15, 2002
  5. rrisch,

    I'm not trying to be sarcastic but a friend of mine that's a part-time trader and more into the academics (math) behind price movement asked a tough question about the mathmatics of the market in a stock discussion forum on Silicon Investor.

    His math question was about probabilities or something like that.

    His response to the responses was similar to yours.

    Someone finally suggested he go to his local university and ask a math professor or bored TA (teaching assistant) for help.

    He did and got the answer he needed and answers to other unresolved past questions.

    What did he learn? Most traders just trade and could care less about the mathmatics of the markets and their success (profits) is independent from their math...

    those that do care about the mathmatics...usually get their answers from elsewhere...from individuals that know nothing about the markets...from individuals that most likely have never met a trader.

    Good night and too much posting for me in the past few days.

    Nihaba Ashi
     
    #15     Apr 15, 2002
  6. I'll post the details tomorrow. It's a little calculation.

    "lag" is the number of bars that the moving average is "behind" the actual time series.
     
    #16     Apr 15, 2002
  7. rrisch

    rrisch

    I'll be waiting with baited breath Vikana. I would very much like to understand how a moving average is "behind" the time series.:)
     
    #17     Apr 15, 2002
  8. dottom

    dottom

    Robert, with regards to "lag" and moving averages, the most important thing for traders when using moving averages is knowing the lag and smoothness. The traditional tradeoff is the smoother the MA the more lag exists.

    For some interesting analysis of MA's, lag, & smoothness, I direct you here:

    http://www.jurikres.com/down/ma_evolv.pdf
    http://www.jurikres.com/down/why_jma.pdf
     
    #18     Apr 15, 2002
  9. rrisch

    rrisch

    I didn't see any definition of lag or smoothness. Do you have another reference that explains the basics?
     
    #19     Apr 15, 2002
  10. BKuerbs

    BKuerbs

    First I want to say that NihabaAshi's post is very correct.

    A moving average of length n of say a time series (like prices of a stock etc.) is computed as xbar = (Sum of n consecutive elements)/n. That means you take only into account n elements, no more, no less. The elements are all equally weighted with weight 1, it is possible to give each element a different weight.

    The purpose of a moving average is to smooth a time series, ie. to replace each member by a moving average of its neighbours. Say you take a length of 5 for the ma, then an element xn is replaced by ((xn-2) + (xn-1) + xn + (xn+1) + (xn+2))/5. That is you need to know members xn+1 and xn+2 before you may replace xn by its ma. And that is the lag of the ma. Smoothness is achieved in two ways: by the choice of length and by the choice of the weights for each x. Giving far out members, like the xn+2 in the above example, less weigth, say you multiply them by 0.5 only instead of 1, will make the ma more responsive, using a longer length or a smaller multiplier for the recent members will make it smoother.

    The use of a ma in Technical analysis is less to smooth a time series, but to implement a trading method, you do not replace a member xn by its ma in the way described above, but you replace xn by ((xn-4)+(xn-3)+(xn-2)+(xn-1)+xn)/5. That is you shift the ma to the right. A TA program, like Metastock, does have an option to left-shift the ma, that is to plot it correctly. Do this and you will graphically understand lag.

    The exponential ma is computed as Close*percentage + (previous EMA) * (1-percentage), percentage ranging from 0.01 to 1. Starting value is Close (or whatever value you use). That is an EMA always uses *all* previous data, weighted, while a simple ma only uses data as described by its length. So there really is no equivalence between percentage used in an EMA and length (or number of periods) used in a SMA.

    That said, for practical purposes the equivalence may be computed as already quoted in previous posts. Prices are not quoted infinitesimal, that is you do not pay 78.234598122.... $ for a stock but 78.23 $ so prices are "quantized" and that is the reason the formula makes sense. The farther you get away from a certain value the less its contribution to the current value of an EMA will be till it drops below the threshold.

    regards

    Bernd Kuerbs
     
    #20     Apr 16, 2002