jesse-ai / example-strategies

Example trading strategies to get you started with Jesse
https://jesse.trade/
MIT License
161 stars 61 forks source link

Infinite leverage bug on TurtleRules #6

Closed SC4RECOIN closed 3 years ago

SC4RECOIN commented 3 years ago

Not sure if the framework is supposed to prevent this but it looks like there is some sort of infinite leverage but with TurtleRules.

 CANDLES              |
----------------------+--------------------------
 period               |     730 days (2.0 years)
 starting-ending date | 2019-01-01 => 2020-12-31

 exchange   | symbol   | timeframe   | strategy    | DNA
------------+----------+-------------+-------------+-------
 Binance    | BTC-USDT | 15m         | TurtleRules |

Executing simulation...  [####################################]  100%          
Executed backtest simulation in:  79.31 seconds

 METRICS                         |
---------------------------------+---------------------------------------------------
 Total Closed Trades             |                                              3387
 Total Net Profit                | 2.1018409500240173e+101 (2.1018409500240173e+99%)
 Starting => Finishing Balance   |                 10,000 => 2.1018409500240245e+101
 Total Open Trades               |                                                 1
 Open PL                         |                           2.6048058815054558e+100
 Total Paid Fees                 |                            1.377051240486709e+102
 Max Drawdown                    |                                 -570986489020.74%
 Annual Return                   |                           3.9330711124615176e+50%
 Expectancy                      |    6.205612488999156e+97 (6.205612488999156e+95%)
 Avg Win | Avg Loss              |    1.276752157717366e+100 | 9.504929229490002e+98
 Ratio Avg Win / Avg Loss        |                                             13.43
 Percent Profitable              |                                                7%
 Longs | Shorts                  |                                         53% | 47%
 Avg Holding Time                |              3.0 hours, 4.0 minutes, 46.0 seconds
 Winning Trades Avg Holding Time |             8.0 hours, 23.0 minutes, 35.0 seconds
 Losing Trades Avg Holding Time  |             2.0 hours, 39.0 minutes, 21.0 seconds
 Sharpe Ratio                    |                                             -0.98
 Calmar Ratio                    |                             6.888203465561576e+38

BT-2021-01-04T01-55-24

saleh-mir commented 3 years ago

Sorry for delay. This should be working fine with the latest update which brings leverage support