jesse-ai / jesse

An advanced crypto trading bot written in Python
https://jesse.trade
MIT License
5.73k stars 732 forks source link

Is leverage working fine in backtest ? #461

Closed NicoSan20 closed 4 months ago

NicoSan20 commented 4 months ago

Hello, I find something strange. I'm using version 0.48.6 and if I take one of your strategy examples (e.g. SMACrossover or another) from your github repository (https://github.com/jesse-ai/example-strategies/blob/master/SMACrossover) and run backtests with different leverage (2, 10 and 20), the result is almost the same every time. This is strange, because the result should change significantly. Maybe I'm doing something wrong? Could you check and confirm that is not a bug? Also, I see no trace of leverage in the logs. I'm new here and maybe should I adapt something in the example? Thank you for your help.

saleh-mir commented 4 months ago

Hi,

Please read: https://docs.jesse.trade/docs/strategies/api#balance https://docs.jesse.trade/docs/strategies/api#available-margin https://docs.jesse.trade/docs/strategies/api#leveraged-available-margin

please use Discord for such questions and use this repository only if it's an issue in the code.