-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FOttStrategy Futures Strategy is very slow #261
Comments
The big problem is the loop in the indicator ( freqtrade-strategies/user_data/strategies/futures/FOttStrategy.py Lines 96 to 99 in f6ff657
The calculation of the value for each row relies on the value of the prior row - making vectorization of the calculation impossible (it needs to be calculated from top to bottom - row by row) - which is slow (especially with larger backtesting ranges). there is little "easy" things to be done here without modifying the indicator to not use this logic (which would make it a different logic/indicator). The best thing will be to throw more CPU power onto it - or use shorter timeranges for backtesting (or simply be patient). Neither of the two are within the scope of a sample-strategy-repository - but if you find this indicator implemented in a cythonized library, feel free to suggest using that library. |
Thank you Matt, I am no coder and still hoping someone would look into this. I took the easy road and put more CPU and RAM to work utilizing Mac M1 CPU which seems to run a lot faster now. Thanks a lot helpful as always. |
These strategies are meant to be used as guides for development and not for immediate use. It's unlikely anyone will look at this actively unless they decide to feed back any improvements. |
Hi Gents
I have been trying to backtest and been dry running the strategy for two days now on a local Pi. The strategy is very slow and most of the bot logic (Updating prices, canceling orders etc.) do not happen as specified in the config file. For example, performance could be stuck for hours before it actually updates. I am running on the latest version (July 22) and Python 3.9. Also, backtesting takes ages before it actually finishes. I believe the bot get stuck at some point since I never see the heartbeat log line at all. Could anyone help optimize the code to run faster?
Thanks
https://github.com/freqtrade/freqtrade-strategies/blob/main/user_data/strategies/futures/FOttStrategy.py
The text was updated successfully, but these errors were encountered: