Skip to content
Prev 8587 / 15274 Next

Filtering dates/times from zoo/xts series

On Mon, 2011-09-26 at 00:48 -0700, chrisbird wrote:
It is actually much simpler than that:

spreadv['T09:00/T21:00']

xts makes extensive use of ISO 8601 subsetting.
I typically remove days that don't fall on trading days when I am
initially processing the data.  If the markets were open, you probably
want the data.  If not, you probably don't want it.  But this requires
you to know the market calendar.

I'll also point out that if you're writing a backtest using blotter, it
would probably be far faster for you to base your backtest on
quantstrat, which adds a strategy logic abstraction layer on top of
blotter.

Cheers,

   - Brian