"Exponential moving average for time series attribute [SOLVED]"

nikolanikola Member Posts: 5 Contributor II
edited June 2019 in Help
Hi guys,
i guess this one should be easy to answer for RapidMiner forum experts. How is exponential moving average implemented in RapidMiner for a time series attribute i.e. like price?

Thx.
/Nikola.
Tagged:

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Hi Nikola,

    do you really want to know how it is implemented, or do you want to know how to use it? For the latter, you should install the Series Extension and have a look at the operator Moving Average. Basically this is also true for the implementation details, you can download the code of the series extension and look at the implementation of the operator.

    Best,
    Marius
  • nikolanikola Member Posts: 5 Contributor II
    Marius wrote:

    Hi Nikola,

    do you really want to know how it is implemented, or do you want to know how to use it? For the latter, you should install the Series Extension and have a look at the operator Moving Average. Basically this is also true for the implementation details, you can download the code of the series extension and look at the implementation of the operator.

    Best,
    Marius
    Hi Marius,
    I want to use the 10 days exponential moving average indicator for a time series attribute like item price in the model i am building. I have presumed that Moving Average operator should be used, however I want verify with a RapidMiner expert like you the key params I plan to pass to Moving Average operator. First Question: Is it OK to use 'average' as aggregation function and window weighting set to 'Rectangular' which are default operator values for exponential moving average? Second question : Since Moving average doesn't have alpha param should I connect Moving Average operator with Exponential Smoothing operator  to get moving average of the attribute EXPONENTIALLY weighted?

    I didn't run on a good example including exponential moving average, since pretty much all examples include simple moving average, so I am not 100% sure how the exponential moving average should be represented in RapidMiner model, hope you are able to help me out.


    /Nikola.
  • nikolanikola Member Posts: 5 Contributor II
    Any chance of someone who has used exponential moving average in the RapidMiner model as operator and willing to help me out?
  • haddockhaddock Member Posts: 849 Maven
    From http://www.ipredict.it/Methods/MovingAverage.aspx
    The Triangular Moving Average is an average that is weighted with weights that rise from the most recent sample towards the farthest sample. So in effect the weighting function is a triangle that moves as the moving average moves. The triangle is wide k units and its height is 2/k units so that the area of this triangle is 1. This gives the last historical values a higher weight and to old values a lower weight.

    The Exponential Moving Average is a weighted average whose weights are exponentially decreasing from more recent historical samples to older historical values.
        MA(t) =  α X(t) + (1-α) MA(t-1)
    where α is the smoothing factor. To compute an α factor that is roughly equivalent to the simple moving average window we can use the simple formula:
        α = 2 / (k + 1) where k is the window length.
    So I think that the existing moving average operator does not do EMAs, but Marius is more than a fine head of hair, his suggestion of downloading the code is spot on, as it shows exactly how it could be implemented.

  • nikolanikola Member Posts: 5 Contributor II
    Hi thx. for the answers.  I am not a programmer by education, but business & finance student, so I haven't been much in touch with coding. My professor has recommended RapidMiner for a practical work we are working on as part course we are taking. Could you pls. point me out to a download link and what should look for once I make a download?

    Thx. in advance,
    /Nikola
  • wesselwessel Member Posts: 537 Maven
    Hey,

    If you want very detailed help, I'd recommend you do 2 things:
    1. very clearly write what you are trying to achieve
    2. start creating a rapid miner process yourself and see how far you get, then post the XML of this process here

    I can hardly imagine you need need help installing Rapid Miner, or help downloading it.
    But here is a very detailed tutorial on installation.
    http://rapid-i.com/content/view/17/40/

    Best regards,

    Wessel
  • haddockhaddock Member Posts: 849 Maven
    RapidMiner may not implement EMAs, but if you Google you'll find many spreadsheet implementations, and most spreadsheets can be read by RapidMiner, mix and match the right tools for each section of the job.

    No need to re-invent the wheel, so you can avoid programming altogether - think of the unpleasant social mannerisms and skin ailments that you'll miss out on as a consequence!

    This link may save you from such horrors http://dowjonesdata.blogspot.fr/2009/04/exponential-moving-average.html

    Hope so.
  • nikolanikola Member Posts: 5 Contributor II
    Thx. haddock for straight answer.

    /Nikola
Sign In or Register to comment.