Formula guide

How MomentumScore scores a stock

A score formula turns each stock's recent price moves into one number. Every stock gets a score, the highest score gets rank 1, and your portfolio holds the top ranks. This page explains every part of a formula in plain words, with real numbers.

The idea in one line

Momentum investing means owning what is already rising, and letting go when it stops. MomentumScore does this with fixed rules:

Score every stock Rank them, 1 = best Buy the top N Every rebalance: sell what fell below the exit rank, refill from the top

The formula is the only part you write. Everything else (how many stocks, the exit rank, how often to rebalance) is a setting. Change the formula, backtest it on 10+ years of data, and see how the rule would have done before you put money in.

Performance: ret(1w), ret(3m), …

Performance is how much the price moved over a period, as a percentage. ret(1w) is the 1 week performance: today's closing price against the closing price 1 week ago.

1 Week Performance = (today's close ÷ close 5 trading days ago) − 1
  • A week is 5 trading days, not 7 calendar days. Saturdays, Sundays and market holidays do not count. If today is Friday, "1 week ago" is last Friday's close. After a holiday week, it reaches back a little further.
  • A month is 21 trading days and a year is 252 trading days, which is roughly what the NSE trades.
  • Splits and bonus issues are adjusted. When a ₹1,000 share splits into two ₹500 shares, that is not a 50% fall. Old prices are scaled so the return stays true.
  • It is measured on the closing price of the day the ranks are worked out.
Live example: the NIFTY 50 on 25 Sep 2026
1 WEEK PERFORMANCE · ret(1w)
Close on 25 Sep (latest close)23,140.50
Close on 18 Sep (5 trading days back)23,346.40
ret(1w) = 23,140.50 ÷ 23,346.40 − 1-0.88%
3 MONTH PERFORMANCE · ret(3m)
Latest close23,140.50
Close on 29 Jun (63 trading days back)23,946.25
ret(3m)-3.36%
Other measures for NIFTY 50 the same day: ret(1m) -4.41% · ret(6m) +2.79% · ret(1y) -8.98% · vol(6m) 13.7%. The NIFTY 50 index is used here only to show the maths. The same calculation runs on every stock and ETF, with prices adjusted for splits and bonuses.
Measuring in weekly or monthly candles

Strategies have an Interval setting that changes where "1 week back" lands: Day (default) counts 5 trading days back. Week uses the close of the weekly candle 1 week back. Month uses the close of the monthly candle. Calendar uses the same date N months back, the way a fund factsheet does. For most stock strategies, keep Day.

Volatility: vol(6m), …

Volatility is how bumpy the ride was over the period, in other words how much the price jumped around from day to day. A stock that climbs a little every day has low volatility. One that shoots up 8% and falls 6% the next day has high volatility, even if it ends up in the same place.

Stock A: steady
6-month return +30% · volatility 18%
ret(6m) / vol(6m) = 0.30 ÷ 0.18 = 1.67
Stock B: wild
6-month return +35% · volatility 55%
ret(6m) / vol(6m) = 0.35 ÷ 0.55 = 0.64

Why divide by volatility? On return alone, B wins (35% beats 30%). Divided by volatility, A wins by a wide margin. Smooth trends tend to carry on, and wild ones tend to reverse and cause deep drawdowns. That is why most good momentum formulas have a vol(…) underneath.

For the curious: volatility is the standard deviation of daily log returns over the period, annualised (× √252). A vol(6m) of 25% means the price typically swings about 25% over a year's worth of days.

Every period you can use

Each period works with both ret(…) and vol(…). That gives 13 periods × 2 = 26 building blocks.

WriteOr in wordsTrading daysReads as
ret(1w) vol(1w)1 Week Performance · 1 Week Volatility5 the last week
ret(2w) vol(2w)2 Week Performance · 2 Week Volatility10 the last 2 weeks
ret(3w) vol(3w)3 Week Performance · 3 Week Volatility15 the last 3 weeks
ret(4w) vol(4w)4 Week Performance · 4 Week Volatility20 the last 4 weeks
ret(5w) vol(5w)5 Week Performance · 5 Week Volatility25 the last 5 weeks
ret(1m) vol(1m)1 Month Performance · 1 Month Volatility21 the last month
ret(2m) vol(2m)2 Month Performance · 2 Month Volatility42 the last 2 months
ret(3m) vol(3m)3 Month Performance · 3 Month Volatility63 the last 3 months
ret(4m) vol(4m)4 Month Performance · 4 Month Volatility84 the last 4 months
ret(5m) vol(5m)5 Month Performance · 5 Month Volatility105 the last 5 months
ret(6m) vol(6m)6 Month Performance · 6 Month Volatility126 the last 6 months
ret(9m) vol(9m)9 Month Performance · 9 Month Volatility189 the last 9 months
ret(1y) vol(1y)1 Year Performance · 1 Year Volatility252 the last year

Short periods (1w–1m) react fast but are noisy. Long periods (6m–1y) are slow and steady. Many strong formulas mix a short and a long one.

Writing a formula

What you can use
  • + − × ÷, written + - * /
  • Brackets ( ) to group, as in school maths
  • Plain numbers 2, 0.5 and percentages 30% (= 0.30)
  • Short form ret(6m) or words 6 Month Performance. Both mean the same.
Rules to remember
  • Higher score = better rank. Rank 1 is the highest score.
  • × and ÷ happen before + and −. ret(3m) + ret(6m) / vol(6m) divides only ret(6m). Use brackets to divide the whole sum.
  • Weights don't have to add up to 100%. Only the proportions between them matter.
  • A stock without enough history is left out. A formula using ret(1y) needs a year of prices, so new listings join later.
Reading a formula out loud
(20% * ret(1m) + 30% * ret(3m) + 50% * ret(6m)) / vol(6m)

"Take 20% of last month's gain, 30% of the 3-month gain and 50% of the 6-month gain, add them up, and divide by how bumpy the last 6 months were." A stock up 4%, 12% and 28% with a volatility of 22% scores (0.2×0.04 + 0.3×0.12 + 0.5×0.28) ÷ 0.22 = 0.84.

Try it: rank three stocks

Change the numbers or the formula and see how the ranks move. This is the same thing MomentumScore does for every stock in your universe on every rebalance day.

Stockret(1w) %ret(1m) %ret(3m) %ret(6m) %vol(6m) %ScoreRank
Notice how "Rocket Ltd" wins on plain return but drops once volatility is in the formula. In the app, every value is measured from real prices.

Formula recipes

Starting points to copy into the formula builder, then backtest and tune. None of them is a recommendation. Always check the backtest, drawdown and costs first.

Pure 6-month momentum
ret(6m)

The simplest rule: whatever went up the most in the last 6 months ranks first.

Beginners, a first backtest
Smooth risers
ret(6m) / vol(6m)

The 6-month gain for each unit of bumpiness. A steady 30% beats a wild 35%.

Most stock momentum portfolios
Blend of three horizons
(ret(3m) + ret(6m) + ret(1y)) / vol(6m)

Rewards stocks strong over 3, 6 and 12 months, not only in one burst.

Monthly rebalance, 15-25 stocks
Weighted blend
(20% * ret(1m) + 30% * ret(3m) + 50% * ret(6m)) / vol(6m)

Recent months count, but the 6-month trend carries half the weight.

Anyone who wants to tune the mix
Each period on its own risk
ret(3m) / vol(3m) + ret(6m) / vol(6m) + ret(1y) / vol(1y)

Three risk-adjusted scores added together, each over its own window.

Lower drawdown portfolios
Fast ETF rotation
ret(1w) + ret(2w) + ret(3w) + ret(4w)

Leans on the last month, most of all on the last week. Switches quickly.

Weekly ETF rotation

Questions people ask

The percentage change from the close 5 trading days ago to today's close. If a stock closed at ₹200 last Friday and ₹210 today (Friday), its 1 week performance is +5% (0.05 in the formula).

No. A score is only used to sort stocks, and its size doesn't mean anything on its own. What matters is which stock scores higher. Returns and volatility go into the formula as fractions (10% = 0.10).

Yes, when a stock has fallen over the period. It still gets a rank. In a falling market even the top ranks can have negative scores, which is where the regime filter (go to cash or gold when the index trend turns down) helps.

Either it isn't in the universe you picked (for example NIFTY MIDSMALLCAP 400), it fails the minimum or maximum price, or it doesn't have enough history for the longest period in your formula.

Short periods (1w to 1m) follow fast moves but trade more often and pay more costs. Long periods (6m to 1y) trade less and are steadier. Backtest both. The Parameter Sweep and Compare pages exist for this.

No. 20%/30%/50% and 2/3/5 give exactly the same ranks. Only the proportions between the parts matter.

Something in the formula isn't a known measure. Check the spelling (ret, vol), the period (1w to 5w, 1m to 6m, 9m, 1y) and that every bracket is closed. The builder checks as you type and points to the part it couldn't read.

No. A backtest shows how fixed rules would have behaved on past prices, including costs. Markets change. Use it to compare rules and understand drawdowns, not as a forecast.

Put your formula to the test

Backtest any formula on 10+ years of NSE data, with costs, in under a minute.

Start 7-day free trial

MomentumScore is a research and backtesting tool, not investment advice. Not registered with SEBI as an investment adviser or research analyst. Backtested results are hypothetical and past performance does not guarantee future returns. Disclaimer