The second example on Correl() function is incorrect:
What is the correct formulation of the second example? Is it Correl(5,251,$SP500)?
Thank you!
The second example on Correl() function is incorrect:
What is the correct formulation of the second example? Is it Correl(5,251,$SP500)?
Thank you!
I would use:
–corrected–
That’s just general principles: I find #year easier to read and I prefer to use SPY rather than the index. The index doesn’t include dividend income, so I am in the habit of using SPY.
I will correct the documentation.
EDIT: It was pointed out that there are 52 weeks in a year, not 251. So:
Correl(5,52,GetSeries("SPY"))
That seems to work - in the Screener at least.