r code for backtesting library