Sunday, December 26, 2010

R/Finance 2011 Call for Papers

The 2011 R/Finance conference has an updated call for papers.  Dirk Eddelbuettel announced it to the R-SIG-Finance mailing list.  I've reproduced his email in its entirety below.  Let me know if you plan on attending.

Subject: R/Finance 2011: Call for Papers: Now with prizes and travel money

Dear R / Finance community,

The preparations for R/Finance 2011 are progressing, and due to favourable responses from the different sponsors we contacted, we are now able to offer
  1. a competition for best paper, which given the focus of the conference will award for both an 'academic' paper and an 'industry' paper
  2. availability of travel grants for up to two graduate students provided suitable papers were accepted for presentations
More details are below in the updated Call for Papers. Please feel free to re-circulate this Call for Papers with colleagues, students and other associations.

Cheers, and Season's Greetings,
Dirk (on behalf of the organizing / program committee)

Call for Papers:

R/Finance 2011: Applied Finance with R
April 29 and 30, 2011
Chicago, IL, USA

The third annual R/Finance conference for applied finance using R will be held this spring in Chicago, IL, USA on April 29 and 30, 2011.  The two-day conference will cover topics including portfolio management, time series analysis, advanced risk tools, high-performance computing, market microstructure and econometrics. All will be discussed within the context of using R as a primary tool for financial risk management, portfolio construction, and trading.

Complete papers or one-page abstracts (in txt or pdf format) are invited to be submitted for consideration. Academic and practitioner proposals related to R are encouraged. We welcome submissions for full talks, abbreviated "lightning talks", and for a limited number of pre-conference (longer) seminar sessions.

Presenters are strongly encouraged to provide working R code to accompany the presentation/paper.  Data sets should also be made public for the purposes of reproducibility (though we realize this may be limited due to contracts with data vendors). Preference may be given to presenters who have released R packages.

The conference will award two $1000 prizes for best paper: one for best practitioner-oriented paper and one for best academic-oriented paper.  Further, to defray costs for graduate students, two travel and expense grants of up to $500 each will be awarded to graduate students whose papers are accepted.  To be eligible, a submission must be a full paper; extended abstracts are not eligible.

Please send submissions to: committee "at"

The submission deadline is February 15th, 2011.  Early submissions may receive early acceptance and scheduling.  The graduate student grant winners will be notified by February 23rd, 2011.

Submissions will be evaluated and submitters notified via email on a rolling basis. Determination of whether a presentation will be a long presentation or a lightning talk will be made once the full list of presenters is known.

R/Finance 2009 and 2010 included attendees from around the world and featured keynote presentations from prominent academics and practitioners. 2009-2010 presenters names and presentations are online at the conference website. We anticipate another exciting line-up for 2011--including keynote presentations from John Bollinger, Mebane Faber, Stefano Iacus, and Louis Kates.  Additional details will be announced via the conference website as they become available.

For the program committee:

       Gib Bassett, Peter Carl, Dirk Eddelbuettel, Brian Peterson,
       Dale Rosenthal, Jeffrey Ryan, Joshua Ulrich

Tuesday, December 14, 2010

Why Use R?

I use R very frequently and take for granted much that it has to offer.  I forget how R is different from similar tools, so I have trouble communicating the benefits of using R.  The goal of this post is to highlight R's main strengths, but first... my story.

How I got started with R

I was introduced to R while I was working as a Research Analyst at the Federal Reserve Bank of St. Louis.  I wanted to do statistical analysis at home but the tools I used at work (GAUSS and SAS) were expensive, so I started doing my analysis in Excel.

But as my analysis became more complex, the Excel files became large and cumbersome.  The files also did not document my thought process, which made it difficult to revisit analysis I had started several months earlier.  I asked my fellow analysts for advice and one introduced me to R and Modern Applied Statistics with S.  Thus began my auto-didactic journey with R.

Why should you use R?

R is the leading tool for statistics, data analysis, and machine learning.  It is more than a statistical package; it’s a programming language, so you can create your own objects, functions, and packages.
Speaking of packages, there are over 2,000 cutting-edge, user-contributed packages available on CRAN (not to mention Bioconductor and Omegahat).  To get an idea of what packages are out there, just take a look at these Task Views.  Many packages are submitted by prominent members of their respective fields.
Like all programs, R programs explicitly document the steps of your analysis and make it easy to reproduce and/or update analysis, which means you can quickly try many ideas and/or correct issues.
You can easily use it anywhere.  It's platform-independent, so you can use it on any operating system.  And it's free, so you can use it at any employer without having to persuade your boss to purchase a license.
Not only is R free, but it's also open-source.  That means anyone can examine the source code to see exactly what it’s doing.  This also means that you, or anyone, can fix bugs and/or add features, rather than waiting for the vendor to find/fix the bug and/or add the feature--at their discretion--in a future release.
R allows you to integrate with other languages (C/C++, Java, Python) and enables you to interact with many data sources: ODBC-compliant databases (Excel, Access) and other statistical packages (SAS, Stata, SPSS, Minitab).
Explicit parallelism is straightforward in R (see the High Performance Computing Task View): several packages allow you to take advantage of multiple cores, either on a single machine or across a network.  You can also build R with custom BLAS.
R has a large, active, and growing community of users.  The mailing lists provide access to many users and package authors who are experts in their respective fields.  Additionally, there are several R conferences every year.  The most prominent and general is useR.  Finance-related conferences include Rmetrics Workshop on Computational Finance and Financial Engineering in Meielisalp, Switzerland and R/Finance: Applied Finance with R in Chicago, USA.
I hope that's a helpful overview of some benefits of using R.  I'm sure I have forgotten some things, so please add them in the comments.

Tuesday, December 7, 2010

Build RQuantLib on 32-bit Windows

Before you start, note that there is now a Windows binary of RQuantLib is available on CRAN.

Due to a change in how R-2.12.0 is built, CRAN maintainers could no longer provide a Windows binary of RQuantLib with the QuantLib library they had been using. I decided to try and build an updated QuantLib library from source, which would allow me (and them) to build the current RQuantLib.
Instructions for Getting Started with QuantLib and MinGW from Scratch by Terry August (found in QuantLib FAQ 3.2) were incredibly valuable.  Thanks to Dirk Eddelbuettel for helpful guidance and pointers while I was working through this exercise, and for useful comments on this blog post.

Here are the steps I took.  You will need to modify the paths to suit your particular setup.
  1. Download and install Rtools.
  2. Download and install MinGW.
  3. Download boost (I used boost_1_42_0.tar.gz)
    unzip to c:/R/cpp/boost_1_42_0
    We only need the headers, so there's nothing to install.
  4. Download QuantLib (I used
    unzip to c:/R/cpp/QuantLib-1.0.1
  5. Install Quantlib. The make and make install commands are going to take quite some time. I think they took about 2 hours on my 3.4Ghz system. Let's get started. Open a msys command line and run:
    set PATH=c:/MinGW/bin:$PATH
    cd c:/R/cpp
    mkdir lib include
    cd QuantLib-1.0.1
    configure --with-boost-include=c:/R/cpp/boost_1_42_0 --prefix=c:/R/cpp
    make install
    cd c:/R/cpp/lib
    cp libQuantLib.a libQuantLib.a.bak
    strip --strip-unneeded libQuantLib.a
  6. Download the RQuantlib source (I used RQuantLib_0.3.4.tar.gz)
    unzip it to c:/R/cpp/RQuantLib
  7. Open c:/R/cpp/RQuantLib/src/ and ensure
  8. Make the following directories:
    then copy:
    c:/R/cpp/boost_1_42_0/boost to c:/R/cpp/QuantLibBuild/boost
    c:/R/cpp/include/ql to c:/R/cpp/QuantLibBuild/ql
    c:/R/cpp/lib/libQuantLib.a to c:/R/cpp/QuantLibBuild/lib/libQuantLib.a
  9. Now you should be able to build RQuantLib via:
    set QUANTLIB_ROOT=c:/R/cpp/QuantLibBuild
    R CMD INSTALL RQuantLib_0.3.4.tar.gz
I cannot guarantee these instructions will work on a 64-bit system because I do not have access to a 64-bit Windows machine, but the steps should be fairly similar.  If you run into any issues, feel free to leave a comment and I will do my best to help.

If you just want to use my build, you can install this RQuantLib_0.3.4 Windows binary.