|
ITCHCPP 1.6.1
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
|
Running time-weighted average price. More...
#include <vwap.hpp>
Public Member Functions | |
| auto | add (StandardPrice price, std::uint64_t timestamp) -> void |
Records that the price became price at timestamp (ns). | |
| auto | value () const -> double |
| The current TWAP, or NaN when no span has elapsed. | |
| auto | reset () noexcept -> void |
| Clears the accumulation (start a new interval). | |
Running time-weighted average price.
Integrates the prevailing price over time: each sample contributes its price weighted by the elapsed time since the previous sample. The value is the time-weighted mean over the observed span.
|
inline |
|
inline |
|
inlinenoexcept |