Skip to playerSkip to main content
  • 13 hours ago
Transcript
00:00Hello everyone. Over the past few weeks, I've been getting a lot of messages from our community members asking me to
00:05backtest other strategies by Mr. Maheshendra Kautic. So as requested, we're going to be looking at one
00:10of MCK's gems, the homogeneous ETF swing trading strategy. This strategy is
00:15incredibly simple on the surface, but surprisingly deep, right? Once you start unpacking it, it's a strategy that
00:20kind of combines timeless market wisdom from the Japanese rice trader who lived centuries ago and then the modern
00:25practicality of Mr. MCK. Now, this is not just a theory video. I've actually taken the strategy
00:30coded it up in Python and backtested it across multiple, you know, and most popular
00:35liquid ETFs that are listed on the NSC using my own AI based backtesting framework.
00:40In this video, I'll take you through what the strategy is, why it works, how I test
00:45it, and then most importantly, how it performed. So sit back, relax, and let's dive right in.
00:50If this is your first time here, welcome. My name is Vivek and I'm a financial independent
00:55AgroTrader. This channel is all about building a community of AgroTraders. We discuss everything
00:58about AgroTrading using Python, building and practice.
01:00trading strategies, market updates, and much more. Always do your own research and consult
01:03with a qualified financial tax and legal professional before making...
01:05any financial decision. Let's start from the very beginning, the origins of this strategy.
01:10Meet Homa Munehisa, a legendary Japanese rice raider from the 1700s.
01:15AgroTrader is often called the father of candlestick chatting. He noticed something fascinating
01:19during his time, you know.
01:20trading rice contracts, that markets move not just because of supply and demand, but because
01:24of human emotion.
01:25fear, greed, hope, hesitation, these forces repeat over and over.
01:30creating patterns that the traders can learn to read. That's how the candlestick patterns
01:34were born.
01:35Now, fast forward a few hundred years to the YouTube era and then enter Mr. Mahesh in the
01:40future.
01:41Mr. Mahesh is one of those rare financial educators who cuts through the noise. This YouTube channel
01:45I'm sure most of you have seen this. This is a gold mine for retail traders, packed with very
01:49simple but very practical...
01:50practical, no-nonsense strategy that are built on logic, experience and deep back to state.
01:55What I really respect about him is that he doesn't sell hype. His strategies are low risk, backed by
02:00reasoning and he shares them completely free. So, when you blend the timeless wisdom of Homer...
02:05the practical genius of Mr. Mahesh Chandra Kaushik, you get what I like to call the homogeneous strategy.
02:10The idea behind the strategy is refreshingly simple. It is built on the belief that ETFs...
02:15such as exchange-traded funds, being baskets of stocks tend to go up over time.
02:19I mean wise...
02:20What is that?
02:21This is primarily because the ETFs, you know, don't track individual stocks rather...
02:25broad indices or sectors or themes. The underperformers get replaced by stronger...
02:30companies and economies despite their ups and downs have a natural upward drift.
02:35So, if we accept that the ETFs generally rise in the long run, then temporary dips become buying opportunities.
02:40And that's exactly what the, the edge of the strategy. Let's quickly take a look at the instrument selection.
02:44The...
02:45The overall idea is that we only choose ETFs that have very high liquidity and stability.
02:49Mr.
02:50MCK in his video had picked the following ETFs, which is a really good mix of diverse ETFs in the market.
02:55Starting with the Nifty Beast, which are the top 50 companies in NSE.
02:59And then we have...
03:00The Junior Beast, which is the next top 50 companies. The mid 150 ETF covers the...
03:05The following 150 companies by market cap. So, these three ETFs put together captures the top 250 high...
03:10...quality companies in the NSE, right? And then we have the...
03:13The Sensix IEDF, which is, you know, just...
03:15To throw into the mix cover of Sensix, stop 30 companies as well. And for commodity, we have...
03:20Gold and silver. And finally, for international exposure, we have the MON-100, which is nothing but your...
03:25Mothilar Oswald, the NASDAQ-100 universe. So, this list beautifully covers a broad...
03:30Spectrum of quality ETFs diversified across markets, product types and geographies.
03:35Let's now talk rules, and trust me, it couldn't be simpler than this. The entry rule...
03:40This is pretty straightforward. We are working only on the weekly candlestick time frame, right?
03:44So, at the end of the...
03:45After the week, after the market closes, say on Friday, for the ETFs that we have selected, we have to check the chart...
03:50If the weekly candle of the ETF is red, which means that they decrease...
03:55Close is lower than the open for that particular week, and then we don't...
04:00If we already have this particular ETF in our holding, we go ahead and buy one lot. If we already have...
04:05If we put this particular ETF in our holding, then we will have to check if the price has fallen 3.14...
04:10From the last buy price, and if so, we just go ahead and buy one more lot. So, this is...
04:15This is basically the averaging down concept. Just so that the rules are really clear, all that we are doing is at the end of the...
04:20week after the Friday market is closed. For the ETFs that we have already selected, we check their weekly charts.
04:25And then if that particular ETF scandal for that particular week is red, meaning that, you know, the...
04:30The close is lower than the opening for that particular week. And then we check if we already have...
04:35If we don't have it in our holding, if we don't have it in our holding, we go ahead and buy one lot. In case we already have...
04:40If we have that particular ETF in our holding, an active trade already exists, then we check whether the current price for that...
04:45particular week has fallen by more than 3.14% from the last buy.
04:50If that is the case, then we go ahead and buy one more lot. And that's how we basically do an average down.
04:55The exit rule is very simple. When the ETF rises 3.14% from the buy price, we sell...
05:00That position. So in other words, the target percentage for our trade is going to be 3.14%.
05:05As per the original strategy. And that's it. No RSI, no moving averages, no complex indicators, just clean.
05:10Price action logic. So here's where things get interesting. The original strategy from Mr. MC...
05:15only talks about the red candle, but I wanted to test and see what happens when we did this, just the reverse, right?
05:20Which is what if we buy when we have a green candle. So, so we have two variations now. They bear...
05:25The Irish variation, which buys on red candles, which basically looks into the weakness. And in the bullish version, which...
05:30Which buys on the green candles, which basically tests the strength. Both follow the exact same...
05:35The exit logic, which is sell when the price rises to 3.14%. Now you might expect that the bullish...
05:40version to perform better since it follows the trend, right? But surprisingly, the bearish version marginally did better...
05:45than the bullish version. Why? Because it buys the temporary discounts and sells on recoveries, right?
05:50The bullish version often enters after a move has already happened, leaving very less room for an upside.
05:55This just reinforces the timeless truth. Markets reward those who buy fear and sell greed.
06:00Because no strategy is complete without proper money management plan. So I tested two allocation methods. The first one is...
06:05This is the static allocation where a flat 20,000 per trade and another 20,000 for each averaging position was used.
06:10Again, these are all parameterized in the Python code. You can actually change to any amount that you want and backtest it.
06:15The way you want it. The second method, which is the divisor allocation. Here, what we do is we divide the total path...
06:20portfolio by a chosen number, say 40 in this case, and then use that as your per trade size.
06:25There were a lot of questions around this divisor allocation method in the earlier videos. So let's take a closer look at...
06:30this particular aspect of it, right? Let me give you an example. Let's say that you start with an initial capital of...
06:35what? 4 lakhs. And then your divisor is 40. So 4 lakhs divided by 40. That is 10,000 for each...
06:40each trade. So 10,000 for the first buy and 10,000 for your averaging down as well. Let's...
06:45say after some time, your portfolio grows to 8 lakhs. This is because you're deploying all the profits back into the portfolio.
06:50Then now 8 lakhs divided by your divisor 40. Then your allocation would now move to 20,000 each.
06:55So as you can see, as the portfolio grows, your position size also grows along with it. And this compounding...
07:00the effect gives an extra punch to the strategy performance over time. In the back testing, I tried testing multiple variations...
07:05of the target percentage position size approach. And I'll present to you one of the best scenarios that I basically liked.
07:10So for this testing, I started with an initial capital of about 4 lakhs, added a flat...
07:1540 rupees brokerage fee per round trip. And then I assumed zero slippage since ETFs are...
07:20anywhere highly liquid, right? I've built a simple Python screener, which will basically take all these 8 ETFs...
07:25that we've discussed. And then I'll find out within among the 8, you know, which of these ones have the red...
07:30the red weekly candle, and then gives you the ETFs that have a red candle here. For example, today it's Sunday...
07:35that I've basically run, and then these two ETFs came up, which is the junior Bs and the mid 150 Bs. These are the ones...
07:40only two ETFs that have a red candle, weekly candle for this week. All others have green candle. So let's quickly jump...
07:45into the chart and check if this is true. So for people who are new to, you know, the charts...
07:50and how to read it. This is where we are. We are on TradingView software. And then like we did, we have two...
07:55ETFs that are currently shown as using, as showing basically red weekly candles here. So I've opened up the junior Bs.
08:00which is one of those two. And then you can clearly see on the weekly timeframe, the last, you know, the candle...
08:05for this week is basically red, which means that it opened up at a high price. And then when it...
08:10closed, it closed low, right? And that's when a red candle is formed. So clearly junior Bs was fished out as...
08:14one of the eligible kind...
08:15varieties that we could buy. And what about the mid 150 Bs? That was the other ETF that was...
08:20finished out by the screener. And you can clearly see that the last candle is red as well, right? So we know that the screener...
08:24really works.
08:25just to be sure, let's take a look at one that did not come up in the screener. Let's say for example, Nifty Bs...
08:30and that did not come up in the screener because the last candle is green here, right? Because it basically ended up higher.
08:35than the open. And that's the reason why it did not come up. This is not one of the ETFs that we...
08:40would be buying, but we would be actually buying these two, right? The junior Bs and the mid 150 Bs.
08:45And this is the actual backtesting in a Python script that I talked about. This was AI generated.
08:50And then I have a separate course on how to basically do this. So in this case, we're testing the...
08:55homogenous strategy here. And these are the eight ETFs that we already spoke about. And then the backtesting period is...
09:00going to be close to about five years starting from 2020, January 1st. So that basically covers the...
09:05COVID period as well. We just wanted to check how this strategy would have done during that particular tip, right? And then...
09:10everything is parametrized like I discussed. You can actually check run for both variations, which is the bullish as well as the bearish.
09:15What we need to do is just change this parameter here, depending upon which version that you want to test. And then you can set the...
09:20initial capital. In this case, I've set it up to 4 lakhs. And then we discussed about the position sizing mode. Either you can go...
09:25static or you can go dynamic. Dynamic is nothing but your divisor, right? In case of static, these two...
09:30inputs are important, which is, you know, how much amount you want to allocate per lot for the fresh buy. And then the...
09:35averaging by, right? In this case, 20,000 for both, right? In case you choose the dynamic here...
09:40In that particular case, you'll have to give what the dynamic divisor is going to be. Let's say 10 or 20 or 40 or whichever number that...
09:45you want to give. You could actually give it here, right? And then as discussed, we are allocating the brokerage of about...
09:5020 rupees per side, which is round trip. It's going to be 40 rupees. And that's what typically zero the charge.
09:55Right? Slippages, we are not considering any. The target percentage as far as the original...
10:00you know, strategy from MCK, he had suggested 3.14. But...
10:05based on my testing, what I found is, you know, a percentage of 5% of target basically gave...
10:10the kind of the most optimal return. However, this code is available to you. You can run it as many times as you want in whatever combination...
10:15you want. And then if you find a better, you know, a variation of the strategy that gives...
10:20most risk adjusted return. Please post that, you know, the variations in the comments so that the rest of the people can...
10:25actually follow. And then the averaging down percentage, we've not changed it, which is 3.14. So the price has...
10:30to fall 3.14% from the last buy. And that's what the averaging percentage here. Right? And then finally...
10:35everything, the trade book is stored in a CSV file. So we can actually look at every individual trade book.
10:40from that back-testing. If you have been following Fab Prater, you're familiar with this one. We just don't stop at the...
10:44the back-testing...
10:45itself. We also, you know, analytically see how the performances compare all the variations and then find out the...
10:49the best...
10:50variation that gave the...
10:51the best risk adjusted return. And that's what this dashboard does. As part of the course, you know, you...
10:55will also be taught how to build this particular dashboard, you know, from end to end. Right? So in this case, we've tested two variations.
11:00Right? The bearish and the bullish. This is how the bearish, you know, performance looks like.
11:05I don't want to go through the numbers and one by one typically because...
11:10for some reason, you know, doesn't allow, you know, percentages to be discussed. It basically flags...
11:15that particular video and then removes that video. So, so this is, this is where we are. You can take a quickly credit. I've already...
11:20pasted, cut and pasted this as part of our blog article, where I've given all this information, you know, for you too.
11:25to take a look at, right? So, so clearly the brown part is the strategy and the white part is the nifty 50...
11:30and then we can see that the strategy is doing beating the benchmark, which is the nifty 50 in this place.
11:35And then the average holding period is about 35 days, which is actually not, not bad at all. Right? Remember again, this is...
11:40the 5% target, you know, right? Not the 3.14 target percent. So we kindly note that.
11:45And then this is the overall net PNN after all the brokerage and everything is paid, right? Since the amount is invested...
11:50in bits and pieces, CAGR doesn't make a lot of sense here. The XIRR makes a lot of sense. So this is the XIRR that we...
11:55got out of the 547 trades in the last about four years and eight months.
12:00This infographic here basically gives you the monthly return heat map across those four...
12:05five years. And then you'll also find the monthly returns for each month within that particular year. Right?
12:10There is no drawdown here because we don't have any stop loss for this strategy. So there's no real...
12:15you know, loss that we actually incur. There could be, you know, you'll have unrealized PNN...
12:20still, you know, dipping down. But that's something that we are not tracking...
12:23since we don't have an SLV, we really don't...
12:25realize any loss as part of this strategy. Right? And this basically gives you a quick year-on-year return.
12:30comparison between the strategy and the benchmark. And this infographic here talks about how your fund is...
12:35realized. In this case, we said that we're going to be, you know, allocating four lakhs overall. And then you can clearly see...
12:40that within, you know, the first two months, the entire four lakhs was, you know, deployed.
12:45And then that four lakhs basically remained within the strategy throughout the period. And then while that remains...
12:50you can see that the equity curve of the overall strategy, the overall portfolio basically going up.
12:55on a nice, smooth upward trend here. Right? So that's really good. The entire trade book is available. I've downloaded...
13:00the trade book and also the trade book along with this particular, the ranking sheet, the, you know, the dashboard.
13:05the screener, the overall backtesting Python code, all of that is available within the backtesting pack.
13:10for which, you know, you can find the link to that in the video itself.
13:14So a quick comparison...
13:15of how the bullish one did, this is the bullish one, also managed to beat, you know, the...
13:2050 by a slight margin here. And then you can, you can maybe compare it to the NetPNL here about 10% less.
13:25than the previous one. Apart from that, you know, the bearish slightly did better than the bullish is what the...
13:30final findings are. The rest of the, you know, the numbers look very similar.
13:34It has taken less number of...
13:35trades, the XIRR is, you know, obviously less than the previous one. But...
13:40how are the rest of the numbers look very, very similar, including, you know, how the fund is utilized is also very similar.
13:44So again...
13:45this information is also available within our blog. And all this detail is available within the backtesting package.
13:50that's available for you as well. So NetNet, the...
13:55the climax of the story is, is that, you know, for the four years and eight months that we've tested, this is the final number that we've got.
14:00gotten out of this strategy, which is pretty decent. And then it also has ensured that it basically...
14:05beats the benchmark, which is another plus. So overall, this strategy is something that I basically, personally...
14:10like. And then, you know, the next step would be that since this backtesting proves that this strategy does have an edge.
14:15I would now convert this into a fully automated algo and then deploy it as part of my algo system.
14:20By the way, if you're wondering how you can run similar backtest on your own strategies, even if you have zero coding...
14:25experience, I've built a complete course that teaches you exactly how to do it using Python and AI. It's completely beginner friendly.
14:30and will help you not just to test, but also optimize and visualize your strategies just like the way I've done.
14:35If you've enjoyed this video, don't forget to like, subscribe and share it with your trading friends. It really...
14:40helps your channel grow. And do check out our community website, VapRater.in. You might find a lot of similar useful stuff.
14:45So until next time, this is Vivek from VapRater wishing you profitable trades and peaceful wealth building. Thank you.
Comments

Recommended