R vs MATLAB

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

  1. WS_MJH

    WS_MJH

    Just for my understanding: Is matlab a c# environment as compared to R which has its own language?
     
    #21     Jul 28, 2012
  2. No they are both unique high-level languages.

    Most of the quantitative stuff in R is written internally in fast C code now. (It is only fast if you can process whole lists/arrays at a time so you have to write your code that way for fastest performance, avoiding explicit loops where possible.)
     
    #22     Jul 28, 2012
  3. dloyer

    dloyer

    Many of the same vectorized matrix functions that make Matlab so nice were ported to the numpy library in python.

    It is a better programing enviroment than matlab and has many free libraries relatred to machine learning and stats.

    The maplab graphics library was also ported.

    I tried using Octave. It works great for smaller problems, but it is harder getting the more recent versions installed and I have had more trouble scalling up past class room projects.

    Python has a large following in research/data science/machine learning.

    Matlab is more polished.
     
    #23     Jul 28, 2012
  4. 2rosy

    2rosy

    the only reason matlab is still popular is because its given to students in college. so they come out, know it, and recommend it. Thats slowly being shifted to python and r. why pay for matlab when python is a free equivalent? but i do remember a manager of mine asking what is the enterprise python; for some reason he wanted to pay for something.
     
    #24     Jul 28, 2012
  5. crmorris-- Sounds like we are in the same boat...

    ($0)-- Time = money. The $free options could cost much more in the long run if not the best solution for this specific objective.

    Anyone else have experience transitioning from Excel/VBA over to R or MATLAB or similar?
     
    #25     Jul 28, 2012
  6. sle

    sle

    I have moved from Excel+VBA solution to a programming language (Matlab initially, now R) when I transitioned from trading rates to equity derivatives. It was a pain, but it was well worth it.
     
    #26     Jul 28, 2012
  7. gmst

    gmst

    I went through the links, in the end I came up with the conclusion that MATLAB is a better choice. Good documentation is extremely underrated. All the fools of the world wanting to save 2k but don't value their time that will be spent trying to learn trivial things in the beginning. Also, most human beings don't get rich. Maybe there is a connection between the thought processes.

    R being open source - who is responsible for quality control on all those libraries available out there? Grad students write a lot of code for fancier methods of regression etc. and for sure some of them at least don't understand the concepts completely. With MATLAB, you are sure that what you are getting has gone through proper QC.

    Also, I got the impression that predominant users of R are stat guys and finance guys go for MATLAB. Disclaimer: I myself use MATLAB - just an average user, not advanced user.
     
    #27     Jul 29, 2012
  8. sle

    sle

    That should have been the first sentence, you seem to be substituting personal choice for informed choice.

    I was a Matlab user myself, but converted to R almost completely by now. I think the key difference between the two is that R is diverse and pragmatic enough to be the core development tool for quantitative business, while Matlab will force you to have a number of other tools deployed.

    In terms of cost, once you factor in the license cost of all packages, even at individual level you are talking about real money. For a semi-decent quantitative business, you'd need the following tool boxes - Statistics Toolbox, Curve Fitting Toolbox, Financial Toolbox, Econometrics Toolbox, Datafeed Toolbox, Database Toolbox, Spreadsheet Link EX (for Microsoft Excel), Fixed-Income Toolbox, Financial Derivatives Toolbox. Each one is about a grand (I think some are $1500), so we are talking anywhere from 10 to 15 thousand. That is potentially a cost of an office space in the year one that you would have to go without because of your software choice.

    Really, have you actually played with Matlab finance libraries? Their exotic options and fixed income models are appalling, for example, despite whatever QC done.

    In general, you can't blindly trust any software out there and the advantage of open source is that you can look at the code and fix it yourself (assuming that you have the brains to do it). Also, the fact that you can wrap R around C++/C/Fortran code if you need super-speedy calculations is a bit plus.

    I would say that's not clear. I know a multi-billion hedge funds where most of risk analytics and research tools are built in R. As another indicator, did you notice that NuclearPhynance has a very active R thread in the Software section and does not have an active Matlab thread?
     
    #28     Jul 29, 2012
  9. gmst

    gmst

    Not really, infact I am always open to hear counter-opinion. Since you have used both MATLAB and R, I am definitely interested to hear what you have to say on topic.

    Exactly my point. I am not in favor of using 'very complex' models developed by MATLAB or R community. Rather, I am more interested in the developmental environment and here MATLAB is superior to R. Still, if I am time-constrained and I am forced to take a highly specialized function - I will be more confident if I am taking it from MATLAB, rather than some R package. As far as basic stuff like OLS etc. all the packages would be accurate. Its more important to rather know the key assumptions that make the particular technique valid.

    Didn't know that NP has a very active R thread. But maybe this points to the fact that everything in MATLAB is so simple to understand, learn and execute, whereas R involves a large learning curve, without a great documentation to boot.

    Agreed that there are hfs who are big users of R. I think that Infinium is a big user of R. But I know majority of hedgies and prop firms much prefer MATLAB over R for idea prototyping.
     
    #29     Jul 29, 2012
  10. I use Excel/VBA, R, and Postgresql for backtesting. How are you storing your data? In Excel only? I strongly recommend a database (MySQL, Postgresql, Sqlite, SQL Server, Oracle, etc).

    For integrating with Excel, VB.NET or C# might be an OK choice, although in terms of financial/statistical libraries R probably has the most abundant resources.

    For execution check what the API you're using supports.
     
    #30     Jul 29, 2012