Text this: A generic optimisation framework for reinforcement learning in the foreign exchange market