growth() returns NA for all values because growth <- cumprod(1 + ROC(price, ...) * signals) and ROC() returns an NA for the first value in a series. cumprod cannot handle the NA and returns NAs for everything.
Example:
IBM <- getYahooData('IBM')$Open
growth(IBM, rep(1, nrow(IBM)))
growth() returns NA for all values because growth <- cumprod(1 + ROC(price, ...) * signals) and ROC() returns an NA for the first value in a series. cumprod cannot handle the NA and returns NAs for everything.
Example: IBM <- getYahooData('IBM')$Open growth(IBM, rep(1, nrow(IBM)))