separate out Trader.R (related to #11)