R S4 class to back test investment portfolios