[R-SIG-Finance] Live Algo Trading

Jeff Ryan jeff.a.ryan at gmail.com
Thu Dec 24 06:31:48 CET 2009


Using R as a live trading platform is really on a case by case basis.

For 1 minute bar trading, with limited computational overhead, R is a
perfectly workable solution.  Inside of that time-frame, things may
get difficult.

A multitude of factors should be considered.  First and foremost would
be R proficiency.  quantmod isn't up to the plug and play task of
automated trading (yet?!).  So you'd need to do quite a bit of work to
get things up to speed.  It is doable, but you'll either be writing a
lot of code yourself to fill in some infrastructure bits, hiring
someone to do it for you, or most likely a combination of the two.
And it will take time.  All worthwhile things do.

The IBrokers package is a decent example of what you can do.  Run
across multiple sessions on a multicore platform, you can manage to
process as much data as IB will let you.  You'll not be able to take a
raw feed from a real data source of course (think millions of messages
a second).  Preprocessed (limited symbols, aggregation, many cores,
capture-engine intermediary, etc), and you are getting closer to
'real-time' reality.

The advantage to myself and those I know who *do use* the above
approach, is that you can think in "R".  If you are doing backtesting,
post-analysis, etc in R, it is a quasi-natural fit to move the
execution into R.

Another approach taken is to keep the execution stuff outside of R
(C++ or Java for example), and simply make calls to R when needed.  Of
course if your logic relies on the R code, you are still imposing the
same potential limit on the total process.

Simple take away: it is possible, but not easy.  You gain an
incredible amount of flexibility and speed of development (if R-versed
already), but the trade-off is in raw processing capacity.  A strategy
relying on ticks or orderbook data with only R would likely be
suicide.  15s to end-of-day style, very doable.

Best,
Jeff


On Wed, Dec 23, 2009 at 10:55 PM, tradetree <stock at ancientsaturn.com> wrote:
>
> I wanted to see if there are people using R and quantmod to trade live, or
> only as an off-line tool for algorithm development?  I am evaluating
> ActiveQuant and R to decide what to use for a live trading platform.  I am
> coming from Tradestation and right now considering AQ and the IB interface.
>
> It is very hard to find an overview of approaches and pros/cons for
> automated trading.  Some people use AQ for the trading engine but do algo
> development in R and quantmod.  Is this a recommended direction?
>
>
> --
> View this message in context: http://n4.nabble.com/Live-Algo-Trading-tp978300p978300.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>



-- 
Jeffrey Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics
www.insightalgo.com



More information about the R-SIG-Finance mailing list