After a month of on-again, off-again coding, I’ve finally completed a web site geared towards calculating the Value at Risk of the average investor’s portfolio. The site is visualvar.com. The big idea was to combine the statistical and visualization tools of R (especially ggplot2) with the web interface of Drupal. While I’m happy with the results, I think this may only be the tip of the iceberg in mashing up these technologies. As a side note, I took a bit of a shortcut and I don’t actually have R running directly on the web server, which means I had to settle for ‘overnight’ calculations rather than ‘On-Demand’. But I still think it is a good proof of concept for combing Drupal with R.
For all the data lovers out there, below are some of my favorite visualizations that visualVaR produces using the users inputted portfolio. This one showing the rank correlation between the daily returns of the stocks in a portfolio (obviously the higher the dependency between two stocks, the greater the VaR).
And this one showing the 4 years of daily returns (the amount of data used in the VaR model) for a single stock in a portfolio, BP in the case.
I was a little hesitant to turn the site loose on the web, but I figured it would be best to just ’see what happens’. Please feel free to try it out, just cross your fingers that the server holds!