Reinforcement learning and online learning for dynamic trading strategies