depthMetrics: Calculate order book summary statistics/metrics.

Description Usage Arguments Details Value Author(s)

Description

This function calculates various summary statistics describing the state of the limit order book after every event. The metrics are intended to quantify the "shape" of the order book through time. Currenly the following metrics are calculated:

Usage

1
depthMetrics(depth, bps = 25, bins = 20)

Arguments

depth

Price level cumulative depth calculated by priceLevelVolume()

bps

Width (in BPS) for each interval/bin

bins

Number of intervals +- the best bid/ask to aggregate.

Details

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  [timestamp,
   best.bid.price, best.bid.vol, bid.vol25:500bps,
   best.ask.price, best.ask.vol, ask.vol25:500bps,]

where timestamp = time of order book state change
 best.bid.price = current best bid price
 best.bid.vol = current amount of volume at the best bid
 bid.vol25:500bps = amount of volume available > -25bps and <= best bid
                    until > 500bps <= 475bps.
   ... the same pattern is then repeated for the ask side.

Value

data.frame containing order book summary statistics.

Author(s)

phil


phil8192/ob-analytics documentation built on May 25, 2019, 2:56 a.m.