Reinforcement learning in trading (Part 1)

  1. Environment: the class containing instructions about possible actions at each step (e.g. You can’t close if you have no open positions), information about commissions and price slippage, your portfolio value, etc.
  2. Metrics: these are the inputs for your agent. It can be simple prices, or vector of more sophisticated values: RSI, EMA crossover, etc.
  3. NN: Neural Net is the engine of the RL agent.
  4. Agent: agent contains instructions about calculating q-values, exploration probabilities, strategies to find the best action (Double, Dueling q-learning, etc.).
  5. Reward scheme: there are plenty of possibilities to implement: intolerance to being idle, Sharpe ratio of possible future rewards, etc.
  6. Learning loop



Finance + Data + Python.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store