The ‘Huck loves her bucks’ strategy – Is it profitable or not? (Patreon)
Downloads
Missing 1 file, as this post has not yet been imported.
Content
This time I will be testing if this HLHB strategy is profitable or not.
Every time, the strategy will be tested on its probability to make money by backtesting on multiple digital asset pairs over their largest possible backtesting period.
The testing results are then compared with the results of earlier tested strategies and entered into a strategy league to get an overall picture on which strategy has the best performance.
Strategies that are already available as Freqtrade code will be looked at to see what they do.
After that, I will backtest it to discover which timeframe is the most profitable.
Then, I will try to find out that the most optimal indicator values are to get the most out of the strategy in question.
Beware though that this is curve fitting territory so be critical of these results. Nonetheless it gives a nice indication of the potential of the strategy.
As said, in this blogpost I am going to test the Huck loves her bucks strategy. This is yet another strategy that is available through the Freqtrade github repository. And I will keep continuing to test these until they are all done. So bear with me…
Where to find this strategy
To get this code visit the freqtrade site.
- Navigate to their github repository, then click on the main github page.
- You will see a repo that’s called freqtrade strategies.
- In this repository you will find a folder called user data.
- Then go to the strategies folder.
- In there, you will find the hlhb strategy.
To download this exact strategy to your computer, follow the commands you see on the screen. Do this from within the user data strategies folder otherwise freqtrade will not recognise the file.
wget https://github.com/freqtrade/freqtrade-strategies/blob/main/user_data/strategies/hlhb.py
Browsing the code
And we start with a nice refreshing surprise from this strategy,
The code actually has a link to an explanation of how this all works.
If we go to “https://www.babypips.com/trading/forex-hlhb-system-explained”, there will be a nice short description of the strategies intentions, indicators, entry and exit rules.
So this time we do not have to grind and reverse engineer the code to see what the strategy does.
Apparently this strategy is another crossover system that was one of the highest scoring mechanical systems in 2014. It also promises to be a generic applicable strategy on many pairs and I understand that it can also be applied to multiple timeframes.
The strategy uses two exponential moving averages. The 5 EMA and the 10 EMA and an RSI 10 applied to the median price of the day. That is, the Highest price plus lowest price divided by 2.
The entry signal is very simple. Buy when the EMA5 crosses above the EMA10 and the RSI crosses above 50.
The sell signal is the reverse. So sell when the EMA5 gets below the EMA10 and RSI crosses below 50.
There are two more exit rules and those are to sell when there is a 50 or 200 pip profit target reached.
And close trades when new signals materialize at the end of the week. But I am not sure how this is coded into trading bot parameters at this moment though.
INITIAL BACKTEST RESULTS
By the first looks of the results of this strategy apparently “Huck loves her buks” to move to other players in the market.
On all timeframes this strategy is losing money. And I also immediately can tell you why this is.
On the website where this strategy is described, there is no stop loss defined. And in the Freqtrade strategy code the initial stop loss is 32%.
So if you look at the results on the 1 day timeframe backtest
Then you will see that 207 wins will make you around 220 dollars. But the less than 20 stop loss triggers with some exit signals will make you lose around 420 bucks. That is almost double the gains you had.
The strategy has a very high win rate and could be applicable to more than 70% of the pairs you want to trade. But these stop loss settings are just too high.
So lets hopefully improve these with a hyperparameter optimization session and lets see if this strategy indeed can be profitable (or not)…
HYPER OPTIMIZED PARAMETERS BACKTEST RESULTS
Luckily for us, this time optimizing the parameters indeed proves that once again optimizing stuff like take profit points and stoploss settings will enable us to gain profits without losing too much of it when markets are against us.
We have lesser trades overall and a lower win rate, but the losing trades will probably be cut off quickly and the winners will be running till higher profit points.
You can also see this in the results overview of Freqtrade.
There are less winners but the improved ROI points are giving more profits. And in comparison with the previous results, there are a lot more losing trades, but they are stopped quicker before they lose large amounts of money.
You can see that also if you look at the json file with the changed parameter settings.
ROI settings are much larger and the stop loss is changed from over 30% to less than 10% in the improved situation.
STRATEGY LEAGUE
So, let’s see how this strategy performs in comparison to the tests that I did earlier…
Hucks should love her bucks a little bit more as you can see here. It only entered the 17 spot in the total league.
I have to admit that the code I tested was not actually the strategy that was published on the original website. It has an extra indicator and uses a trailing stop loss in the code. And other Freqtrade specific things like the ROI and Stoploss settings are also not mentioned on the internet page.
And the average trading amount in combination with the win rate causes an extremely high risk of ruin. Nonetheless the drawdown of 18% is promising and maybe this strategy can be the fundamentals for others to build on.