Learn R Programming

obAnalytics (version 0.1.1)

matchTrades: Construct trades data.table.

Description

Given event data which has been pre-matched with maker/taker event ids, this function will return a data.table containing all matched executions.

Usage

matchTrades(events)

Arguments

events
Limit order event data with assigned maker/taker event ids.

Value

A data.frame describing marketable order executions of the following form:
A market limit order (marketable) is first a taker and then becomes a maker after landing in the order book before it's limit is reached.A market order is always a taker: it's volume will be filled before it's limit is reached.Grouping executions by maker/taker can be used to analyse market impact events.

Examples

Run this code
## Not run: 
# 
# csv.file <- system.file("extdata", "orders.csv.xz", package="obAnalytics")
# events <- loadEventData(csv.file)
# events <- eventMatch(events)
# trades <- matchTrades(events)
# ## End(Not run)

Run the code above in your browser using DataLab