Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instant pnl should be a percentage of change in the price? #16

Open
eugenioclrc opened this issue Feb 12, 2018 · 0 comments
Open

instant pnl should be a percentage of change in the price? #16

eugenioclrc opened this issue Feb 12, 2018 · 0 comments

Comments

@eugenioclrc
Copy link

I think the reward aka instant pnl in the code should be a percentage of change instead of a delta;

https://github.com/Prediction-Machines/Trading-Gym/blob/master/tgym/envs/trading.py#L117
instant_pnl = self._entry_price - self._exit_price

So if we got a very volatile market (like criptos) you will see lower rewards at first and grater rewards at the end, coudl be this a better approach:

instant_pnl = (self._entry_price - self._exit_price) / self._exit_price

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant