VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Indicators and signals

eVWAP explained: anchored VWAP rules tested on ES futures

eVWAP is an anchored VWAP: a volume-weighted average price that starts at a point you choose and runs on from there instead of restarting each session. A rule built on it can be backtested on futures when the anchor is placed by a written rule; an anchor picked by eye after seeing the chart cannot be tested and flatters the result.

By · Published · updated · Editorial policy

Contents
  1. What is eVWAP and how does it differ from VWAP?
  2. How is VWAP calculated from price and volume?
  3. How do you choose the anchor point for an anchored VWAP?
  4. Can eVWAP be used for entries and exits?
  5. What does a price-versus-VWAP backtest on ES futures show?
  6. What are the limits of VWAP on intraday bars?
  7. Frequently asked questions
  8. References

What is eVWAP and how does it differ from VWAP?

eVWAP is an anchored VWAP: a volume-weighted average price that starts at a point you choose and runs on from there, instead of restarting at every session open like ordinary VWAP. A rule built on it can be backtested on futures, but only when the anchor is placed by a written rule, not by eye.

VWAP (volume-weighted average price) is the average price paid for all contracts traded since a starting point, where each bar counts in proportion to its volume. The VWAP indicator page covers the definition in full; this article is about testing it. Session VWAP is the common version: it starts at the session open and is thrown away at the next open. eVWAP keeps one line running from an anchor, which is the bar you name as the start. The letter in the name points to the event or point the line starts from; some charts call the same line an anchored VWAP.

A session VWAP is like a taxi meter that resets for every passenger. An eVWAP is one meter that you started at a place of your choosing and never reset. Both measure the same thing, the average price weighted by how much traded, but over different stretches of time. Among the technical analysis tools and indicators a trader can test, VWAP is one of the few that uses volume, which is also why its result depends on the volume field in your data (the last section covers this).

PropertySession VWAPeVWAP (anchored VWAP)
Start pointSession open, every dayOne bar you choose
ResetDailyNever, until you move the anchor
What it showsAverage price paid todayAverage price paid since the anchor
Behaviour late in its lifeHard to move by the afternoonHard to move after a few sessions
When the two agreeOnly when the anchor is the session open, and only until the next open
Two panels of the same three illustrative trading days: on the left a session VWAP line that jumps back to price at each session open, on the right one eVWAP line anchored at the first day's low that runs across all three days without a reset eVWAP never resets Grey is price; three made-up days Session VWAP eVWAP, one anchor Same formula, different start. So: name the start bar in the rule.
Session VWAP restarts each day; eVWAP runs on from one chosen anchor. The two lines are the same calculation over different stretches of bars.

How is VWAP calculated from price and volume?

VWAP is the running sum of each bar's typical price times its volume, divided by the running sum of volume, so a heavy-volume bar pulls the line more than a quiet bar and the line gets harder to move the longer it runs. The typical price is the average of a bar's high, low and close, a single number that stands for where trading happened inside that bar.

The one formula in this article:

VWAP = sum of (typical price × volume) ÷ sum of volume

Here typical price is the average of high, low and close of one bar, volume is the number of contracts traded in that bar, and both sums run from the anchor bar up to the current bar. Think of a bucket of water. Each bar pours in some water (its volume) at some temperature (its price). The water in the bucket has one temperature, the VWAP. A big pour changes the temperature a lot; a small pour barely changes it; and the fuller the bucket, the less any new pour can move it.

Hypothetical example

Five bars after the anchor, typical price and volume in contracts: 100 / 10, 102 / 40, 101 / 10, 104 / 30, 103 / 10. Price times volume per bar: 1,000; 4,080; 1,010; 3,120; 1,030. Running sums of price times volume: 1,000; 5,080; 6,090; 9,210; 10,240. Running sums of volume: 10; 50; 60; 90; 100. Running VWAP: 100.0; 101.6; 101.5; 102.3; 102.4. The 40-contract bar at 102 moved the line by 1.6 points. The last 10-contract bar at 103 moved it by 0.1 point, because 90 contracts were already in the bucket.

Five illustrative bars after the anchor with price, volume, running VWAP and how far each bar moved it: the 40-contract bar at 102 moves VWAP by 1.6 points, while the last 10-contract bar at 103 moves it by only 0.1 Heavy bars move VWAP Five made-up bars after the anchor Price Volume VWAP Move 100 102 101 104 103 100.0 101.6 101.5 102.3 102.4 10 40 10 30 10 — +1.6 −0.1 +0.8 +0.1 Heavy bars pull; old lines stiffen. So: note the anchor's age in tests.
The running VWAP from the example above. The heavy bar moves the line; the light bars late in the series barely move it.

Two consequences matter for testing. First, VWAP is not a moving average: nothing drops out of the window, so an old high-volume bar keeps its weight for the whole life of the line. Second, the line stiffens with time, so a rule that reads "price crosses VWAP" fires often in the first bars after the anchor and rarely later. A backtest of an anchored line therefore behaves differently depending on how old the anchor is when the rule fires.

How do you choose the anchor point for an anchored VWAP?

Pick the anchor by a written rule that a program can repeat from the data alone, because an anchor chosen by eye after seeing the chart cannot be tested and tends to flatter the result. An anchor is the bar at which the running sums in the formula above start. The best-looking anchored VWAP charts place the anchor at a major low or high that was only known to be major weeks later. A backtest placed at that bar is using the future.

Anchors that a backtest can place:

  1. Session open. The anchor is the first bar of each session. This gives the ordinary session VWAP and is the easiest to test.
  2. Prior swing high or low, defined by N bars. A swing low is a bar whose low is below the lows of the N bars on each side. The anchor moves to the new swing each time one is confirmed, which is N bars after the swing bar itself. The rule must use the confirmation bar as the first bar it can act on, not the swing bar.
  3. Settlement, expiry or roll day. The anchor is the first bar after a contract month settles or after your continuous series rolls. For TAIEX futures this is a fixed monthly date; for ES it is quarterly.
  4. Scheduled economic release or options expiry. The anchor is the first bar after a dated event. Traders who follow gamma exposure (GEX) levels sometimes anchor at the expiry that reset those levels, because the positions that produced them were built from that date onward.
Five anchor types: session open, swing of N bars, roll day and dated release can be found by a program from past bars and reset daily, on each new swing, per roll and per event; an anchor picked by eye cannot be found by a program and cannot be repeated Which anchors can be tested? Found from past bars alone Anchor Testable Resets Session open Swing, N bars Roll day Dated release Picked by eye Yes Yes Yes Yes No Daily New swing Per roll Per event Can't repeat An anchor by eye cannot be tested. So: write the anchor as a rule.
Four anchor types a program can place from the data, and the one it cannot. Only the first four can go into a backtest.

The hand-picked chart turn is missing from the list for a reason. If you anchor at "the obvious low in April", you chose that low after watching price rise away from it. The line you draw from it will sit under price for most of the rise, and a rule of "buy when price is above the anchored VWAP" will look excellent on exactly the chart that made you choose the anchor. The same rule tested on anchors placed by the swing definition, including the swings that failed, is the honest version.

Can eVWAP be used for entries and exits?

A VWAP line gives three testable rule types, trade on the side of price relative to the line, enter on a pullback to the line, or exit when price returns to the line, and each one must be written as a fixed condition on bar closes before it is tested. The question people ask, "can eVWAP be used for entries and exits", has a short answer: yes, once the rule names which bar close triggers which order.

Rule typeEntry conditionExit conditionWhat it bets on
Side of lineBar closes above the line: long. Below: short.Bar closes on the other side of the lineBuyers since the anchor are in profit and keep buying
Pullback to linePrice was above the line, a bar touches the line and closes back above it: longFixed target, trailing stop, or close below the lineThe line acts as a price buyers defend
Exit at lineAny other entry ruleBar closes at or across the lineThe average price paid is where a move loses its fuel

Written out in order, a side-of-line rule looks like this:

  1. Place the anchor by one of the rules from the previous section.
  2. Wait for a bar to close above the line (long) or below it (short). Reading the close, not a touch inside the bar, keeps the test from using a price that was only known after the fact.
  3. Send the order at the next bar's open. The decision is made on the close; the fill comes later.
  4. Close the position when a bar closes on the other side of the line, and, if the rule reverses, open the opposite position at the next open.
A VWAP rule in four fixed steps: anchor set by rule, a bar closes past the line, the order goes in at the next bar's open, and the position closes when a bar closes back across the line; a side box names the three rule types: side of line, pullback and exit at line Test on bar closes, in order One rule, four fixed steps 1 2 3 4 Anchor set by rule Bar closes past line Order at next open Close on cross back Three types Side of line Pullback Exit at line Decide on the close, fill next bar. So: test the VWAP rule alone first.
A VWAP rule becomes testable only as fixed close-of-bar conditions in a set order. The side box lists the three rule types and their triggers.

Test the VWAP condition alone before adding anything to it. A pullback rule is often paired with an oscillator to time the turn, for example the KD (Stochastic) indicator and its overbought and oversold readings, but a pair tested together does not tell you which part did the work. Run the VWAP condition on its own first, read its trade count and average trade after costs, then add the second condition and see what changed. The next section does exactly that with the plainest rule, side of line, and nothing else.

What does a price-versus-VWAP backtest on ES futures show?

A single-rule price-versus-VWAP strategy on ES daily bars from 2019 to mid-2025, with $20 commission and $25 slippage per trade and no stop or filter, produced the one candidate the search kept out of 1,024, and its numbers show both what the rule did and why picking the kept one after the fact flatters it. The run used AlphaPrime (Valynox) on ES daily bars from 2019-01-02 to 2025-06-30, long and short, one contract. The rule is a stand-in for the intraday anchored line described above: the tested line is built from daily bars and starts where the rule sets it, not from an anchor you place on an intraday chart.

Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.

NumberResult
Net profit (closed trades)$109,660
Max drawdown$56,977.5
Trades67
Win rate65.67%
Profit factor1.769
Average trade$1,636.72
Time in market91.62%

Read the numbers together, not one at a time. The time in market of 91.62% says the rule was in a position almost all the time, so this is close to a switch between long and short rather than a rule that waits for a setup. Over a period in which the S&P 500 rose for most of the years covered, a rule that is long whenever price sits above an average price will spend most of its time long and will collect part of that rise. The 67 trades over six and a half years, about one a month, and the average trade of $1,636.72 fit that picture: few trades, each held for weeks. The $20 commission and $25 slippage per trade are small next to that average trade, which is the opposite of the intraday case, where costs decide the result.

Look at how long each drawdown lasted, how the curve behaves in the marked out-of-sample stretch compared with the earlier part, and whether the gains came in a few steps or spread across the years.
Look at how long each drawdown lasted, how the curve behaves in the marked out-of-sample stretch compared with the earlier part, and whether the gains came in a few steps or spread across the years. ES · daily · 2019-01-02 to 2025-06-30 · CPU engine backtest

The max drawdown of $56,977.5 on one contract is the number to hold against the net profit of $109,660. A trader who lived through this curve would have given back a large share of the gains at one point and held on through it with no stop and no filter, because the rule had neither. The profit factor of 1.769 and win rate of 65.67% describe the closed trades; they say nothing about how long the open losses ran while a trade waited for a close on the other side of the line.

Compare net profit with max drawdown, then check that the trade count is high enough for the win rate and profit factor to mean something.
Compare net profit with max drawdown, then check that the trade count is high enough for the win rate and profit factor to mean something. ES · daily · 2019-01-02 to 2025-06-30 · CPU engine backtest

Now the part that flatters. This candidate was kept out of 1,024 the search tried, chosen for its return against its drawdown after all 1,024 results were known. The other candidates differed in their settings and most of them did worse. Choosing the best of many after the fact lifts the kept result above what the rule would do on new data; Bailey, Borwein, López de Prado and Zhu (2014) show how large this lift becomes as the number of tries grows, and why the best backtest in a search is usually inflated explains the mechanism in plain words. Nothing in the table says that a price-versus-VWAP rule earned this money or that a reader can expect it. What the table says is that the plain rule, with costs, traded about once a month and carried a drawdown of more than half its profit on the way. Every one of the 1,024 candidates paid the $20 commission and $25 slippage and was filled on the bar after the signal, because that is how backtesting in AlphaPrime treats each evaluation, so the kept candidate was not the one that looked best only before costs.

What are the limits of VWAP on intraday bars?

On intraday bars VWAP depends on the volume field, the session boundary and the time zone of the data, so a backtest must check all three before any VWAP rule result is trusted, and futures volume split across contract months adds a fourth check near roll dates. Daily bars hide these problems because each bar already is one session with one total volume. Intraday bars expose them.

SettingDaily barsIntraday barsWhat to check in the data
Volume fieldTotal contracts for the dayPer-bar volume that may be missing, estimated from tick counts, or from one data feed onlySum the bar volumes of one day and compare with the exchange's daily volume for that contract
Session boundaryOne bar per day, no setting neededThe exchange session start must be set correctly, or the session VWAP resets at the wrong barFind the first bar of a session in your data and confirm it is the session's first trade time
Time zoneDate onlyIf the data is stamped in another zone, every bar shifts and the reset lands in the middle of tradingCheck the time stamp of a known event, such as the US cash-equity open, against your chart
Contract rollOne roll gap in priceVolume is split between two contract months for several days around the rollLook at volume per month in the roll week; decide which month's bars the VWAP reads
Four data settings compared on daily and intraday bars: volume is the day total on daily bars but may be missing intraday, session start and time zone are not needed on daily bars but must be set intraday or bars shift, and the contract roll is one gap on daily bars but splits volume intraday Four checks for intraday VWAP Daily bars hide what intraday shows Setting Daily Intraday Volume Session start Time zone Contract roll Day total Not needed Not needed One gap May be missing Must be set Bars can shift Volume split Wrong settings move the line. So: check five bars by hand first.
The same VWAP rule reads differently on daily and intraday bars. Each row is one setting that changes where the line sits.

The session boundary deserves the most care on ES, because the contract trades through the night and many traders want the VWAP to start at the US stock market open, not at the start of the electronic session. Both are valid anchors, but they produce different lines and different trades, so the rule must name one. Exchanges change session times from time to time; confirm the current times on the exchange's contract page, and use the free futures market hours tool to see the session start in your own time zone before you set it in the backtest.

Two smaller points. Use real open-high-low-close bars for the typical price: Heikin Ashi candles are smoothed from earlier bars, so a VWAP built from them is not the average price anyone paid. And on futures, decide what happens to an anchored line at the roll: if your continuous series adjusts old prices at each roll, a line anchored before the roll is built from adjusted prices and will not match the line a trader saw at the time.

The test to run next takes ten minutes. Open one session of your intraday ES or TAIEX futures data, take the first five bars after your chosen session start, and work the formula by hand as in the example above. Compare your fifth value with the session VWAP your chart shows on that bar. If they differ, one of the four settings in the table is wrong, and fixing it comes before testing any VWAP rule.

Frequently asked questions

Is eVWAP the same as anchored VWAP?

Yes. Both names describe a volume-weighted average price that starts at a bar the trader chooses and runs on without a daily reset. The calculation is identical to session VWAP; only the start point differs. Charts and articles use eVWAP, anchored VWAP and AVWAP for the same line.

Which anchor is best for ES futures?

There is no single best anchor; there are anchors a backtest can place and anchors it cannot. Session open, a swing high or low defined by a fixed number of bars, a roll or expiry date and a scheduled release can all be found from the data by a program. Test each one with the same rule and the same costs, and keep the one whose result holds up out of sample, not the one that looks best on a chart you chose.

Does VWAP work on daily bars?

It can be calculated on any bars that carry volume. On daily bars each bar's volume is the whole day's trading, and the line runs across days from its anchor, so it behaves like a long, volume-weighted average rather than an intraday reference. The ES run in this article used daily bars for that reason: the result describes a slow, almost always-in rule, not an intraday VWAP strategy.

Do I need tick data to backtest a VWAP strategy?

No, as long as your bars carry a reliable volume field and the rule reads bar closes. Tick data matters only when the rule reacts to a touch inside the bar or when you want the VWAP to update with every trade. Before trusting bar volume, add up one day's bar volumes and compare the total with the exchange's reported volume for that contract and date.

Can a VWAP rule be exported to my trading platform?

A VWAP rule written as close-of-bar conditions can be exported as strategy source code to the platforms listed on the platform export page. After the export, run the same data through the platform's own backtest and compare the trade list with the research report, because the platform's volume field and session settings can differ from the ones used in research.

References

  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2017). The Probability of Backtest Overfitting. Journal of Computational Finance, 20(4), 39–69.
  • Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.