tensortrade-org / tensortrade

An open source reinforcement learning framework for training, evaluating, and deploying robust trading agents.
https://discord.gg/ZZ7BGWh
Apache License 2.0
4.45k stars 1.01k forks source link

[potentially a bug] SimpleOrder: comparing BTC unit to USD unit #454

Open spacegoing opened 1 year ago

spacegoing commented 1 year ago

This part of logic is potentially a bug:https://github.com/tensortrade-org/tensortrade/blob/cc6bd19fbb8451c7972a3a08132407f508c4d47b/tensortrade/env/default/actions.py#L261-L266

For a USD/BTC pair, when the side is sell, quantity is measured in BTC. However, or size < self.min_order_pct * portfolio.net_worth \ is comparing BTC against USD. Is this potentially a bug?

What is the purpose of this condition?

Many thanks!