[R-sig-finance] R vs. S-PLUS vs. SAS

David Kane dave at kanecap.com
Wed Dec 29 20:51:33 CET 2004


Apologies for taking so long to answer your question. I did equity
modeling with SAS from 1997 to 2001; indeed, for a brief shining
moment, my colleagues and I could plausibly claim to be the best SAS
programmers in Boston. Those were the days! I have been working with R
ever since. To my mind, there is no plausible reason for using SAS
instead of R for this task (other than concern with transition costs).

This is not to say that some smart people don't continue to use SAS
instead of R. Indeed, many folks at places like Numeric Investors, AQR
and BGI use SAS for equity modelling today. When it is reasonable,
this decision is based on concerns about the cost of converting
hundreds of pages of legacy code and/or the (lack of) desire among the
senior folks for learning new tools. When it is unreasonable, it is
based on a lack of understanding as to why SAS is such an unsuitable
tool for serious people.

Here are some highlights as to why you should use R instead of SAS
(and/or most other options) for equity modelling.

1) The memory issue is overwhelming a red herring, as many other
commentators have pointed out. This is especially true in equity
modelling where, unless you are working with daily data, memory
concerns should be the least of your worries. And, even in the case of
daily data, you would be much better off investing some time in
learning a relational database like PostgreSQL then in becoming
skilled at arcane SAS commands.

2) R encourages the good software development practices, especially
the use of test cases and documentation. There is no SAS equivalent to
R CMD check. This is extremely important. Quantitative finance is
largely an exercise in software development so ensuring that your code
does what you think it does, both today and in the future, is job 1.

3) R's graphics are superb. SAS's are pathetic.

4) Via Sweave, xtable and friends, R makes it very easy to practice
literate programming. 

5) R's tools for statistical analysis are superior to SAS's.

I have never heard anyone (knowledgable or otherwise) claim that, in
the absence of transition costs, SAS is better than R for equity
modeling. If you come across any such claim, I would be happy to
refute it.

I hope that this is helpful.

Dave


Hoon Kim writes:
 > Dear David
 > 
 > I appreciate sharing your experience using R in
 > finance.  I am also doing quant equity research and my
 > main tool is SAS.  I do not have much experience with
 > R at this stage and I am curious what is your opinion
 > on R vs. SAS.  My perception is SAS is much better in
 > handling large data sets, which is usually the case in
 > quant equity modeling.  Historical backtesting data
 > can be easily over several hundread megabites.  In my
 > opinion, other than the capability of handling large
 > data set in SAS, I think R is a more flexible
 > programming language.
 > 
 > Could you kindly share your thoughts with me on this
 > issue?  Do you have any problem in handling large data
 > sets in R?  How do you deal with large data set in R? 
 > Do you have recommendation on handling those large
 > data in R?
 > 
 > Thanks again for sharing your thoughts.
 > 
 > Best,
 > 
 > Hoon Kim



More information about the R-sig-finance mailing list