Hello,
I am trying to figure out how to develop a custom factor that gives me the percentage change of the configured time window.
In my example pct_10days is supposed to give me the percentage change of the closing price between 10 days ago and yesterday.
pct_1days should give me the percentage change between the day before yesterday and yesterday.
The Formula used is ( (close[-1] - close[0]) / close[0]) *100
However when I compare the result with the chart in the stock the result doesnt match.
And the pct_1days only returns 0
Can you guys help me out with this formula.
Thanks.