[R-SIG-Finance] IBrokers - persistant data eWrapper
soren wilkening
me at censix.com
Thu Sep 1 13:25:01 CEST 2011
Hi
what you could consider doing for a production system is to separate the
data aggregation (from ticks or 5 second bars, etc to the barsize you want
to trade) and the actual indicator and signal calculation into at least two
separate R processes.
For example: Have one R process that reads, aggregates and writes (to some
shared memory structure or to a file) ALL the pricedata streams that you
need, using the eWrapper functionalities. Lets say you get pricedata streams
for 10 contracts at a time. Then have up to 10 individual R processes that
each access only one of the shared memory/file pricedata (which now has the
aggregation level that you want) and calculate indicators/signals etc and
generate orders. I may sound a bit like overkill but what happens is:
1) the first R process that only reads and aggregates, does not need to
allocate a lot of memory in the eWrapper structure because it only needs to
remember the last 10/20/50/100 bars in order to aggregate them correctly.
The aggregation result is then written to shared memory/file. It is
therefore very fast and memory efficient
2) The 'client' R processes who operate on the aggregated data and do the
heavy lifting in terms of indicator calculation can be switched on and of as
you see fit. That would be a way of testing out the capacity of your machine
Cheers
Soren
http://censix.com
-----
http://censix.com
--
View this message in context: http://r.789695.n4.nabble.com/IBrokers-persistant-data-eWrapper-tp3781308p3783300.html
Sent from the Rmetrics mailing list archive at Nabble.com.
More information about the R-SIG-Finance
mailing list