Trading strategies implemented in R