Articles

R/Finance 2010: Registration Open

As posted by Dirk Eddelbuettel on R-SIG-Finance: R / Finance 2010: Applied Finance with R April 16 & 17, Chicago, IL, US The second annual R / Finance conference for applied finance using R, the premier free software system for statistical computation and graphics, will be held this spring in Chicago, IL, USA on Friday April 16 and Saturday April 17. Building on the success of the inaugural R / Finance 2009 event, this two-day conference will cover topics as diverse as portfolio theory, time-series analysis, as well as advanced risk tools, high-performance computing, and econometrics.

LSPM with snow

My last post provided examples of how to use the LSPM package. Those who experimented with the code have probably found that constrained optimizations with horizon > 6 have long run-times (when calc.max >= horizon). This post will illustrate how the snow package can increase the speed of the probDrawdown() and probRuin() functions on computers with multiple cores. This yields nearly linear improvements in run-times relative to the number of cores.

LSPM Examples

I have received several requests for additional LSPM documentation over the past couple days and a couple months ago I promised an introduction to LSPM. In this long-overdue post, I will show how to optimize a Leverage Space Portfolio with the LSPM package. Please use the comments to let me know what you would like to see next. Some copious notes before we get to the code: These examples are based on revision 26 31 from r-forge and will not work under earlier revisions (and may not work with later revisions).

Tactical asset allocation using blotter

NOTE: If you simply want to test strategies in R, please see the post: Tactical Asset Allocation Using quantstrat. quantstrat uses blotter behind the scenes, but provides a higher level of abstraction. blotter is an R package that tracks the P&L of your trading systems (or simulations), even if your portfolio spans many security types and/or currencies. This post uses blotter to track a simple two-ETF trading system. The contents of this post borrow heavily from code and comments in the “longtrend” demo script in the blotter package.

opentick alternatives

I’ve been getting a bit of traffic from people searching for opentick (the defunct company), so I’ve started a list of similar (but non-free) data providers. I’m not affiliated with any of these vendors, and the list is in no particular order. I’ll update this post as more information becomes available. IQFeed - features, fees, API** - starts at $60/month* - OS: Windows - Same API as DTN.IQ eSignal - features, fees, API**

Xasax closes shop

Six months after shutting down opentick completely Xasax (opentick’s parent company) has followed suit. It looks like Xasax hit funding problems in August… Inside Market Data mentions the above in this story. Here is the full story (subscription required).

Update

I can’t believe it’s been two months since I last posted… wow, time has a way of slipping through my fingers. Here’s a short list of some upcoming posts: An introduction to LSPM – a new R package that implements Ralph Vince’s leverage space portfolio model (co-authored with Soren Macbeth). Updated charting with quantmod. An introduction to blotter – a transaction-based infrastructure for trading systems and simulation, providing support for multi-asset class and multi-currency portfolios.

David Varadi's RSI(2) alternative

Here’s a quick R implementation of David Varadi’s alternative to the RSI(2). Michael Stokes over at the MarketSci blog has three great posts exploring this indicator: Varadi’s RSI(2) Alternative: The DV(2) RSI(2) vs. DV(2) Last Couple of Notes on DV(2) Here’s the R code: DV <- function(HLC, n=2, bounded=FALSE) { # "HLC" is an _xts_ object with "High", "Low", and "Close" # columns, in that order. # This is David Varadi's alternative to the RSI(2).

RSI(2) Evaluation

This post continues the series of investigating the RSI(2) strategy. The first post replicated this simple RSI(2) strategy from the MarketSci Blog using R. The second post showed how to replicate the strategy that scales in/out of RSI(2). If you like the RSI(2), be sure to check out David Varadi’s RSI(2) alternative! This post will use the PerformanceAnalytics package to evaluate the rules that scale in/out of positions. I’ve also provided a simple function that provides some summary statistics.

Packages featured with Inference for R

quantmod, TTR, and xts were (not so) recently featured on the Inference for R Blog. Inference for R is a Integrated Development Environment (IDE) designed specifically for R. The post gives an example of how to easily perform advanced financial stock analysis using Inference in Excel. I appreciate how they’re making R more accessible to a general audience, even though I like a command line interface and my preferred development environment is vim.