The perfect moving average

Discussion in 'Technical Analysis' started by aphexcoil, Sep 6, 2002.

  1. wdbaker

    wdbaker

    Here is one for you to try out.

    .2*(price+(price-price[4]))+.8*filt[1]

    It removes almost all of the lag that you would have with the standard 10xma which is .2*price+.8*filt[1]

    I believe that this is a piece of Ehlers work, not sure where I picked it up.

    What ever the lag is of the normal xma, that is where the Price[4] comes in, if it was a 3bar lag then you would have used price[3]

    lag=1/.2-1
    where .2 is the frequency

    Hope I got all this right,

    freq=2/period
    period=2/freq

    Hope this helps someone out there, if you have questions I will try to help but I am not a higher math kind of guy, barely made the GED thing you know.

    wdbaker
     
    #21     Sep 8, 2002
  2. Traden4Alpha,

    Great post! Here is what I have found so far.

    First, take a look at this picture that apparently shows how JMA is superior to other MA's in this regard (although I am still waiting for an e-mail back from them!)

    As you can see, the JMA adapts much faster to an opening price gap.

    I'll share more in the next e-mail.

    aphie
     
    #22     Sep 8, 2002
  3. Alright, here is another picture. This sort of carries along with the philosophy behind Bollinger Bands. As you can see, the middle T3 MA is a fair approximation of where most price data accumulates, and the outer bands show where price-data reverts strongly away from the moving average.

    Unfortunately, one of the biggest questions that a trader would love to know when trading is, "Is this current price information being shown to be significant or an anomaly?"

    One could argue that all price-information (tick information) is important information. However, I don't think this is always the case because a lot of times, prices will tend to get more weight than they should.

    Perhaps a starting point for a new moving average would look at various time series of data and add weight to those prices which exist near the mean and give less weight to those prices that wander based on their deviation from the mean.

    However, there are moments when the market moves suddenly and does so fast and hard, so not only would the mean have to be considered and constantly sampled, but also the volatility of the market as well.

    Here is a picture:
     
    #23     Sep 8, 2002
  4. aphie,

    i think you are onto something i've thought about myself. i could be wrong, but i think stocks, etc. have what i call "extremes." the extreme is an area away from a moving average at which the price will historically revert to the mean of the moving average. kind of like bollinger bands, but not exactly.

    as you can see in the following link, i've pointed this out already. keep in mind, you would be fading the extremes. for example, if the price is way above the 5sma, you would short and cover near the 5sma. if the price is way below the 5sma, you would go long and sell near the 5sma.

    the trouble i have is, how would i go about calculating where an extreme area is? maybe like a percentage away from the 5sma? it was discussed in the same thread that it looks like an extreme for this particular stock is about 3/4" away from the 5sma. you could almost take a ruler to it and see what i mean. :)

    anyway, check out the picture when you click on this link:
    http://www.elitetrader.com/vb/showthread.php?s=&postid=106721&highlight=extremes#post106721
     
    #24     Sep 8, 2002
  5. super_ego/FPC,

    i'd appreciate some input regarding my previous post in this thread. when super_ego got into the nuts & bolts of his trading, there is actually a similarity here. super_ego used a 5sma to determine the trend. if the 5sma was sloping down, he would short near the 5sma and cover at extremes below it. while this is not exactly what i'm saying, it is somewhat similar.

    for those who understand what i just explained and super_ego's methods, they're almost opposite, although similar.

    SE shorts near the downsloping 5sma and covers at oversold extremes. my method buys the extreme SE is covering at and sells when price returns near the 5sma.

    this is why i'm a supporter of SE. although he is flamboyant, he did openly discuss a trading method with substance. plus, he is somewhat humorous at times. :)
     
    #25     Sep 8, 2002
  6. wdbaker

    wdbaker

    I could be wrong but based on the animated graph that you showed and my graph I did in excel, I think that this one that I showed you is smoking the JMA or maybe I'm just smoking something:D

    wdbaker
     
    #26     Sep 8, 2002
  7. wdbaker,

    Please send me a picture of this in action. Thanks.

    aphie
     
    #27     Sep 8, 2002
  8. dottom

    dottom

    You are smoking something. The MA you described removes lag and smoothness but is ultra-sensitive to noise. It will also undershoot in the example given (notice now some MA's undershoot and some MA's overshoot - depending on their volatility/frequency component).
     
    #28     Sep 8, 2002
  9. Gordon Gekko,

    Extremes are a funny thing. A percentage that a price strays from a mean may be a good start, but here's the problem as I see it:

    As we all know, the ES movements can be very tame and slow and, at other times, extremely slippary and quick.

    Now, taking a percentage movement from the last calculated average may be a starting point for determining an extreme, but it would probably be better to also make a calculation of the average running volatility level. That way, we can better determine what is extreme and what is currently acceptable under the current volatility levels of the market.

    My missions is several fold:

    a) Find the true underlying mean price movement in a larger time-frame.

    b) Find the true underlying mean price movement during a divergence from the larger time-frame.

    c) Calculate a probable extreme that could be reached based on the volatility of the market, wait till the market comes to me, and then go against the divergence by selling or buying an "extreme spike."

    This allows me to:

    a) Trade with the trend
    b) Capture a large divergence from the trend
    c) Capture it when it is about to re-emerge with the larger trend.

    Here is a graph:
     
    #29     Sep 8, 2002
  10. aphie,

    i like what you're saying.

    basically, you're saying that you like my general idea of finding what is an extreme price by % away from a moving average (perhaps), but you ALSO want to have the % away extreme defined by and change with the current volatility.

    so say for example YHOO's extremes for the last few days have been around 10% away from it's 5sma. but now it is not as volatile. so now you could say maybe 6% away from it's 5sma is an extreme. since the extremes are changing with volatility, we should also change what we consider to be an extreme.

    even if we're not seeing eye to eye on the details, i think we're on the same page. what would your method of playing this be? would you fade the extremes as i previously said?

    for example, in the picture you posted (http://www.elitetrader.com/vb/attachment.php?s=&postid=117073), would you be shorting above the upper band and covering around the middle band? and would you be buying below the bottom band and selling near the middle band?

    in short, we need a way to measure volatility, and then from that determine what an extreme for the volatility is. this is good stuff..
     
    #30     Sep 8, 2002