Adds invest.R function with common methods