matchTradesQuotes: Match trade and quote data

Description Usage Arguments Value Author(s) References Examples

Description

Function matches the trades and quotes and returns an xts-object containing both.

Usage

1
matchTradesQuotes(tdata,qdata,adjustment=2)

Arguments

tdata

xts-object containing the trade data. Please see pdf documentation for the recommended format.

qdata

xts-object containing the quote data. Please see pdf documentation for the recommended format.

adjustment

numeric, number of seconds the quotes are registered faster than the trades (should be round and positive). Based on the research of Vergote (2005), we set 2 seconds as the default.

Value

xts-object containing the matched trade and quote data

Author(s)

Jonathan Cornelissen and Kris Boudt

References

Vergote, O. (2005). How to match trades and quotes for NYSE stocks? K.U.Leuven working paper.

Examples

1
2
3
4
5
6
7
#load data samples
data("sample_tdata");
data("sample_qdata");
#match the trade and quote data
tqdata = matchTradesQuotes(sample_tdata,sample_qdata);
#have a look
head(tqdata);

R-Finance/RTAQ documentation built on May 8, 2019, 4:48 a.m.