MoniGoMani
MoniGoMani copied to clipboard
✨ HyperOpt over 3 separate timeranges & individual spaces
The idea here is to:
HyperOpt over 3 separate timeranges (one representing each individual kind of trend, downwards/sideways/upwards, a timeframe that represents a corresponding trend should be picked). Experimental idea though, might not work at all.
How this would be implemented:
- Make a version of MoniGoMani with 1 third of the parameters (basically no trend detection, but all the current signals etc remain)
- HyperOpt that light version 3 times (once for upwards, once for downwards, once for sideways)
- Combine those 3 hyperopt results (for each trend one) in the main MoniGoMani file again, and cross dem fingers :rofl:
Hi Rik, can you please asssign this issue to me?I will start testing it tonight. Thanks.
I can finally post the results of the above test. 3 timeranges have been used that represent a different trend each followed by a final HO on a timerange that represents the current market. A vanilla HO has been used to compare against. Lastly a max_open_trades 6 backtest has been performed against both HOs.
Downtrend timerange:20210509-20210524 Uptrend timerange: 20210127-20210221 Sidetrend timerange: 20210518-20210610 Final timerange: 20210425-20210610
Final Trend_HO
Default go-to-command timerange for backtesting
Default go-to-command timerange for backtesting max_open 6
Timerange used to HO
Timerange used to HO max_open 6
Downtrend Timerange
Downtrend TImerange Max_open 6
Uptrend Timerange
Uptrend Timerange Max_open 6
Sidetrend Timerange
Sidetrend Timerange Max_open 6
Vanilla test results
Final HO
Default go-to-command timerange for backtesting
Default go-to-command timerange for backtesting Max_open 6
Timerange used to HO
Timerange used to HO Max_open 6
Downtrend Timerange
Downtrend Timerange Max_open 6
Uptrend Timerange
Uptrend Timerange Max_open 6
Sidetrend Timerange
Sidetrend Timerange Max_open 6
Some more information about the test. Make signals only trigger once in lookback windows fix has not been implemented as the start day of the test was prior to the fix. The HO's have been optimized using max_open -1 so the backtest using max_open 6 is not a valid performance indication but a last minute test to check Drawdown improvements. The pairlist was generated by using the go-to-command and pulling 60 pairs after filtering, reducing that number might be beneficial in order to avoid smaller coins in our pairlist.
Very nice @3ylo! Thank you so much for the amazing test reports upon this issue! :mechanical_arm:
Review
Final HO:
- Pro: Avg duration ended up being a little less, which means less risk too!
- Con: Overall profit seems a bit lower (keep in mind that we recently decided to maybe start using 800ish epochs instead of 1000 to prevent overfitting)
Default go-to-command timerange for backtesting:
- Some zero-duration trades, but I'll neglect those for now, since they should have mostly been resolved by now with: https://github.com/Rikj000/MoniGoMani/issues/43 (However I notice there are slightly more in the new version which we should keep in mind!)
- Pro: Higher total profit :partying_face:
- Pro: Dradwown is decently less!
- Win/draw/lose ratio is better, but Avg duration winner/loser is not :thinking:
- FYI: As mentioned by the MGM Discord Community, we should aim to try and take rocketing pairs that create insane profits on a trade out by adding them to the blacklist or removing them from the static pairlist to prevent HyperOpt from overfitting on them
Default go-to-command timerange for backtesting Max_open 6: These results show less profits, but they do look comparable to the previous backtests! Indicating that we could probably safely HyperOpt over 6 pairs instead of the 15 we where doing now and still get comparable end results out of our HyperOpt. This would save us a lot of time HyperOpting!
Further we can conclude that a top 60ish VolumePairList would still be a better idea for dry/live, since we can see that more pairs should result in more profit since it gives MGM more "good" buying options! :tada:
Timerange used to HO:
- Con: First backtest where the new setup scores lower in profit! :eyes:
- Pro: Dradwown is still less!
Timerange used to HO Max_open 6: Dipping into negatives here :open_mouth: But I think / hope HyperOpting over a smaller pairlist without crazy rocketing pairs, will make HO try to look for better overall buy/sell signals!
Uptrend/Downtrend: Interesting, here we learn that the downtrend would be the most profitable trend for MGM to trade in at the moment! However we must keep slippage in mind, because during market crashes / bearish movements our bots might have a harder time to make the orders go through in time
Conclusion
Overall I think it seems like an improvement to the optimization process! :partying_face: But I'm not sure if the benefits outweigh the extra time needed for 4 HyperOpt Runs yet :thinking: We learned a ton here on how we can improve though!
HyperOpting separate spaces with the unclogger off in the beginning is also a big thing that plays in my head lately where I think we could see good improvements! Perhaps we could combine these 2 things :eyes:
Suggesion for new optimization process using this + separate spaces:
- 1st 3 trend individual HyperOpt Runs only done upon
--spaces buy sell
, with stoploss at -1 and ROI {"0": 10} (disabled) - Combined refinement HyperOpt Run doing
--spaces buy sell
- Individual space HyperOpt Run using
--spaces roi
- Individual space HyperOpt Run using
--spaces stoploss trailing
- Individual space HyperOpt Run using
--spaces sell
+ unclogger enabled
I'm trying to put my two cents in. Here are some results. --> Please let me know if I did it right, before I'm making the same mistakes over and over again ;-)
Config
spaces: buy sell
stoploss: -1
roi: {"0": 10}
unclogger: off
epochs: 1000
Downtrend (20210509-20210524)
HO run 1
Toggle
source .env/bin/activate; freqtrade hyperopt-list --hyperopt-filename=strategy_MoniGoManiHyperStrategy_2021-06-18_14-27-07.fthypt --best

HO run 2
Toggle
source .env/bin/activate; freqtrade hyperopt-list --hyperopt-filename=strategy_MoniGoManiHyperStrategy_2021-06-18_16-10-21.fthypt --best

HO run 3
Toggle
source .env/bin/activate; freqtrade hyperopt-list --hyperopt-filename=strategy_MoniGoManiHyperStrategy_2021-06-18_16-44-26.fthypt --best

Backtest results Downtrend timerange (20210101-20210316)
Toggle
source .env/bin/activate; freqtrade backtesting -s MoniGoManiHyperStrategy -c ./user_data/mgm-config.json -c
./user_data/mgm-config-private.json -c ./user_data/mgm-config-hyperopt.json --timerange 20210101-20210316

Backtest results Current market (20210425-20210610)
Toggle
source .env/bin/activate; freqtrade backtesting -s MoniGoManiHyperStrategy -c ./user_data/mgm-config.json -c ./user_data/mgm-config-private.json -c ./user_data/mgm-config-hyperopt.json --timerange 20210425-20210610

I'm trying to put my two cents in. Here are some results. --> Please let me know if I did it right, before I'm making the same mistakes over and over again ;-)
Config
spaces: buy sell stoploss: -1 roi: {"0": 10} unclogger: off epochs: 1000
Downtrend (20210509-20210524)
HO run 1
Toggle
source .env/bin/activate; freqtrade hyperopt-list --hyperopt-filename=strategy_MoniGoManiHyperStrategy_2021-06-18_14-27-07.fthypt --best
![]()
HO run 2
Toggle
source .env/bin/activate; freqtrade hyperopt-list --hyperopt-filename=strategy_MoniGoManiHyperStrategy_2021-06-18_16-10-21.fthypt --best
![]()
HO run 3
Toggle
source .env/bin/activate; freqtrade hyperopt-list --hyperopt-filename=strategy_MoniGoManiHyperStrategy_2021-06-18_16-44-26.fthypt --best
![]()
Backtest results Downtrend timerange (20210101-20210316)
Toggle
source .env/bin/activate; freqtrade backtesting -s MoniGoManiHyperStrategy -c ./user_data/mgm-config.json -c ./user_data/mgm-config-private.json -c ./user_data/mgm-config-hyperopt.json --timerange 20210101-20210316
![]()
Backtest results Current market (20210425-20210610)
Toggle
source .env/bin/activate; freqtrade backtesting -s MoniGoManiHyperStrategy -c ./user_data/mgm-config.json -c ./user_data/mgm-config-private.json -c ./user_data/mgm-config-hyperopt.json --timerange 20210425-20210610
![]()
Ah sorry, seems the instructions where a little unclear! :)
I meant to open the master file and then find the mgm_trends
dictionary.
There just leave 1 trend in, for your 1st 3 HyperOpt runs (downwards timerange + downwards trend, etc)
Then HyperOpt spaces buy sell
Once you done that for each trend, then you combine the 3 json files (with a single trend in each one).
And once you combined them you start to HyperOpt the other spaces remaining one by one (roi, stoploss, trailing, unclogger)! ;)
⚠️
⚠️ Currently running HO's.... (will be updated...)
⚠️ Note: hurry commands refer to hurry cli tool at https://github.com/topscoder/hurry-cli
⚠️
Spaces: Buy, Sell
Downtrend
Click to expand ⬇️
timerange = 20210509-20210524
mgm_trends = [downwards]
spaces: buy sell
stoploss: -1
roi: {"0": 10}
unclogger: off
epochs: 800
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Sidetrend
Click to expand ⬇️
timerange = 20210518-20210610
mgm_trends = [sideways]
spaces: buy sell
stoploss: -1
roi: {"0": 10}
unclogger: off
epochs: 800
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Uptrend
Click to expand ⬇️
timerange = 20210127-20210221
mgm_trends = [upwards]
spaces: buy sell
stoploss: -1
roi: {"0": 10}
unclogger: off
epochs: 800
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Space: ROI
Downtrend
Click to expand ⬇️
# Downtrend
hurry hyperopt --timerange=20210509-20210524 --spaces=roi
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Sidetrend
Click to expand ⬇️
# Sidetrend
hurry hyperopt --timerange=side --spaces=roi
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Uptrend
Click to expand ⬇️
# Uptrend
hurry hyperopt --timerange=up --spaces=roi
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Space: Stoploss
Downtrend
Click to expand ⬇️
# Downtrend
hurry hyperopt --timerange=down --spaces=stoploss
🏃♂️ HO Run 1
⚠️ --spaces=buy sell stoploss
⚠️

🏃♂️ HO Run 2
⚠️ --spaces=stoploss
⚠️

🏃♂️ HO Run 3
⚠️ --spaces=stoploss
⚠️

Sidetrend
Click to expand ⬇️
# Sidetrend
hurry hyperopt --timerange=side --spaces=stoploss
🏃♂️ HO Run 1
⚠️ --spaces=buy sell stoploss
⚠️

🏃♂️ HO Run 2
⚠️ --spaces=stoploss
⚠️

🏃♂️ HO Run 3
⚠️ --spaces=stoploss
⚠️

Uptrend
Click to expand ⬇️
# Uptrend
hurry hyperopt --timerange=up --spaces=stoploss
🏃♂️ HO Run 1
⚠️ --spaces=buy sell stoploss
⚠️

🏃♂️ HO Run 2
⚠️ --spaces=stoploss
⚠️

🏃♂️ HO Run 3

Space: Trailing
Downtrend
Click to expand ⬇️
# Downtrend
hurry hyperopt --timerange=down --spaces=trailing
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Sidetrend
Click to expand ⬇️
# Sidetrend
hurry hyperopt --timerange=side --spaces=buy sell trailing
⚠️ --spaces=buy sell trailing
⚠️
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Uptrend
Click to expand ⬇️
# Uptrend
hurry hyperopt --timerange=up --spaces=trailing
🏃♂️ HO Run 1

🏃♂️ HO Run 2

🏃♂️ HO Run 3

Space: Unclogger
Downtrend
Click to expand ⬇️
# Uptrend
hurry hyperopt --timerange=down --spaces=!FIXME
🏃♂️ HO Run 1
-- WIP
🏃♂️ HO Run 2
-- WIP
🏃♂️ HO Run 3
-- WIP
Sidetrend
Click to expand ⬇️
# Sidetrend
hurry hyperopt --timerange=side --spaces=!FIXME
🏃♂️ HO Run 1
-- WIP
🏃♂️ HO Run 2
-- WIP
🏃♂️ HO Run 3
-- WIP
Uptrend
Click to expand ⬇️
# Uptrend
hurry hyperopt --timerange=up --spaces=!FIXME
🏃♂️ HO Run 1
-- WIP
🏃♂️ HO Run 2
-- WIP
🏃♂️ HO Run 3
-- WIP