tqLiquidity: Calculate numerous (23) liquidity measures

Description Usage Arguments Value Details Author(s) References Examples

View source: R/realized.R

Description

Function returns an xts object containing one of the following liquidity measures:

es, rs, value_trade, signed_value_trade, di_diff, di_div, pes, prs, price_impact, prop_price_impact, tspread, pts, p_return_sqr, p_return_abs, qs, pqs, logqs, logsize, qslope, logqslope, mq_return_sqr, mq_return_abs.

Usage

1
tqLiquidity(tqdata,tdata,qdata,type,...)

Arguments

tqdata

xts object, containing joined trades and quotes (e.g. using matchTradesQuotes)

tdata

xts-object containing the trade data.

qdata

xts-object containing the quote data.

type

a character vector containing the name of one of the above mentioned liquidity measures, e.g. type="es" to get the effective spread.

...

additional arguments.

Value

an xts object containing one of the above mentioned liquidity measures.

Details

The respective liquidity measures are defined as follows:

Author(s)

Jonathan Cornelissen and Kris Boudt

References

Bessembinder, H. (2003). Issues in assessing trade execution costs. Journal of Financial Markets, 223-257.

Boehmer, E. (2005). Dimensions of execution quality: Recent evidence for US equity markets. Journal of Financial Economics 78 (3), 553-582.

Hasbrouck, J. and D. J. Seppi (2001). Common factors in prices, order flows and liquidity. Journal of Financial Economics, 383-411.

Venkataraman, K. (2001). Automated versus floor trading: An analysis of execution costs on the paris and new york exchanges. The Journal of Finance, 56, 1445-1485.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#load data samples
data("sample_tdata");
data("sample_qdata");
tdata = sample_tdata;
qdata = sample_qdata;
#match the trade and quote data
tqdata = matchTradesQuotes(tdata,qdata);

#calculate the proportional realized spread:
prs = tqLiquidity(tqdata,tdata,qdata,type="prs");

#calculate the effective spread:
es = tqLiquidity(tqdata,type="es");

Example output

Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

highfrequency documentation built on May 2, 2019, 6:09 p.m.