Moving average - Fields and controls

Parameters

Column Mapping

Parameters page

Use this page to specify the parameters used by the transformer or program.

Statistics

In the Moving average transformer, you can select one of three statistics:

 SMA [row i] = SUM (data values for last N rows) / N

EMA [row i] = ( Value [row i] * K ) + ( EMA [row i-1] * ( 1-K ) )

where: K = 2/(N+1)

For example: for a four-day EMA, N = 4, K = 2/5 and 1-K = 3/5

An exponential moving average is also known as an exponentially smoothed moving average.

RS [row i] = SUM ( data values for the last N rows)

Column Mapping

On the Column Mapping page, map the columns that result from the transformation to columns on your target table.

Columns that result from your transformation are listed on the left side of the page. These columns are named after the selections you made for the Input column, the Statistics column, and the Period column on the Parameters page. For example, if you selected SALARY as the input column, EMA as the calculation, and 7 for the period on the Parameters page, you will see "SALARY_EMA_7" displayed on the left hand side of the Column Mapping page .

Columns in your target table are listed on the right side of the page.

Restrictions:

Source Column

Target Column

A

A

You can only map a column to itself as long as the column is not used as an input column in another transformer definition row. For example, you cannot map column A to itself if the following is true:

Source Column

Target Column

A_EMA_7

A_EMA_31

In this example, column A is used as an input column in two separate transformer definitions.

Source Column

Target Column

B

C

Because column B is mapped as a source column, the following mapping is illegal:

Source Column

Target Column

D

B

Input Column

Output Column

A

A

B

C

Because you have specified Column A and Column C as output columns, you cannot use them as either input columns or output columns in any additional rows.