---------- Forwarded message ----------
From: Jacopo Anselmi <janselmi.sage@gmail.com>
Date: Tue, Sep 6, 2011 at 3:28 PM
Subject: Re: [R-SIG-Finance] Get Tick data from IBrokers
To: Jeffrey Ryan <jeffrey.ryan@lemnica.com>


Thanks Jeff,

It worked perfectly. Also: I've read your post on StackOverflow where you
mentioned the usage of mmap and indexing to create a kind of long term
database solution to store tick data.

Is there a place where I can find more information on how to do it? Did you
cover this issue during any of your speeches?

Thanks!

Jaco


On Mon, Sep 5, 2011 at 5:02 PM, Jeffrey Ryan <jeffrey.ryan@lemnica.com>wrote:

> You just pass in a list of file names of handles (more efficient) to
> the file= param.
>
> > fh <- list(file("aapl.csv", open="w"), file("goog.csv", open="w"))
> > reqMktData(ibg, list(twsSTK("AAPL"),twsSTK("GOOG"))
> event=eWrapper.MktData.CSV(2), file=fh)
> > reqMktData(ibg, list(twsSTK("AAPL"),twsSTK("GOOG")),
> event=eWrapper.MktData.CSV(2), file=fh)
> ^C
>
> > lapply(fh, close)
> [[1]]
> NULL
>
> [[2]]
> NULL
>
> > system("head aapl.csv")
> 20110905 09:59:02.304651,,,,,,,162727
> 20110905 09:59:02.693429,0,-1,,,,,
> 20110905 09:59:02.694235,,,-1,0,,,
> 20110905 09:59:02.694818,0,,,,,,
> 20110905 09:59:02.695388,,,,0,,,
> 20110905 09:59:02.695950,0,-1,,,,,
> 20110905 09:59:02.696552,,,-1,0,,,
> 20110905 09:59:02.697134,0,,,,,,
> 20110905 09:59:02.697701,,,,0,,,
> > system("head goog.csv")
> 20110905 09:59:03.177405,0,-1,,,,,
> 20110905 09:59:03.178224,,,-1,0,,,
> 20110905 09:59:03.178901,0,,,,,,
> 20110905 09:59:03.179560,,,,0,,,
> 20110905 09:59:03.180208,0,-1,,,,,
> 20110905 09:59:03.180879,,,-1,0,,,
> 20110905 09:59:03.181544,0,,,,,,
> 20110905 09:59:03.182245,,,,0,,,
> >
>
> HTH
> Jeff
>
> On Mon, Sep 5, 2011 at 4:46 AM, Jacopo Anselmi <janselmi.sage@gmail.com>
> wrote:
> > Dear finance Rusers,
> >
> > I'm trying to download efficiently contract data taken from IBrokers to
> have
> > them available later for analysis in R.
> >
> > I've found this great piece of code done by Jeff
> >
> http://quant.stackexchange.com/questions/461/how-should-i-store-tick-data
> >
> > Unfortunately I'm not able to pass more than a contract at the same time
> and
> > save the data as xts in an efficient way.
> >
> > Is there a chance you guys can help out?
> >
> > Thanks a lot!
> >
> > Jaco
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Finance@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> should go.
> >
>
>
>
> --
> Jeffrey Ryan
> jeffrey.ryan@lemnica.com
>
> www.lemnica.com
> www.esotericR.com
>

	[[alternative HTML version deleted]]

