- 13 hours ago
Category
📚
LearningTranscript
00:00Hello, everyone. Welcome to FabTrader. If you haven't seen my previous video on Nifty Shop Strategy,
00:05please do watch it. In that video, I discussed this swing strategy from the famous YouTuber, Mr. Maheshinder.
00:10Kaushik and I spoke about how I've been successfully and profitably running this strategy for the past 1.5 years.
00:15And I also shared with you my full trade book and the PNL as well. This video got very good support from all of you.
00:20And my heartfelt thanks to all of you for that. In this video, we are going to be applying a small
00:25little twist to that famous Nifty Shop Strategy. And I'll share with you what this twist is all about.
00:30And I'll also share with you the backtest results and how it performed and a whole lot of insights that I'm sure you've
00:35absolutely like. As usual, I'll share with you the backtest Python code, the daily screener to select stock.
00:40and the full range of parameters I tested and the perfect setting that outdid all the others.
00:45So did this tweak perform better than the Nifty Shop Strategy? Well, I have a nice little surprise.
00:50So stay till the end and you'll be amazed with the results.
00:55Always do your own research and consult with a qualified financial tax and legal professional before making any financial decision.
01:00Now, if you already watched my earlier video, you already know the origins of this strategy.
01:05The Nifty Shop Strategy was originally proposed by Mr. Mahesh Chandra Kaushik and I've been running a slight
01:10adapted version of that particular strategy on Nifty 50 stocks for quite some time now with very strong
01:15consistent results. It's simple, systematic and extremely beginner friendly, perfect for people who don't want to
01:20gamble with derivatives or sit glued to the screen all day long.
01:23Recently, one of our FabTrade
01:25the community members Vijayanand asked a question that led to this video and his question was what
01:30if we tried the same strategy but on the mid cap 50 index instead of the Nifty 50.
01:35At first I thought, interesting idea, but will it really make a difference? So I went ahead and back tested it.
01:40And the results were surprising and that's exactly what we will be reviewing in this video.
01:44Before we
01:45Before we get to the findings, let's understand the logic behind it.
01:47The mid cap 50, as you know, is basically the next leak, right?
01:50The top 50 companies in the mid cap space on the NSE. These are companies that are fundamentally strong
01:55have proven business models, but are also in the high growth phase, which means they tend to move faster both
02:00up as well as down. So when they fall, they fall sharper than the large gaps, but when they
02:05recover, they bounce back strong. And that's exactly what makes them a great candidate for a mean
02:08reversion based strategy like Nifty 50.
02:10Nifty shop. In other words, if Nifty shop was all about stability, mid cap shop is all about momentum.
02:15Temporary dips here are not signs of weakness, they are opportunities in disguise.
02:20The entry logic remains identical to the original Nifty shop framework at the end of each trading day.
02:25At around say 3 20 PM, we scan the mid cap 50 universe, we identify five
02:30stocks that are trading the farthest below the 20 day moving average, which is a 20 DMA, right?
02:35Out of these five, we buy one stock, but only if they are not already in our holdings.
02:40All five are already in our portfolio, then we enter what I call the averaging.
02:45In the averaging phase, we look at all our existing holdings and find the ones that have dropped more than 3
02:50percent from their last buy price. Among them, we pick the one that has fallen the most.
02:55And then buy it again. But remember only one averaging position per day. So just a quick
03:00recap, at the end of each trading day, we scan the mid cap 50 universe, we identify five stocks that are
03:05trading farthest below the 20 day moving average. Out of these five, if we don't have
03:10any of those five within our holding, we go ahead and buy one stock per day, right? Only one stock per day.
03:15If you have all the five stocks that were picked for that particular day are already
03:18part of your holdings, then you actually go into average.
03:20In averaging, what you do is you look at the existing holdings that you currently have and then pick the stocks.
03:25You know, where the stock has fallen down more than 3 percent from the last buy price, right?
03:30And then take the one that has fallen the most, and then you buy one stock per day again. And that's
03:35it. And that's how simple the entry logic is.
03:40Exit rule is just as simple. Every day at the end of the day before the market closes, you check your holdings.
03:45If any of your positions, any of your trades have gone up about by 6% from its buy
03:50price, you go ahead and sell it. There's no limit on how many stocks you can sell per day.
03:55If you have a trade that has gone up by 6%, then you can go ahead and sell it, right? Again,
04:00the point to note here is it's not the average buy price. It is the buy price for that particular trade.
04:04For example, if you have.
04:05You bought our motors, you have two trades, right? Bought at two different times because you're
04:08doing averaging. And then if.
04:10Any one of those trades have hit 6% target, then you go ahead and sell it.
04:13That's it. No complicated indicators.
04:15No intraday panic. No stop loss triggers.
04:18It's a slow, steady rule based approach that.
04:20Quietly compounds. And as I keep saying, compounding is boring until it is not.
04:24Now this.
04:25This is where things get really interesting money management because this one single element
04:28can change how your strategy behaves completely.
04:30I tested the mid-cap 50 strategy with three different position sizing approaches.
04:34Start.
04:35Starting with the static position sizing.
04:36Here you invest a fixed amount per trade, say 10,000 or 20,000.
04:39Just.
04:40This is simple, predictable, and it's great for beginners who like to keep things clean.
04:43The second approach is the dynamic position.
04:45In this method, what we do is that the trade size is a fixed percentage of your portfolio,
04:49like say 1.5.
04:502% or 2% of your portfolio size.
04:52The third approach is the divisor position sizing.
04:54This one's my favorite.
04:55You simply divide your total portfolio value by a divisor.
04:58Let's say, for example, 40 and use that.
05:00as your position size.
05:01As your balance increases and so does your allocation for rate, creating a self.
05:05compounding effect over time.
05:06So this approach gives you flexibility, adapts to portfolio growth, and adds a little
05:10layer of natural scaling, all without changing any rules.
05:13To give you an example of how they develop.
05:15The divisor position sizing works.
05:16Let's say that you start with an initial capital about 4 lakhs and your divisor is 40.
05:20So 4 lakhs divided by 40, 10,000 would be your position size for every trade.
05:24Let's assume.
05:25Let's assume that the overall portfolio grows to 8 lakhs because you're reinvesting all
05:28your profits back into the strategy.
05:29So now your position.
05:30Portfolio size is 8 lakhs, but your divisor remains 40.
05:32So 8 lakhs by 40.
05:33Now your position size would be 8 lakhs by 40.
05:35Which is 20,000 per trade.
05:36And that's how the divisor position sizing works.
05:39A quick look.
05:40Look at the screener that I've built on Python.
05:42It's a very simple screener, which we can run on every.
05:4520 day.
05:46And then it'll automatically pick the top five stocks that have fallen the most from the
05:4820 day moving averages.
05:50It's pretty straightforward implementation.
05:51It doesn't require any broker APIs or complex logic.
05:54Basically.
05:55It uses the public data that's available within the Yahoo Finance.
05:57And this screener is included as part of the backlisting packages.
06:00And you can find the link to this backlisting package in the comment section below.
06:04The other good thing about.
06:05The screener is that when most people use screener, they use a static list of the midcap 50.
06:10You know, the universe, the list of stocks that are currently used.
06:12But as and when the changes happen within that universe, you'll have to come back and change.
06:15The code here.
06:16You don't have to worry.
06:17The code directly picks the latest the midcap 50 list.
06:20From the NSE itself every day when the screener runs.
06:22So that way you have always accurate data, accurate set of stocks being.
06:25Added to the list.
06:26Right.
06:27So that's one good thing about the screener.
06:28I show you the backlist results.
06:29I'll quickly walk you through the Python code that is.
06:30That was used for backlisting.
06:31So as input for the backlisting, we've used the nifty.
06:35The midcap 50 stocks here.
06:36I picked up all this from the NSE website and these are the 50 stocks within that.
06:40particular universe.
06:41And for the backlisting period, we've started from 2021 January.
06:45So that way it covers the, you know, the COVID period as well.
06:48So it's the overall testing is for about five years.
06:50And eight months, you know, as you know, there are multiple parameters.
06:53So what I've done as part of this backlisting is.
06:55I've tried simulating them or tried automating all of the parameters in one shot.
06:58So that the backlist basically runs for various.
07:00combinations, permutations of the input parameters, and then, and then provides.
07:05You know, a consolidated Excel sheet of all the scenarios and which ones did better.
07:08So that that way we can quickly look at.
07:10the perfect setting setting that basically gave us the best current schedule set return.
07:13Right.
07:14So in this case, if you see position size.
07:15the same ones, as you know, you're using three, right?
07:17Static dynamic and divisor.
07:18And then if it's a static.
07:20I'm using three parameters that I'm currently using 10,000 and 20,000 for the fresh buy.
07:23Again, 10,000 and 20,000 for that.
07:25I'm averaging, right?
07:26So these are combinations.
07:27If static is chosen, these, the backlist would run for each.
07:30of these combinations, right?
07:31And then for dynamic, if that was used, I've used 1.5, 2% and.
07:352.5% for the fresh buy and the averaging.
07:37So again, the permutation combination of these ones would also be tested.
07:40And finally, for the divisor, I've used 10, 20, 30, 40 divisors, right?
07:44So again.
07:45One for the fresh buy and one for the averaging.
07:47Finally, the target parameters.
07:48I've tested for three target parameters.
07:50One is.
07:50The 3%, 6% and the 8%.
07:52So this way we can, we can look at all these combinations and find out.
07:55the combination that basically gives us the best return, right?
07:58And this is the automated.
08:00So we have a back to script that basically runs, consolidates all of the testing into a
08:03final sheet called the consolidated final.
08:05And now I'll show you exactly what the backlisting results look like.
08:08A lot of people ask how I run this.
08:10The strategy as part of my algo.
08:11So this is my strategy implementation within my algo.
08:15The algo is a much bigger system.
08:17And the strategy file is just a small component of it.
08:19The algo takes care of running the strategy.
08:20You know, seamlessly.
08:21So as you can see, within less than about a hundred lines of code, the entire strategy
08:25rules has been coded here.
08:26It's pretty simple.
08:27You don't have to be a Python expert to do it.
08:28So what does algo basically does is.
08:30It executes the strategy end to end without any dependency on me, right?
08:33I could be sleeping.
08:34I could be shopping.
08:35I could be doing it.
08:35Everything.
08:36So the algo automatically takes care of all my buy, sell, money management, risk management.
08:40All of that by itself.
08:41And this is how I run all of my strategies.
08:44And if you want to run.
08:45Similar, I'll go on your side and automate all of your strategies.
08:48Please reach out to me and I'll definitely give you some pointers.
08:50And the moment you've all been waiting for, which is the test results from the backers
08:54that we just did.
08:55It did close to about 85 combinations, 87 combinations, you know, in total, given the various different
09:00parameters.
09:00parameters that we gave, right?
09:01So the combinations basically came up about 87 different scenarios.
09:04And then it also produced.
09:05The final list of the, you know, the backlisting.
09:07And then I sorted it, you know, based on the net PNL, right?
09:10The setting that basically gave us the maximum returns.
09:13So ideally for that five years.
09:15And eight months it is given as about 464%, which is, which is really, really good.
09:18And this is much, much bigger.
09:20than what the nifty shop kind of produced.
09:22So overall, we started off with an initial capital worth 4 lakhs.
09:24And then.
09:25We ended up with 18.56 lakhs a year.
09:26And that's what this particular thing is.
09:28The specific scenario that basically produced.
09:30this result is the divisor.
09:31So it's basically divisor all the way.
09:32Can you see it on the top?
09:33It's basically divisor all.
09:35All the way.
09:36And then all the dynamic ones are in the bottom.
09:37So, so that's why he divisors are always, you know, my favorite.
09:40This scenario 51 to be specific, which produced the maximum result.
09:43The divisor for the fresh wipe.
09:45was about 10.
09:46And then the divisor for the averaging was 40.
09:48And then the target percentage was eight.
09:50Right.
09:50And similarly, the second rank was scenario 47 and 44.
09:53The third was 44.
09:54This is for.
09:55The divisor 10 and 30 and divisor 10 and 20.
09:57Right.
09:58But both of these were 6% targets.
09:59Right.
10:00So let's quickly visualize the performance of the strategy.
10:03The strategy, the scenario number 51 is.
10:05What we currently have.
10:06I have the trade books for all the scenarios that I've currently run.
10:08All this is included as part of the backlisting pack.
10:10So 51, which is the number rank one scenario that came up.
10:13And, and as you can see it about 6, 6, 0.
10:154 trades totally taken.
10:16And then the cross PNL was about 474%.
10:20And after, you know, brokerage and all that, the net PNL is 464.
10:23And then you can clearly see the.
10:25The equity curve here, the white is the, the Nifty 50, which is the benchmark.
10:28And then the brown part is the strategy, which beats.
10:30By a huge mile.
10:31Right.
10:32And that's how good it is.
10:33The XI are about 40%.
10:35That's what we are currently getting.
10:36And then draw down nothing to really, you know, discuss here, because since we don't
10:39have an.
10:40Still here, you don't have a drawdown, but in effect the, the unrealized PNL would definitely
10:44have some drawdown given that.
10:45This is mid cap segment.
10:46You definitely have it.
10:47And these are the, the month wise.
10:50returns for the, for those five, six years that we talked about.
10:53And then if you look at the.
10:55Year on year returns between the strategy and the benchmark, it consistently beats the benchmark
10:58every single year.
10:59And.
11:00That's how good it is.
11:01In terms of the, the fund usage, all four lakhs basically was.
11:05Invested within the first two, three months.
11:07And then throughout the period of four lakhs was basically invested in.
11:10And then while that was invested in, you can clearly see that how the rest of the portfolio
11:14managed to kind of grew.
11:15Right.
11:16And finally, we have the trade book, all the 604 odd trades that it took.
11:19The, the details are all.
11:20Provided here.
11:21So as part of the, the back testing, you know, package that I talked about, you would
11:24get all the individual.
11:25Trade books, the scenario sheet that we talked about, the back testing Python code, the screener.
11:29Uh, you would also get.
11:30This particular performance sheet as well as part of the, the package.
11:33So I have a little bit more surprise.
11:34So we.
11:35Going to be looking at a few other scenarios, a few other tweaks of the, the nifty shop strategy.
11:39And then I'm going to be.
11:40presenting that in the upcoming videos.
11:41And then finally, I'm going to do one video where I'm going to compare all of the, the
11:44nifty shop related.
11:45the nifty shop experience, including the ETF shop, and then do a, an overall comparison
11:48of, you know, how these strategies compare.
11:50against each other, which is the best out of that, right?
11:52So we will clearly rank all of the strategies in the upcoming video.
11:55So watch out for it.
11:56In the NFT shop strategy video, a lot of people asked, you know,
12:00very similar kind of questions again and again.
12:01So what I've tried doing is kind of compile them into the frequently asked
12:04questions so that it answers.
12:05All your questions in one shot.
12:06The first question typically people ask is what happens when a stock goes outside
12:09of the.
12:10The mid cap 50 index, right?
12:11Very common, right?
12:12Because stocks keep coming in going out, although not very regularly.
12:15The scenario happens.
12:16So in that case, what you can actually do is when the stock moves out of the
12:19mid cap 50 index.
12:20If the stock is currently in a profit zone, you can actually sell it and
12:24enclose any.
12:25open positions for that particular stock.
12:26That's one way of doing it.
12:27If it is in loss and the loss is like kind of minimal.
12:30which is less than say 5%, the choice is yours.
12:32You can actually go ahead and just close that and be done with it.
12:35And, you know, it's a small loss given that your overall position size is
12:38anyway, not that big, you know, you.
12:40You can kind of take that kind of fit.
12:41It's not going to be a major difference, but if the loss is.
12:45Kind of big, what you can actually do is kind of wait for it to come back
12:48to the breakeven.
12:48And then at that point in time, you can sell it.
12:51The second question is what happens if the stock continues to fall?
12:53How many times should I average?
12:55The answer is two times averaging the first time you'll buy.
12:57And then after that, additionally, you can do two more times of averaging.
12:59So.
13:00First of all, you'll have three maximum trades per stock.
13:02And that's the limit that this strategy recommends.
13:06The third question that I get asked is, isn't it risky to not have a stop loss?
13:09What if the stock.
13:10It continues to fall, you know, it falls endlessly.
13:12It's a very rare scenario and the specific cases have also been.
13:15tested in the past and then prove that, you know, when you do averaging,
13:18most of these problems, you know, tend to be taken care of.
13:20And similarly, these are not just like penny stocks.
13:22And these are really, really good quality stocks, which is part of the.
13:25The top 50 within that universe.
13:26So chances that this could happen, you know, is very rare.
13:29And if it happens.
13:30You could use one of these strategies that we discussed about to manage it.
13:33And lastly, how many trades can I take per day?
13:34The limit.
13:35The limit is one.
13:35So if you're doing a fresh buy, which is that you don't have the stock
13:38within the five stocks that are selected, if you don't have it within your.
13:40You buy only one on that particular day, you don't do any averaging.
13:43In case of all of the five stocks.
13:45Stocks are part of your holding.
13:46Again, you do averaging only once the stock that has fallen the most.
13:49In addition to this.
13:50If you have any further questions, please drop that in the comment box below.
13:53I'll answer every single one of them.
13:55If you've enjoyed this video, don't forget to like, subscribe and share it with your trading
13:59friends.
14:00It really helps.
14:00It helps your channel grow.
14:01And do check out our community website, fabrader.in.
14:03You might find a lot of similar useful stuff there.
14:05So until next time, this is Vivek from Fab Freedom wishing you profitable trades and peaceful
14:09wealth building.
Comments