cumcorrTopN
Syntax
cumcorrTopN(X, Y, S, top, [ascending=true], [tiesMethod=’latest’])
Please see Cumulative Moving TopN Functions (cumTopN functions) for the parameters and windowing logic.
Details
After stably sorting S in the specified ascending order, the function calculates the correlation of the first top pairs of elements in X and Y in a cumulative window.
Return value: DOUBLE type
Examples
$ X=1 2 3 10 13 4 3
$ Y = 1 7 8 9 0 5 8
$ S = 0.3 0.5 0.1 0.1 0.5 0.2 0.4
$ cumcorrTopN(X, Y, S, 6, 3)
[,1,0.9244,0.6588,-0.1784,-0.1764,-0.1825]