momentum ( seq n -- newseq )


Vocabulary
math.finance

Inputs
seqa sequence
nnumber of periods


Outputs
newseqa sequence


Word description
Returns the Momentum of the sequence, calculated by:
MOM[t] = SEQ[t] - SEQ[t-n]


Definition