notadamking/RLTrader

Reasonable balances for trading

Open

#38 建立於 2019年6月12日

在 GitHub 查看
 (4 留言) (3 反應) (0 負責人)Python (535 fork)batch import
bugenhancementhelp wanted

倉庫指標

Star
 (1,592 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南