kkuette / TradzQAI

Trading environnement for RL agents, backtesting and training.
Apache License 2.0
164 stars 47 forks source link

We cant afford any contract. #18

Closed dropcunt closed 5 years ago

dropcunt commented 5 years ago

I get this error even though i set the wallet to a high amount. Can anybody help?

File "C:\Users\Miner_cunt\projects\TradzQAI\TradzQAI\core\environnement\base\wallet.py", line 199, in manage_exposure raise ValueError('current_max_pos : {:.3f} We cant afford any contract. Please check wallet settings.'.format(self.risk_managment['current_max_pos'])) ValueError: current_max_pos : 0.000 We cant afford any contract. Please check wallet settings.

Thanks

kkuette commented 5 years ago

Can you show your config/environnement.json ?

dropcunt commented 5 years ago

Thanks for your help! here is what it looks like:

{ "base": { "data_directory": "data/", "episodes": 5, "targeted_return": 2 }, "contract": { "allow_short": false, "contract_price": 0, "contract_size": 1, "contract_type": "classic", "pip_value": 1, "spread": 0.1 }, "reward": { "no_negative": true, "period": 0, "type": "pnl" }, "risk_managment": { "exposure": 10, "max_pos": 10, "stop_loss": 20 }, "states": { "preprocessing": "sigmoid", "window": 20 }, "wallet": { "capital": 200, "fee": 0.5 } }

kkuette commented 5 years ago

Do you use crypto datasets ? What's the price ? By the way, i've already answered to this question here #4