Skip to content

R and exchanges

3 messages · Molins, Jordi, Dirk Eddelbuettel, Gabor Grothendieck

#
I sent a question to the general Help. I received an answer from Patrick
Burns, and he suggested me to post it here. The question is how to use batch
files that call R in an effective way. More:

What I need is to interact with other applications(a connection to
exchanges, like Eurex, Liffe, CBOT and eventually to something like ESB in
FX). So, if I get a price from the exchanges, I want that R makes a
calculation. But to get R connected to the exchanges is complex, so what I
have thought is to have an external program that connects to the exchanges,
then gets the prices and saves them to a txt file, then R is opened, the txt
file is read, the calculations are performed, and the results are saved into
another txt file. Then, another application reads the new txt file and sends
a message to the exchanges.

This is what I want to do.

Does anybody have some ideas about it?

Thank you!

Jordi



--------------------------------------------------------------------------------
The information contained herein is confidential and is inte...{{dropped}}
#
On 2 December 2005 at 14:15, Molins, Jordi wrote:
| I sent a question to the general Help. I received an answer from Patrick
| Burns, and he suggested me to post it here. The question is how to use batch

Umm, why? Nothing finance-specific here.

| files that call R in an effective way. More:
| 
| What I need is to interact with other applications(a connection to
| exchanges, like Eurex, Liffe, CBOT and eventually to something like ESB in
| FX). So, if I get a price from the exchanges, I want that R makes a
| calculation. But to get R connected to the exchanges is complex, so what I
| have thought is to have an external program that connects to the exchanges,
| then gets the prices and saves them to a txt file, then R is opened, the txt
| file is read, the calculations are performed, and the results are saved into
| another txt file. Then, another application reads the new txt file and sends
| a message to the exchanges.
| 
| This is what I want to do.
| 
| Does anybody have some ideas about it?

Sure. Control R from another app. Python is popular, and there is RPy to
call/control R from Python. There is also, as I recall, a Perl package to do
something similar.

Or you just write everything in R as R has basic tcp/ip networking built in.

Dirk
#
See ?socketConnection or if they supply a COM object see the
RDCOMClient or rcom packages.  In that case there is no need for
anything beyond R.
On 12/2/05, Molins, Jordi <Jordi.Molins at drkw.com> wrote: