db insertion and work on backtester