You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Im new to Hummingbot and Im trying to backtest a custom script I've made.
The goal of the the strategy would be to check prices differences between 2 perp exchanges and if the spread is more than X%, I open a long on exchangeA and a short on exchangeB (or the opposite) and when the price spread is less than Y% I close the trade.
So I would like to backtest it to find good values and also understand how all of this work.
In docs I can't find custom script being backtesting instead of https://github.com/hummingbot/hummingbot/blob/master/scripts/utility/backtest_mm_example.py
But it's not a real script executing strategy.
I also watched videos on the Dashboard and Deploy repos but it seems to be backtesting on pre existing strategies.
So I would like to know if I can backtest my strategy using my script or I should code another one which has the same logic but which is not using the function like buy and sell etc,
At the beginning I thought I could launch a command, like backtest --script ... and it will replace the 'current data' with candles or any test data and also automaticly understand that the buy should be a fake buy etc to backtest.
Currently, I can launch the script with paper trades using Hummingbot, it's working but I'm looking for backtesting it.
Hi @Nicoalz good day
Backtesting using custom script is not yet available on our dashboard however its also been discussed that its a good feature to add on later versions. Currently the dev team is hands full on their current tasks and we can't provide a timeframe yet.
Also im moving this issue to dashboard repo 🙏🏼
rapcmia
changed the title
How to backtest custom script
Dashboard - How to backtest custom script
Sep 10, 2024
Hi, Im new to Hummingbot and Im trying to backtest a custom script I've made.
The goal of the the strategy would be to check prices differences between 2 perp exchanges and if the spread is more than X%, I open a long on exchangeA and a short on exchangeB (or the opposite) and when the price spread is less than Y% I close the trade.
So I would like to backtest it to find good values and also understand how all of this work.
In docs I can't find custom script being backtesting instead of https://github.com/hummingbot/hummingbot/blob/master/scripts/utility/backtest_mm_example.py
But it's not a real script executing strategy.
I also watched videos on the Dashboard and Deploy repos but it seems to be backtesting on pre existing strategies.
So I would like to know if I can backtest my strategy using my script or I should code another one which has the same logic but which is not using the function like buy and sell etc,
At the beginning I thought I could launch a command, like backtest --script ... and it will replace the 'current data' with candles or any test data and also automaticly understand that the buy should be a fake buy etc to backtest.
Currently, I can launch the script with paper trades using Hummingbot, it's working but I'm looking for backtesting it.
Can anyone help me on all of this ?
Details:
Platform: macOS 14.4.1
IDE: PyCharm
Humming bot version = "20240703"
I launch script with
start --script custom_script.py
And the file is in :
scripts/custom_script.py
Here is my code (not a python expert btw) :
The text was updated successfully, but these errors were encountered: