Moving average of closing price for securities

Can you share a dataset with an (anonymised) example? From what you explain honestly that is what Moving Average with a Window Size of 28 should do. You may have to use the Moving Average node inside of a loop (Group Loop Start Node) and you will have to make sure that the data you pass into that loop has been sorted first by stock, second by date. The Moving Average Node simply goes backwards (or in your case also forward) 28 rows from the current row - it doesn’t make any checks whether the previous rows belong to the same stock or related to previous/next days…

In Moving Average Node I think any “Forward” Method should do the trick for the the average of the “future” 28 days, and “Backwards” for the past:
image

4 Likes