[R-SIG-Finance] xts + indexing for tick data?

Andrew Piskorski atp at piskorski.com
Thu Aug 5 19:40:08 CEST 2010


On Sat, Jun 19, 2010 at 07:41:13PM +0200, Daniel Cegie?ka wrote:
> Subject: Re: [R-SIG-Finance] kdb and q?

> R in general isn't so fast like q but we have really fast packages
> like xts and indexing and you can work even with TB of tick data...
> and (xts+indexing) you can compare with kdb.

Interesting!  Could you say a bit more though about how you've
actually used xts and indexing in practice, and any pointers for
getting started trying them out for tick data?

I grabbed the latest code (below) from svn, but although the docs talk
about data frames, so far it looks to me like indexing and mmap only
support atomic vectors.  Does that sound right, or am I looking in the
wrong places?

Also, the docs talk about how to use mmap's struct() to build up a
row-oriented data store, but, wouldn't a column-oriented store be more
natural for many uses in R, particularly for large time series of tick
data?

I guess I could mmap each column of a data frame (or xts object) to a
separate file, and then stick any necessary additional metadata for
the object in some ancillary file, but...  What are your thoughts on
how to do that right?

(Thanks for your advice!)

------------------------------

R 2.11.1 (Patched), 2010-07-27, svn.rev 52627, x86_64-unknown-linux-gnu
> require("mmap") ; require("indexing") ; require("xts")
> data(sample_matrix)
> sample.xts <- as.xts(sample_matrix, descr='my new xts object')
> create_index(sample.xts)
Error in UseMethod("create_index.mmap") :
  no applicable method for 'create_index.mmap' applied to an object of class "c('xts', 'zoo')"

$ svn info mmap indexing xts | egrep '^(URL|Revision|Last Changed Rev|Last Changed Date):'
URL: svn://svn.r-forge.r-project.org/svnroot/indexing/pkg/mmap
Revision: 94
Last Changed Rev: 94
Last Changed Date: 2010-06-28 15:13:29 -0400 (Mon, 28 Jun 2010)
URL: svn://svn.r-forge.r-project.org/svnroot/indexing/pkg/indexing
Revision: 94
Last Changed Rev: 87
Last Changed Date: 2010-05-19 14:16:43 -0400 (Wed, 19 May 2010)
URL: svn://svn.r-forge.r-project.org/svnroot/xts/pkg
Revision: 506
Last Changed Rev: 506
Last Changed Date: 2010-08-04 14:28:48 -0400 (Wed, 04 Aug 2010)

-- 
Andrew Piskorski <atp at piskorski.com>
http://www.piskorski.com/



More information about the R-SIG-Finance mailing list