Updated Implementation&Backtesting.R