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
- 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 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.
| Measure | Base | Volume ratio below 1.2 (mirror) | Busy days, 5 bps a side | Buy and hold |
|---|---|---|---|---|
| CAGR | 0.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 ratio | 0.09 | 0.73 | -0.16 | 0.64 |
| Sortino ratio | 0.13 | 1.04 | -0.22 | n/a |
| Growth of $10,000 | $10,841 | $75,907 | $6,051 | $82,292 |
| Time in the market | 21.3% | 78.7% | 21.3% | 100.0% |
| Round trips | 583 | 583 | 583 | n/a |
| Round trips per year | 29.2 | 29.2 | 29.2 | n/a |
| Win rate | 58.7% | 48.5% | 56.9% | n/a |
| Average win | 0.9% | 2.3% | 0.9% | n/a |
| Average loss | -1.2% | -1.5% | -1.2% | n/a |
| Payoff ratio | 0.75 | 1.61 | 0.73 | n/a |
| Average days held | 1.8 | 6.8 | 1.8 | n/a |
| Expectancy per trade | 0.0% | 0.4% | -0.0% | n/a |
| Profit factor, per day | 1.04 | 1.17 | 0.94 | 1.13 |
| Profit factor, per trade | 1.07 | 1.53 | 0.97 | n/a |
| Indicator, last day | 1.38 | 1.38 | 1.38 | n/a |
| Indicator, 10th / 50th / 90th percentile | 0.663 / 0.943 / 1.428 | 0.663 / 0.943 / 1.428 | 0.663 / 0.943 / 1.428 | n/a |
| Days the rule alone is long | 21.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 days | Value |
|---|---|
| Largest one-day gain | 14.5% on 13 Oct 2008 |
| Largest one-day loss | -10.9% on 16 Mar 2020 |
| CAGR without the 10 largest gains | 6.6% |
| CAGR without the 30 largest gains | 1.8% |
| CAGR without the 10 largest losses | 16.0% |
| CAGR without the 30 largest losses | 22.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.
| Choice | How it is computed | In the code |
|---|---|---|
| Data | Daily 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. | |
| Window | The 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. | |
| Backtest | The 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 volatility | A 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 statistics | The 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 hold | The 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 volume | Simple 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 rule | Long while the ratio is strictly above 1.2, otherwise flat (the module's default). | SPECpackages/shared/engine/indicators/vol_ratio.ts |
| Volume data | Daily 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 costs | A 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 cash | The 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 functions | The 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
| Measure | What it compares | Direction | Typical use |
|---|---|---|---|
| Volume ratio (relative volume) | Today's volume with its recent average | None | Confirm a breakout; flag unusual days |
| Raw volume | Nothing: shares traded | None | Liquidity; changes with the fund's size over the years |
| On-balance volume | Cumulative volume signed by the day's direction | Yes | Divergences between volume and price |
| Rolling VWAP deviation | The close with a volume-weighted average price | Yes | Trend: above or below where volume traded |
| ATR% | Daily price range with its recent average | None | Volatility 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
- 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.
- Gervais, S., Kaniel, R. and Mingelgrin, D. H. (2001) The High-Volume Return Premium. Journal of Finance 56(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.
- 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.