R for datamining/backtesting/trading

Discussion in 'App Development' started by caementarius, Mar 6, 2012.

  1. Actually I think R may by now be one of the best and most popular tools for analyzing large quantities of intra-day data, *provided* you use vector operations and the newer packages that support them. These then run at the speed of C (since these packages are written in C).

    The main tools to use to hold large time-series data within R are either data.table and/or xts. Both of these now support efficient access down to milliseconds in large data file. Plus you can aggregate, extract etc. lightening fast using sql-like syntax on efficiently-stored in-memory data, and of course plot, run statistics, develop trading systems, etc.

    You will find lots of people using R for intra-day data at
    http://stackoverflow.com/questions/tagged/r+time-series

    See

    Answers at
    http://quant.stackexchange.com/ques...implementation-for-representing-a-time-series

    http://itp.nyu.edu/~gh726/ITProcess/2012/05/data-intraday-trading-data-and-r/

    http://www.r-bloggers.com/tick-data-retrieval/

    https://stat.ethz.ch/pipermail/r-sig-finance/2009q2/004118.html

    http://www.rinfinance.com/agenda/2012/talk/JeffRyan.pdf (previously referred to)

    http://www.r-bloggers.com/access-data-quickly-and-easily-data-table-package/
     
    #51     Dec 30, 2012
  2. Mr_You

    Mr_You

    Yes, of course you can use R to analyze intra-day data, but in response to his question regarding my previous post I stated specifically:

    "the trading specific tools for R were not written for intra-day time frames analysis"

    Please post an update when/if the trading tools have been updated/improved for intra-day multi-time frame analysis. Thanks.
     
    #52     Dec 30, 2012
  3. Well, one recent addition is the high-frequency package:

    http://cran.r-project.org/web/packages/highfrequency/index.html
    http://cran.r-project.org/web/packages/highfrequency/vignettes/highfrequency.pdf

    Of course xts and data.table have been enhanced too to support higher-frequency data better but they are not only for trading data.
     
    #53     Dec 30, 2012
  4. ...but I agree that some packages such as TradeAnalytics are showing their age in a high-frequency word. They may eventually be replaced by other tools for high-frequency rather than enhanced......
     
    #54     Dec 30, 2012
  5. sf631

    sf631

    Wow comintel. Fantastic find
     
    #55     Jan 4, 2013