notadamking/RLTrader

Reasonable balances for trading

Open

#38 opened on Jun 12, 2019

View on GitHub
 (4 comments) (3 reactions) (0 assignees)Python (1,592 stars) (535 forks)batch import
bugenhancementhelp wanted

Description

Currently, agents buy and sell using unrealistic USD and BTC balances. For instance, during a debugging session I saw one agent executing this kind of trades:

Buying BTC balance USD: 0.004812330813060336 btc held: 2.5835011089138864 Net worth: 17707.373082848768 ============= Buying BTC balance USD: 0.0032082205420402242 btc held: 2.5835013414545522 Net worth: 17777.0501037559

It doesn't look like there is a logical lower bound on the USD and BTC that can be used in a trade. In real life one wouldn't try to (and couldn't) buy BTC with $0.0016.

Also, using correct number of decimals (i.e., 8 for BTC) is important for precision. That might be another bug actually.

Contributor guide