by Guangming Lang
~1 min read


  • r

The R package quantstrat makes backtesting trading strategies easy. It is still under heavy development and can’t be installed from CRAN yet. You can install it from source and the process is straightforward.

Step1. Install these dependencies in R:


Step2. Go to R-forge and download the .tar.gz files for blotter and quantstrat, and run the following commands in R (change version numbers to reflect the version you downloaded):

install.packages("~/Downloads/blotter_0.8.17.tar", repos = NULL, type="source")
install.packages("~/Downloads/quantstrat_0.8.0.tar", repos = NULL, type="source")

Shiny is a tool that allows you to easily make and publish web apps using R. Using Shiny and Quantstrat, I made an app to backtest a couple of trading strategies on a group of vanguard funds.