first commit backtest code