Algo Trading
How to super charge Nifty Shop Strategy with Midcap stocks?

FabTrader
Article overview
Most working professionals want a trading system that doesn’t eat up their entire day. You’ve got office work, meetings, and deadlines — staring at charts all day simply isn’t an option.
Most working professionals want a trading system that doesn’t eat up their entire day. You’ve got office work, meetings, and deadlines — staring at charts all day simply isn’t an option.
That’s why strategies like Nifty Shop became popular. It requires only 10 minutes a day, right before the market closes (between 3:20 and 3:30 pm), and it follows fixed, rule-based steps. No complicated setups, no all-day monitoring.
But as good as Nifty Shop is, there has been one consistent complaint: capital often gets stuck for too long.
This got one of our community members, Mr. Vijaynand Mishra, thinking:
👉 What if we used the Midcap 50 stocks instead of the Nifty 50?
I took his hunch and backtested this hypothesis and following are my findings.
The Nifty Shop Strategy: A Quick Refresher
Before we get to the Midcap twist, here are the basic rules of Nifty Shop:
1. Entry Rules
- End-of-day (3:20–3:30 pm), calculate the 20-day moving average (20DMA) for all stocks in the chosen universe.
- Find the top 5 stocks from NIFTY 50 universe trading farthest below their 20DMA (by % difference).
- Starting from the worst underperformer, buy the first stock that isn’t already in your holdings.
- If all 5 are already held, go into averaging mode.
2. Averaging Rule
- If a stock in your portfolio falls 3% below your last buy price, you add another position.
- This allows you to lower your average buy price systematically.
- Maximum average three times per stock
3. Exit Rule
- Profit target: +5% or +8% (depending on the chosen version) above the buy price of any trade (LIFO version).
- Important: exits are processed first, then new entries, so freed-up capital is reused immediately.
4. Capital Management
This is where things get interesting. The strategy supports multiple allocation models:
- Static allocation: e.g., ₹10,000 for every fresh buy and ₹5,000 for every average.
- Dynamic % allocation: allocate a percentage of available cash for fresh and averaging trades.
- Divisor approach: portfolio value ÷ divisor = position size (ensuring cash available supports it).
This flexibility means you can test which allocation suits your risk appetite and capital size.
The Usual Criticism on NiftyShop: Why Funds Get “Stuck”
In the Nifty 50 universe, stocks are large caps — India’s most established companies. They’re stable, but they often move slowly.
This means:
- Profit targets may take weeks (sometimes months) to hit.
- Fresh entries can be scarce because fewer stocks fall far below their moving averages.
- Cash remains idle, waiting for signals.
For a strategy built on steady churn, this is a big drawback.
The Hypothesis: Why Midcap 50 Might Be Better
The NSE Midcap 50 index represents companies ranked just below the Nifty 100 — typically stock #101 to #150 by market cap.
Why this matters:
- Midcaps generally have better price momentum than large caps.
- They fall harder during corrections (more opportunities for entries).
- They bounce back faster (targets hit sooner).
- With quicker churn, fund utilization improves.
So, the hypothesis is: Running Nifty Shop on Midcap 50 should improve capital efficiency and possibly returns.
MidCap50 Backtest Results - Highlights
Following are some glimpse of the backtest results. A detailed report is available on our community store.
Backtest Period : 7 Years (from 1-Sep-2018 to 30-Aug-2025)



The Results: Midcap vs Nifty
- XIRR : Nifty Shop - 30.3% ; MCAP Shop : 34.4%
- Avg Holding Period : Nifty Shop - 117 days; MCAP Shop : 108 days
- Net Pnl : Nifty Shop - 366.7% ; MCAP Shop - 474.4%
- Full Fund Utilisation : Nifty Shop : 2.5 months ; MCAP Shop : 2.5 months
- Max Drawdown (on Realized Pnl) : Nifty Shop : 0.02%; MCAP Shop : 0.02%
👉 The biggest takeaway: As expected, Midcap50 shop proved to have an edge over Nifty50 shop in terms of returns and with comparative drawdown. The average holding period was marginally lesser than the Nifty shop version as well.
What This Means for Traders
- If you value stability and lower volatility, Nifty 50 still makes sense.
- If you prefer faster churn, better utilization, and don’t mind slightly higher volatility, Midcap 50 might be a better universe for this strategy.
- Either way, the rules remain simple enough to follow in 10 minutes a day.
For the Community
To help others explore this further, I’ve packaged everything into a Community Shop resource:
- ✅ Full Python backtest code
- ✅ Trade logs (CSV)
- ✅ A full Strategy Performance Metric Report with Equity Curve, drawdown, XIRR, CAGR, Fund Utilisation, Monthly returns heatmap and a year-on-year report on whether the strategy exceed benchmark returns
- ✅ A Python daily screen which can pick the top 5 stocks for you automatically
You can grab it here → [Community Shop Link]
How I Backtested This
I have a full-fledged backtesting framework in Python, built to test trading strategies with precision.
More from Algo Trading
Algo Trading Cost in India: How I Built a Reliable Setup for ₹150/Month
Wondering how much algo trading costs in India? In this article, I break down the real expenses involved in running an algorithmic...
When Your Job Feels Shaky: Can Trading Become an Alternate Income Stream?
Can trading become a stable source of income in India? While many consider it during times of job uncertainty, the reality is...
How Much Capital Do You Really Need for Sustainable Trading Income in India?
How much capital is needed for sustainable trading income in India? This in-depth guide explores the realistic returns traders can expect, the...
