开发者

Does there exist runPercentRank like runFun (runMin, runMax,...) in TTR or how to write one?

I am looking for percent rank function in R but can not find it.

Actually I am interested in runPercentRank function like the ones in TTR package under runFun (runMin, runMax,...). The function would take an xts object as argument and length of interval and return an 开发者_StackOverflow中文版xts object with percent ranks of values.

Does something like that exists? Any hints on how to efficiently write such a function?


Thanks to Charlie Friedemann, there is now an extremely fast runPercentRank function in TTR >= 0.22.0.

library(quantmod)
data(ttrc)
pr <- runPercentRank(Cl(ttrc))
plot(pr, type="l")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜