Text this: Foundations of reinforcement learning with applications in finance /