VWAP is an important part of market data - not just as an indicator for analysis, but also in some backtesting scenarios (e.g. simulating fills) and as a basis for further analytics around price.
As such, VWAP is treated as a first-class data field in AWTS and always provided in all cases on all data sources.
However, a perfect VWAP is not always possible, e.g. because:
So some instruments either do, or can be configured to, produce an approximate VWAP from data that is available. In practise, the approximations are pretty close to real values.
AWTS modules produce VWAP and always include it in all candle/data outputs - so that your code/logic does not need to calculate it, nor worry about whether VWAP is or is not present.
Each instrument declares what level of VWAP is present, this can be checked by inspecting the VWAP
field in the response from a data.Instrument()
call to inspect an instrument.
Each AWTS data module also documents its approach to VWAP depending on the source of the underlying data.
It can be one of the following values:
VWAP_METHOD_TICK
) - VWAP is calculated from actual ticks and is therefore correct and accurate, this is the ideal scenarioVWAP_METHOD_FAKE
) - VWAP figures are an approximation generated from a simple arithemtic mean of the OHLC values, this is the worst-case scenarioVWAP_METHOD_SMALLESTCANDLE
) - VWAP figures are an approximation, but generated from the lowest available candle data resolution, and averaged up. E.g. for daily data, the VWAPs may be determined from M1 (one-minute) data. VWAP on that lowest-resolution candle is FAKE
per the above, but the (weighted) aggregation of the small candles up to the requested timeframe typically results in output that is extremely close to a true tick-based VWAP.