Investment strategies in R