The “Smart money” trading strategy (Patreon)
Content
Introduction
“Smart money”… an elusive concept.
Used by Youtubers, traders, and other financial analysts on the Internet. Like, if they know who the ‘smart money’ is, what they do and what their secrets are. The original author has called this also the ‘smart money’ strategy.
Will it do what it promises? Read this post (watch this video) untill the end to find out…
The real introduction
Hi there, and welcome to another post where I will test someone elses trading strategy to find out how it performs on my specific setup. Which tries to be more generic and realistic to the market conditions. And see how it performs. This way I can find out if this strategy has the potential to be profitable in the future as well and will make our trading accounts grow.
The strategy
As said, in this post/video I will test the ‘smart money’ trading strategy I found on the github. The repository is owned by Mike Digriz and there I found this code. So If you like his efforts, then please visit his github page and give him some kudos for his work.
Here I am only going to test the strategy for what it’s worth and find out some possible optimal settings if this is needed.
in contrary to the name, the code for this strategy is pretty simple to read and understand. It makes use of the Chaikin Money Flow, Money Flow Index and the EMA 200.
# Stoploss:
stoploss = -1
# Optimal timeframe for the strategy
timeframe = '1h'
sell_profit_only = True
sell_profit_offset = 0.01
# buy params
buy_mfi = IntParameter(20, 60, default=35, space="buy")
buy_cmf = DecimalParameter(-0.4, -0.01, decimals=2, default=-0.07, space="buy")
# sell params
sell_mfi = IntParameter(50, 95, default=70, space="sell")
sell_cmf = DecimalParameter(0.1, 0.6, decimals=2, default=0.2, space="sell")
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
# Chaikin
dataframe['cmf'] = chaikin_money_flow(dataframe, period=20)
# MFI
dataframe['mfi'] = ta.MFI(dataframe)
# EMA
dataframe['ema_200'] = ta.EMA(dataframe, timeperiod=200)
return dataframe
It was designed to be used on the 1 hour timeframe and has the following buy and sell rules:
Buy
- When the close price is below the EMA200 and
- when the MFI is below it’s default configured value of 35 and
- when the CMF is below its default configured value of -0.07
Sell
The selll rules are first of all when stoploss or ROI points are reached.
- And otherwise when the close price is above the EMA200
- the MFI is above the value of 70 and
- the CMF is above 0.2
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['close'] < dataframe['ema_200']) &
(dataframe['mfi'] < self.buy_mfi.value) &
(dataframe['cmf'] < self.buy_cmf.value)
),
'buy'] = 1
return dataframe
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['close'] > dataframe['ema_200']) &
(dataframe['mfi'] > self.sell_mfi.value) &
(dataframe['cmf'] > self.sell_cmf.value)
),
'sell'] = 1
return dataframe
And that’s preffy much it… Is the smart money so smart to make use of these so simple rules?
Let’s find out with the initial backtest of this trading strategy here…
Smart money indicators
Initial backtest results
Below are the backtest results of the strategy without any optimizations.
As you can see, the 30 minute timeframe seems to have the highest scores of all the tested timeframes.
It has an initial win percentage of 79% of all trades made. The drawdown is only 34%.
Also 52% of the tested 50 pairs respond well to this algorithm.
But for those who follow my video’s a while, the might already see a difference in this table.
I have also added some new columns to this overview, namely the amount of trades made, the winning streak where the first number is the maximum winstreak after another and the average winning streak. And ofcourse also the same for losses. The maximum amount of losing trades after another and the average of these losing streaks.
And with this additional information also the big caveat of this strategy comes to light. Because it is a 30 minute strategy over multiple years. And, depending ofcourse when the crypto pairs firstly became active, only 42 trades made are here… Which is way to low for this timeframe. The 5 minute timeframe has even less trades here.
And that’s a big problem, because apparently the algorithm with it’s current buy and sell parameters do not generate enough signals to make this a viable trading strategy.
The profits come solely from a few trades made and these trades were sometimes closed 1200 days later. Apparently the so called ‘smart money’ is a HODLER here.
The profit chart shows this as well. A very peculiar chart by the way. Just a staircase of pumps and flat lines without any movements in gains.
Also here we can see that at almost the start of the testing period the algo buys some positions and never leaves them. Actually doing nothing at all. And that is not the behaviour we expect ofcourse.
Optimization and second backtest run results
So let me try to optimize these buy and sell parameters, which the author has nicely coded into the strategy file. And give the machine learning algorithm a chance to optimize these settings to improve the performance. Or make it at least a little more believable here…
I’ll only optimize the buy and sell paramerse by the way because optimizing too much parameters at the same time has proven go produce even worse parameters.
And after optimizing the buy and sell parameters. You can see that this strategy does not improve at all. Over the complete range of factors you can see that performance get’s even worse.
Also the amount of trades does not improve as well. Still a one time buy and sell after a long period of time.
And the profit chart also does not seem to be optimized at all. This is very strange behaviour and I expected a lot more from a strategy that is named like it is. But well the author already admits in his code that it is not smart at all. And we can now all see that too.
Strategy league and conclusion
So what happens to this strategy. I could dismiss it as being an algorithm that is faulty and not mention it again. However, technically the strategy performed in the backtest, albeit not as intended. And maybe the author had to call it the “buy and hold” method. So I will keep it in the league as a result because at first sight we could not say if it would perform or not. But it does, however not in the way we expected it.
So let’s keep it at this and put this information in the back of our minds for next time. We have to fail fast and often to find the ultimate trading strategy and we will move forward so that we will be the “smart money” they will talk about in the end.
Files
If you like this strategy and want to use this on your own system, then please pay the original author’s Github page a visit.
Backtesting files are located in this post: https://www.patreon.com/posts/85365712
Thank you for watching this post!
And I’ll see you in the next one…
Goodbye!