tradeImpacts: Trade impacts.

Description Usage Arguments Details Value Author(s) Examples

Description

Generates a data.frame containing order book impacts.

Usage

1

Arguments

trades

trades data.

Details

An impact consists of 1 or more limit orders being hit in order to fulfil a market order.

Value

A data.frame containing a summary of market order impacts:

id

market order id

min.price

minimum executed price

max.price

maximum executed price

vwap

VWAP obtained by market order

hits

number of limit orders hit by market order

vol

total volume removed by this impact

start.time

(local) start time of this impact

end.time

(local) end time of this impact

dir

direction of this impact (buy or sell)

Author(s)

phil

Examples

1
2
3
4
5
6
7
8
# get impacts data.frame from trades data.
impacts <- tradeImpacts(lob.data$trades)

# impacts (in bps) 
sell.bps <- with(impacts[impacts$dir == "sell", ], {
  (max.price-min.price)/max.price
})
10000*summary(sell.bps[sell.bps > 0])

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