Advanced CVD

From Bookmap
Revision as of 22:02, 12 December 2018 by Serg (talk | contribs) (Order size of aggressive orders)
Jump to: navigation, search

The advanced (or generalized) CVD indicator of Bookmap allows to track transactions and even performance from the perspective of various types of orders. This includes, passive and aggressive orders, Iceberg orders, Stop orders, orders of particular size or range of sizes, Stop orders that execute against Iceberg orders, passive Limit orders that become aggressive due to replacement, and even orders that imitate the behavior of native iceberg orders. The indicator allows to configure a set of filters that determines transactions of which of the above orders to be accounted.

What is a standard CVD indicator

CVD Example.png

It consists of 4 components:

  1. Cumulative (running) total traded volume of all transactions. This is also a sum of #2 and #3
  2. Cumulative volume initiated by aggressive Buy orders (trades that occur at best Ask price)
  3. Cumulative volume initiated by aggressive Sell orders (trades that occur at best Bid price)
  4. Cumulative volume delta (CVD), which is the difference between #2 and #3

Typically, only the CVD is actually displayed on the chart. It indicates the difference between Buying and Selling pressure. This information is valuable because it shows the sentiment of other market participants and indicates what is their prediction about the price. This is because traders send an aggressive order when it seems for them their last chance (at least in their time frame) to Buy or Sell at currently available price. And if the excess of Buying or Selling pressure is not compensated by corresponding excess of incoming passive limit orders, it moves the price in the direction of the pressure. The standard (or regular CVD) can be achieved using the following settings:

Standard CVD.png


The regular CVD becomes possible because each transaction always happens between a Buy order and a Sell order. And because in each transaction one of the orders must be passive (resting in the order book), and another an incoming aggressive order. The Buy and Sell volume in regular CVD is calculated from the perspective of aggressive orders, but this is only a choice.

Because each transaction occurs between passive/resting  and aggressive orders, we could equally calculate the Buy and Sell volume from the perspective of passive orders even without an access to BBO or market depth data. Similarly, we could calculate it only based on transactions of passive orders without an access to the Time & Sales data. If both aggressive and passive are taken into account, the Buy and Sell volumes would grow, but CVD would be precisely zero and any moment in time.

Classification of orders


The regular CVD is calculated from the perspective of aggressive orders and uses a single classification of orders: aggressive vs passive. Let's extend the list of available classifications as following:

  • Passive orders
  • Aggressive orders
  • Large and Small orders (in general, orders with certain size or range of sizes)

Now we can chose from the perspective of which orders the CVD should be calculated and add transactions of orders that match desired classification to Buy and Sell volume accordingly.


This set of filters allows to select desired classification of orders for which we wish to produce the CVD including the ability to track only executions of Stop orders against Iceberg orders. For further fine tuning it allows to ignore order size filters for Stop and Iceberg orders, which is especially useful for Iceberg order which hidden size we can't know until it's fully executed.

Similarly to the regular CVD, it allows to examine market activity and the excess of pressure of Buyers and Sellers, but with higher granularity of classifications of orders.



This set of filters allows to mirror any set of settings in order to view the transactions from the perspective of one side of a trade (e.g. aggressive) or another (e.g. passive). The result of mirroring is:

  • No change in total volume
  • Buy volume becomes Sell volume and vice versa
  • CVD is flipped vertically

The image on the right side shows an example of two complimentary / mirroring combinations of settings. Both are configured to track transactions of Stop orders only. But one of them gives the view from the opposite side of executed Stop orders.

Filtering by Order size

In a transaction between two orders at least one of them, the smaller one, gets fully executed. A large order can be executed against many other orders.

CVD represents the volume traded, i.e. size of transactions. But order size filters are applied on actual order size of orders participating in the transaction.

Order size of aggressive orders

The order size of a Market order is the sum of all of its transactions against other orders, which occur instantaneously when market order arrives to the exchange. But not all aggressive orders are Market orders. It can be a partially executed aggressive Limit order which stops execution when reaches its limit price and creates a new best price. Moreover, it can be passive Limit order which was previously partially executed and then modified to becomes an aggressive order followed by its full or partial execution. The order size filter is applied on the maximum order size it had during its lifetime.

Order size of passive orders

Similarly, the order size filter is applied on the maximum order size the order had during its lifetime. In case of iceberg orders its estimated order size is the sum of its transactions plus the remaining displayed size. Large traders have number of good reasons why not to use native iceberg order offered by exchanges, but rather implement iceberg functionality themselves, especially having an infrastructure in exchange co-location. This indicator treats such custom iceberg orders in the same manner as it treats native iceberg orders.

Relation of CVD to Position


Suppose a trader configures the CVD as shown on the image to account only Limit and Market orders of size 75, and suppose that no one else except this trader is using such orders during a trading day. In this case it's obvious that CVD will show exactly the same value as the position, displayed on the account balance of this trader. Similarly, the CVD in general can be treated as the position generated by orders that match desired configuration filters. In other words, CVD gives an insight about the position of selected classification of orders.

Relation to Profit and Loss

Since each transaction is characterized not only by size and side, but also by transaction price, the trader from the previous example could also calculate his P&L based on market data (assuming that no one else trades with such orders). Similarly, the P&L calculated based transactions of orders that match the filters represents the P&L of those orders. However, such P&L can be misleading in both directions because it assumes that initial position is zero, which is highly unlikely if we wish to track activity of certain type of traders. Here is an example: a trader was buying during trend down and then selling the same amount during a trend up to the initial price. Depending on entry points, the resulting P&L can be very nice and positive. But if we reset the CVD (and position) during price reversal at the bottom, the resulting P&L during each interval and thus together will be negative.

Zero sum game

If we remove all filters, i.e. include all orders and calculate CVD from their perspective, the Buy volume becomes equal to Sell volume. Therefore the resulting position (CVD) and P&L are precisely zero at any moment in time as shown on this image.


Tracking large orders

If we use the previous settings that demonstrated zero-sum game but apply a filter on order size (e.g. 50 contracts as shown on the next image), it's not a zero-sum game anymore because some transactions occur between large orders that pass the filter and smaller orders that don't. The resulting CVD and P&L represent position and performance of all orders of size 50+ regardless of their other characteristics. In this example we also selected to ignore order size filter for iceberg orders.


Examples and special use cases