Skip to content
Prev 8428 / 15274 Next

PerformanceAnalytics apply.rolling with NAs

Apologies, but I believe we're at cross purposes here.

My use case requires that I determine rolling returns for a collection
of stocks where in some cases data is missing (repressented by NAs),
for example if a stock did not exist for a period of time. I don't
mean to frustrate you but if I go into the use case further it might
unnecessarily complicate things. My work around, in any case, is
simply to test for these cases prior to calling apply.rolling.

If you paste my original code _in full_ and then append:

x
index(x)
class(x)

you will see what I mean.

I don't mean to be stubborn here, but I'd first like to get onto the same page.

Thanks
On 2 September 2011 13:42, Brian G. Peterson <brian at braverock.com> wrote: