R vs MATLAB

Quote from WS_MJH:

Just for my understanding: Is matlab a c# environment as compared to R which has its own language?

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.)
 
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.
 
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.
 
Quote from crmorris:



i run on hundreds of stocks live via excel (people who harp on speed simply don't understand their own speed or how to optimize excel). i'm debating moving my strategies to python or r to add functionality and prototyping speed --- can't decide, and it's a big investment so want to get it right. i guess i could always use rpy and do both.

suggestions?

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?
 
Quote from a-greenwell:
Anyone else have experience transitioning from Excel/VBA over to R or MATLAB or similar?
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.
 
Quote from a-greenwell:

From what I can gather this is a never-ending question. Narrowing it down a bit... can anyone make a recommendation (R vs Matlab) for someone heavily invested in Excel/VBA? In other words... which option will integrate better with Excel?


on nuclearphynance:

Matlab vs R vs Mathematica vs X vs Y vs ....
http://www.nuclearphynance.com/Show Post.aspx?PostIDKey=138632

Matlab versus R
http://www.nuclearphynance.com/Show Post.aspx?PostIDKey=91257

Matlab for Beginners
http://www.nuclearphynance.com/Show Post.aspx?PostIDKey=132499

also found info on quant.stackexchange.com:

What programming languages are most commonly used in quantitative finance?
http://quant.stackexchange.com/ques...re-most-commonly-used-in-quantitative-finance


side note: looks like R has some strong webapp capabilities
http://yeroon.net/ggplot2/

also: Octave appears to be pretty popular as a basic/free MATLAB

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.
 
Quote from gmst:
Disclaimer: I myself use MATLAB - just an average user, not advanced user.
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.

Quote from gmst:
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.
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.

Quote from gmst:
Also, I got the impression that predominant users of R are stat guys and finance guys go for MATLAB.
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?
 
Quote from sle:

That should have been the first sentence, you seem to be substituting personal choice for informed choice.
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.

Quote from sle:

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.

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.

Quote from sle:


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?

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.
 
Quote from a-greenwell:

I'm looking to expand one of my systems (100+ trades per day) and I'm thinking either R or MATLAB would be a better tool for the job (mostly research/backtesting, possibly execution down the road).

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.
 
Back
Top