add back test, and validate to trader.py