notadamking / RLTrader

A cryptocurrency trading environment using deep reinforcement learning and OpenAI's gym
https://discord.gg/ZZ7BGWh
GNU General Public License v3.0
1.71k stars 537 forks source link

Added Weighted Unrealised Reward fn #88

Closed arunavo4 closed 5 years ago

arunavo4 commented 5 years ago

@notadamking Added Weighted Unrealised Reward Function. This is the best way to reward a agent in our case, that I have found in my experience.

notadamking commented 5 years ago

The current TradingEnv supports any reward_fn to be passed in as kwargs. All of the necessary data you need to calculate the weighted unrealized reward should already be available to you in the net_worths and account_history arguments of reward_fn.

A better solution (needed for me to review the PR), would be to create a new directory lib/rewards and a new file lib/rewards/weighted_unrealized.py, which implements the reward_fn interface outside of the scope of TradingEnv.

arunavo4 commented 5 years ago

Great I will try to work it out .