R vs MATLAB

Discussion in 'App Development' started by a-greenwell, Jul 25, 2012.

  1. http://en.wikipedia.org/wiki/RExcel (among couple others)

    Matlab offers connectivity too but you need to buy a toolbox I think.

    Again, R and Matlab get you pretty much the same for what you described, R is free, Matlab not. You make the decision...


     
    #61     Aug 1, 2012

  2. I'm not sure about MATLAB, but R can call C++ functions. So, for example, some libraries in R are already written in C/C++ with an R wrapper.

    For integration with Excel, it depends what you mean by "integration". Pretty much anything can output (and input) .csv files.
     
    #62     Aug 2, 2012
  3. MEX files.
     
    #63     Aug 2, 2012
  4. You'd integrate R into Java. The java code runs the show, Order Management in particular, and you would call the REngine only for the model + calculations + decision-making. Integrating R into Java is quite easy using JRI. This is what I did and I am quite happy with the results.
     
    #64     Aug 2, 2012
  5. Annoyingly, a lot of the time working in a bank you'll be frustrated by the IT department making up devilishly silly rules about how to manage and deploy your Java / C++ / C#.

    However, if you stick to R / Python, you can do pretty much whatever you like.

    Sometimes that's reason enough to make a decision. Lesser of two evils.
     
    #65     Aug 4, 2012
  6. I don't really follow your point. Any real quant trader and quant strategists worth his salt can have as many displays, hard drives, IDEs, as he/she wants. Its the small guys who are stuck with one or two displays and hardly any rights, but those same guys generally highly correlate with individuals who are not self-driven and need to be told what to do and need to be constantly monitored and performance evaluated.

    I myself nor others I have talked to, worked with, or met, who actually devise new strategy, work with programming teams to have them implemented and trade the risk of them, have never encountered problems with IT departments nor my boss in regards to what you mentioned. Sure, ordering some fancy video cars, screen setup, some new application may take a little while because it needs to go through the approval process or needs to be tested by the IT department but other than that I have not seen that investment banks or hedge funds throw stones in the way of true producers...so in that I can totally not second your story.

    By the way, this has nothing to do with what software you use, actually IT departments are a lot more comfortable with commercial "commodity" applications such as Matlab than open source stuff, especially when "quants" constantly download new and totally untested libraries. Secondly, its about the communication channels to the outside world not the app itself. Some ports are just off discussion but most others can even be opened if the rational behind such request is there.


     
    #66     Aug 6, 2012
  7. #67     Aug 24, 2012
  8. nocloud

    nocloud

    I think R and Matlab are both unsuitable for true HFT, OOP C++ is the only route...
     
    #68     Aug 25, 2012
  9. You can still use R very usefully, but not necessarily as part of the real-time processing or the low-level processing.

    At a minimum, you can run its PerformanceAnalytics package on your final trading system *results* and it will compute several different versions of the Sharpe Ratio and numerous other useful statistical measures.

    Actually, R packages like XTS are written in finely-honed fast C and are fine provided you can pass all of the data in at once in arrays to the functions written in C. In this case you *are* running superbly honed C code on your data within the function call.

    But if you have to iterate a lot outside those functions in interpreted R, yes it will be too slow.

    There is no need to think of using R for everything. Just use it for the statistical analysis. Do the actual quote stream processing and trade entry in another language. This is what people most likely have in mind, not using R for everything.

    Excel and C do not off-the-shelf have adequate capabilities on their own to do things like correlation analysis, cointegration analysis, options greek analysis etc. robustly. There are add-on C packages you can buy (many quite expensive) that can be used for these capabilities, and they can be very useful , but R may be an easier way for an initial first cut.

    As to Matlab, the $2500 will only buy a starter kit. To begin to match R for financial work, you have to add a number of Matlab financial add-ons with yearly licenses that take the cost to maybe $5000 a year, and in the end you do not have everything that R has in the financial area.
     
    #69     Aug 25, 2012
  10. sle

    sle

    It's not like R has anything that can be used to market-making either (nor do any commercial packages actually calculate greeks well enough to be included in the AMM process), but the Rmetrics stuff is usually good enough for simple portfolio management.
     
    #70     Aug 25, 2012