Skip to content
Prev 562 / 15274 Next

Backtest trading strategies

Much as I love R, I had occasion to contemplate its limitations vis-?-vis Python this weekend, when I had to scrape brutally malformed HTML and actually found it to be fairly painless thanks to BeautifulSoup (http://www.crummy.com/software/BeautifulSoup/). Reading through the neat code (a mere 1000 lines with comments), it seemed pretty clear that the R equivalent would be much more cumbersome (just the OO aspect would be hard to replicate, not to mention the libraries BeautifulSoup can count on). But thanks to Rpy (http://rpy.sourceforge.net/), one can have the best of all worlds! Use Python for general programming tasks and take advantage of existing libraries, use R for data analysis and visualisation, and have everything on the same page for maintainability and clarity.

Cheers, 

Pijus