What is the volume ratio (relative volume)? Formula and a backtest

On this page

Key takeaways

  • The volume ratio compares today's trading volume with the average of recent days: above 1 is busier than usual, below 1 quieter.
  • It carries no direction. Heavy volume comes with panics as often as with breakouts, so on its own it cannot say whether to buy.
  • Volume jumps when prices move sharply and when news arrives, so high readings cluster in turbulent markets.
  • Traders use it to confirm another signal, for example acting on a breakout only when the day's volume is above its average.
  • A rule that acts on single busy days changes position often, so trading costs weigh heavily on it.

Definition

The volume ratio, also called relative volume, divides a day's trading volume by the average volume of recent days, so a reading above 1 marks a busier day than usual and a reading below 1 a quieter one. It measures participation, not direction: a heavy-volume day can be a sharp rally or a sharp sell-off.

Also known as: relative volume, RVOL, volume ratio indicator, unusual volume, volume spike, volume vs average volume.

How it works

Take today's volume and divide it by the average volume of the last 20 trading days, today included. A reading of 1 is an ordinary day. A reading well above 1 means many more shares changed hands than usual, a reading well below 1 a thin, quiet session. Because the average is recent, the ratio adapts as a fund's normal volume grows or shrinks over the years, which raw volume does not.

Most days read a little below 1. Volume is lopsided: a few very heavy days, around sell-offs, news, option expiries and index rebalancing, pull the average up, so a typical day sits under it. That shape matters for thresholds. A rule that waits for a ratio above a level such as 1.2 is waiting for days that are uncommon by construction.

Volume and price changes are linked in size more than in sign. Jonathan Karpoff's survey of the evidence in 1987 found that volume rises with the absolute size of price changes, up or down. So a busy day says the market is moving and disagreeing, not which way the disagreement resolves. For individual stocks, Gervais, Kaniel and Mingelgrin found in 2001 that unusually high volume was followed by higher returns over the next month, an effect across stocks, not a rule for timing one fund.

The volume ratio is like the number of people in a shop compared with a normal afternoon: a crowd says something is happening, a sale or a fire alarm, but not which one.

That is why volume is usually a second condition. A breakout on heavy volume is read as more credible than one on light volume, and a sell-off on heavy volume as capitulation. Used alone, a rule that holds a fund after busy days ends up holding it after many of the worst days, because those are the busiest.

Formula

Volume ratio of day t
VRt=Vt1n∑k=0n−1Vt−k
Vₜ
shares traded on day t
n
the averaging period: 20 by default
k
how many days back; k = 0 is today, so today is part of its own average

Because today is inside the average, the ratio can never exceed n: a day with all of the period's volume would read exactly n.

The busy-day rule tested here
st={1VRt>θ0otherwise,rt+1rule=st·rt+1−c·|st−st−1|
θ
the threshold: 1.2 by default
sₜ
the position decided at the close of day t: 1 = hold, 0 = cash
rₜ₊₁
the fund's total return on the next day
c
one-way trading cost as a fraction (5 basis points = 0.0005), charged on each entry and each exit

Worked example

SPY daily bars from Oct 2006 to Sep 2026, about 20 years. The busy-day rule holds SPY for the next day after a day whose volume was more than 1.2 times its 20-day average, otherwise cash, with no trading costs; its mirror image holds SPY after every other day.

SPY's volume ratio had a median of 0.94: on a typical day volume was under its recent average, because a few very heavy days lift the average. The busy-day condition held on 21.3% of days, so the rule was invested 21.3% of the time, in 583 separate stretches, 29.2 a year, each lasting 1.8 days on average.

The busy-day rule grew 0.4% a year with volatility of 11.6% and a worst decline from a peak of -43.7%. The mirror rule grew 10.7% a year with volatility of 15.6% and a worst decline of -36.0%. Holding SPY throughout: 11.1% a year, 19.4% and -55.2%.

As with any pair of rules that split the days between them, their results multiply back to buy-and-hold: $10,000 became $10,841 under the busy-day rule and $75,907 under the mirror rule, and the first times the second, divided by $10,000, gives buy-and-hold's $82,292 apart from rounding. Whatever one side earned, the other did not.

The busy-day rule changes position often, so costs matter. Charged 5 basis points on each entry and each exit, its growth fell from 0.4% to -2.5% a year, with the same days in the market.

Data through Sep 2026. Reproduce id 82a09b396e9bb98d (this guide, its lab setup and the data month).

Interactive lab

SPY's price with the days the rule held it shaded, the volume ratio underneath with its threshold, and the results of the busy-day rule, its mirror image, the busy-day rule with costs and buy-and-hold over the same days. Change the averaging period, the threshold, the delay, the cost or the fund.

SPY price with the days the base rule held itS&P 500, adjusted daily close, Oct 2006 to Sep 2026, log scale. Shaded: the 583 stretches the base rule held the fund (21% of 5030 days).$50$100$200$50020062011201620212026SPY adjusted closeHeld by the base rule
SPY on a log scale. Shaded: the days the base rule held the fund. Oct 2006 to Sep 2026.
Volume ratio with the base rule's lineVolume ratio on SPY, Oct 2006 to Sep 2026. The rule compares it with the fixed line 1.2.0.511.522.533.5200620112016202120261.2Volume ratio
Volume ratio and the line the base rule compares it with. Oct 2006 to Sep 2026.
Growth of $10,000: the setups against buy and holdS&P 500, Oct 2006 to Sep 2026, log scale. $10,000 grows to $10,841 (base), $75,907 (Volume ratio below 1.2 (mirror)), $6,051 (Busy days, 5 bps a side), $82,292 (buy and hold).$5k$10k$20k$50k20062011201620212026Base ruleVolume ratio below 1.2 (mirror)Busy days, 5 bps a sideBuy and hold
Growth of $10,000 on a log scale, same days for every line. Oct 2006 to Sep 2026.
MeasureBaseVolume ratio below 1.2 (mirror)Busy days, 5 bps a sideBuy and hold
CAGR0.4%10.7%-2.5%11.1%
Volatility (annualized)11.6%15.6%11.6%19.4%
Maximum drawdown-43.7%-36.0%-56.4%-55.2%
Sharpe ratio0.090.73-0.160.64
Sortino ratio0.131.04-0.22n/a
Growth of $10,000$10,841$75,907$6,051$82,292
Time in the market21.3%78.7%21.3%100.0%
Round trips583583583n/a
Round trips per year29.229.229.2n/a
Win rate58.7%48.5%56.9%n/a
Average win0.9%2.3%0.9%n/a
Average loss-1.2%-1.5%-1.2%n/a
Payoff ratio0.751.610.73n/a
Average days held1.86.81.8n/a
Expectancy per trade0.0%0.4%-0.0%n/a
Profit factor, per day1.041.170.941.13
Profit factor, per trade1.071.530.97n/a
Indicator, last day1.381.381.38n/a
Indicator, 10th / 50th / 90th percentile0.663 / 0.943 / 1.4280.663 / 0.943 / 1.4280.663 / 0.943 / 1.428n/a
Days the rule alone is long21.3%78.7%21.3%n/a

S&P 500, Oct 2006 to Sep 2026, 5030 trading days. Every setup is measured over the same days, with the indicator warmed up on earlier ones; cash earns 0. Base: Volume Ratio (period 20); long while the Volume ratio is above 1.2; execution delay 1; cost 0 bps one way. Volume ratio below 1.2 (mirror): Volume Ratio (period 20); long while the Volume ratio is below 1.2; execution delay 1; cost 0 bps one way. Busy days, 5 bps a side: Volume Ratio (period 20); long while the Volume ratio is above 1.2; execution delay 1; cost 5 bps one way.

Buy and hold, same daysValue
Largest one-day gain14.5% on 13 Oct 2008
Largest one-day loss-10.9% on 16 Mar 2020
CAGR without the 10 largest gains6.6%
CAGR without the 30 largest gains1.8%
CAGR without the 10 largest losses16.0%
CAGR without the 30 largest losses22.1%

The days replaced by 0 are the largest daily gains (or losses) of the window.

How MarketHeist computes it

Every choice an implementation has to make, as the code makes it today. The page is checked against the code each time it is built.

ChoiceHow it is computedIn the code
DataDaily bars (open, high, low, close, volume) of the fund as the MarketHeist data service serves them to the backtester: prices adjusted for splits and dividends, so a dividend counts as reinvested. They come from a snapshot taken each month and cut at the data month of this page, and are not rounded. The fund's own history, not an extension: a fund younger than the window is measured over the years it has.
WindowThe worked example and the lab measure the last 20 years of trading days, Oct 2006 to Sep 2026 (5030 days), ending at the data month of this page. Every setup, and buy and hold, is measured over exactly these days; an indicator is warmed up on the days before them, so changing a setting never moves the window, and a setting that needs more history than exists before the window is refused rather than measured over fewer days.
BacktestThe backtester's own engine, in the order it runs it: the indicator, the position rule (or entry and exit triggers) and the optional regime filter produce a position for every day of the fund's whole history; the position is then shifted forward by the execution delay and applied to each day's return over the window. Cash earns 0, there is no leverage, and a one-way cost in basis points is charged on the size of every change of position. Round trips are the closed entries of the trade log (a trade still open on the last day is not counted); the win rate is the share of them with a gain; the payoff ratio is the average win over the size of the average loss; expectancy is the average return per trade; the per-trade profit factor is the sum of the winning trades' returns over the size of the sum of the losing ones, while the per-day profit factor sums days.
Years and volatilityA year is 252 trading days, the engine's convention: trades per year is round trips over days divided by 252, the CAGR is the growth multiple to the power 252 over the days, and volatility is the sample standard deviation of the daily returns times the square root of 252.
Indicator statisticsThe indicator's main output over the window: its last value, its 10th, 50th and 90th percentile (linear interpolation between ranks), and the share of days the rule alone says long, before the delay and any regime filter. Every output of the indicator is also summarized by its median and the share of days below 0.
Buy and holdThe fund held every day of the window with dividends reinvested. The largest one-day gain and loss are the highest and lowest daily returns; the CAGR without the 10 or 30 largest gains (or losses) replaces those days' returns with 0 and recompounds.
Average volumeSimple moving average of daily share volume over <code>period</code> bars, today included (default 20, from 2 to 300).smapackages/shared/engine/utils.ts
Ratio (the signal)Today's volume divided by that average; no value while the average is not yet available or is 0. This is the primary output the position rule reads; the indicator needs volume only.computepackages/shared/engine/indicators/vol_ratio.ts
Default ruleLong while the ratio is strictly above 1.2, otherwise flat (the module's default).SPECpackages/shared/engine/indicators/vol_ratio.ts
Volume dataDaily share volume as the data source reports it for the fund, adjusted for share splits; the price side uses the dividend-adjusted close.yahooResultToRowspackages/platform/ohlcv.ts
Trading costsA one-way cost in basis points, charged on every bar where the position changes, in proportion to the size of the change: an entry and an exit each pay it once. Buy-and-hold pays nothing.runBacktestpackages/shared/engine/backtest.ts
Timing and cashThe position decided at a bar's close is applied to the next bar's return (execution delay 1); cash earns 0.runBacktestpackages/shared/engine/backtest.ts
Engine functionsThe functions the portfolio app and the MarketHeist MCP tools run, called here on the same monthly returns.computePositionpackages/shared/engine/run_basic.tsgeneratePositionpackages/shared/engine/positions.tsapplyRegimeFilterpackages/shared/engine/regime_filter.tsgenerateTriggeredPositionpackages/shared/engine/triggered_position.tsrunBacktestpackages/shared/engine/backtest.tsgetIndicatorpackages/shared/engine/indicators/registry.ts

Volume ratio (relative volume) compared with its neighbours

The volume ratio and other ways to read volume
MeasureWhat it comparesDirectionTypical use
Volume ratio (relative volume)Today's volume with its recent averageNoneConfirm a breakout; flag unusual days
Raw volumeNothing: shares tradedNoneLiquidity; changes with the fund's size over the years
On-balance volumeCumulative volume signed by the day's directionYesDivergences between volume and price
Rolling VWAP deviationThe close with a volume-weighted average priceYesTrend: above or below where volume traded
ATR%Daily price range with its recent averageNoneVolatility filters and stops

Limitations

  • Volume has no direction. A busy-day rule holds the fund after heavy sell-offs as readily as after heavy rallies.
  • Some heavy days are mechanical: option expiries, index rebalancing and the last days of a quarter lift volume without any news about the fund.
  • A ratio counts shares, not dollars, and the data source's volume can differ from another source's depending on which venues are included. Comparisons across sources or across funds are rough.
  • Rules on daily volume spikes trade often, so the zero-cost result overstates what a trader would have kept; the cost variant in the example shows the size of the gap at one cost level.
  • The test ignores spreads and taxes, earns nothing on cash and describes one historical path of one fund.

Frequently asked questions

What is a high relative volume?
There is no fixed cutoff. A day with twice the recent average volume is uncommon for a broad index fund; screeners for individual stocks often look for larger multiples. Compare a reading with the fund's own distribution, as the percentiles in the lab do.
Why is the volume ratio below 1 on most days?
Because volume is lopsided. A few very heavy days lift the average, so an ordinary day sits a little under it, and the median ratio is below 1.
Does high volume predict returns?
Not reliably for one fund's direction. Volume is linked to the size of price moves in both directions. Studies across many stocks have found that unusually high volume was followed by somewhat higher returns on average, but that is an effect across stocks over weeks, not a timing rule for an index fund.
How is the volume ratio used with other indicators?
As a second condition: act on a price signal only when the day's volume is above its average, or ignore signals on thin days. In the backtester that means combining two entry triggers, one of them on the volume ratio.

References

  1. Karpoff, J. M. (1987) The Relation Between Price Changes and Trading Volume: A Survey. Journal of Financial and Quantitative Analysis 22(1). Volume rises with the absolute size of price changes.
  2. Gervais, S., Kaniel, R. and Mingelgrin, D. H. (2001) The High-Volume Return Premium. Journal of Finance 56(3).
  3. Lo, A. W. and Wang, J. (2000) Trading Volume: Definitions, Data Analysis, and Implications of Portfolio Theory. Review of Financial Studies 13(2). How to measure volume and turnover.
  4. Blume, L., Easley, D. and O'Hara, M. (1994) Market Statistics and Technical Analysis: The Role of Volume. Journal of Finance 49(1).

Try it on your own holdings

Run the volume-ratio rule on SPY in the backtester →

Or ask an assistant connected to the MarketHeist MCP server (https://marketheist.io/mcp), which computes the same figures:

Using MarketHeist.io, backtest SPY on daily bars with the volume ratio (20-day average): hold SPY the day after volume is more than 1.2 times its average, otherwise cash, one-bar delay, over the last 20 years, once with no costs and once with 5 basis points per trade, and compare both with buy-and-hold.

Ask an AI assistant

The prompt opens in a new tab, already filled in. An assistant without the MarketHeist connector answers from its own knowledge, not from the figures on this page.

Historical simulation, not advice. Computed by the MarketHeist portfolio engine from monthly total returns, data through Sep 2026. Markdown version of this page: volume-ratio.md.