Hi, trying to do something that would seem like it ought to be fairly easy, but can’t find a way. I want to create a Ranking based on the correlation of the current stock to another series, for example in this case SPY. Lower is better.
Here’s one way to do it. This uses 5 day roc ascorrelationfactor. If you want to change it to daily then edit the “5” to “1”. Limits on the loop counter value will limit the look a k you can q hiee with this approach.