Feb
16
Python vs. R, from George Coyle
February 16, 2011 |
Can anyone comment on how Python compares to R as it pertains to trading testing/analysis? I already know R and am not seeing a lot of added benefit to learning Python vs becoming more proficient in R but I am probably missing something.
Phil McDonnell writes:
You could probably do almost anything you need in R. So adding Python not much of an improvement. I would say that the two languages are very different in how you approach a problem. R is much more oriented to telling it to operate on a vector of numbers or a times series or matrix object. You can do those types of operations very easily and efficiently with only a line or two of code. but if you try to write your own FOR loop to write up a procedure to do the same thing it will run shockingly slowly– something like 30 times slower. But usually there is a way to write the code up as a vector operation without a loop.
Python is more designed to be a procedural language where you write your own loops and procedures. It is designed to be efficient at that and gives you more low level control but at the cost of more lines of code and more detail from the programmer..
Comments
1 Comment so far
Archives
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- Older Archives
Resources & Links
- The Letters Prize
- Pre-2007 Victor Niederhoffer Posts
- Vic’s NYC Junto
- Reading List
- Programming in 60 Seconds
- The Objectivist Center
- Foundation for Economic Education
- Tigerchess
- Dick Sears' G.T. Index
- Pre-2007 Daily Speculations
- Laurel & Vics' Worldly Investor Articles
BS comparison