[R-SIG-Finance] Filtering dates/times from zoo/xts series

chrisbird chris at chrisbird.com
Mon Sep 26 09:24:57 CEST 2011


Hi,

I am in the process of writing a back-tester using blotter, quantmod and
various other libraries but have stumbled across a couple of stumbling
blocks - any help on these would be really appreciated.

The data in 30 minute O,H,L,C,V over several months.

Firstly if I have a xts/zoo time-series, is there any simple way of
filtering the series by time? For example  I wish to reduce the series to a
set of samples which lie between 07:00 and 21:00.

Secondly, and more complex, I wish to remove data of each daily period for
which there are less than 7 samples. So, if I only have four 30 minute
samples for today - I wish to remove all samples for today from the series.
I'm guessing that the best way of doing this is to do an aggregate sample
count per day and then somehow filter the original data on this - however I
am unsure how to do this.

Any help on these issues would be greatly appreciated.

Thanks,

Chris.

--
View this message in context: http://r.789695.n4.nabble.com/Filtering-dates-times-from-zoo-xts-series-tp3842937p3842937.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list