# ML classification algorithms give random profit [closed]

I use backtrader python framework to backtest ML classification algorithms to make decision to buy or to sell.

When I use RandomForest or other algorithms in scikit-learn packages it gives up to 55% of profit:

The next run of absolutely the same code and data (just next run) gives 22% of loss:

Why is that? And what are the methods to avoid such a big range of results? Less, but more stable profit is better :)

## closed as off-topic by LocalVolatility, chollida, Gordon, lehalle, QuantupleFeb 16 '17 at 13:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Questions seeking assistance in developing a trading strategy are off-topic as they are unlikely to be useful to other readers." – LocalVolatility, chollida, Gordon, Quantuple
If this question can be reworded to fit the rules in the help center, please edit the question.