Ranking XTS based on quantiles
On Thu, Oct 31, 2013 at 6:39 AM, Raghuraman Ramachandran
<optionsraghu at gmail.com> wrote:
R GuRus
I have an xts object called vols
head(vols)
[,1]
2011-07-12 0.2985884
2011-07-13 0.2873109
2011-07-14 0.2780244
2011-07-15 0.2739429
2011-07-18 0.2609898
2011-07-19 0.2868996
and I wanted to have a column next to each in everyrow that ranks the vols
based on quantiles.
You haven't provided enough information. For a given row, which observations do you want to use to calculate quantiles? Please provide a minimal reproducible example and the output you expect.
quantile(vols)
0% 25% 50% 75% 100%
0.0562344 0.1536431 0.2194198 0.3043755 1.3428146
Can you help please?
Thanks
Raghu
-- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com