edge {bidask}R Documentation

Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices

Description

Implements an efficient estimator of bid-ask spreads from open, high, low, and close prices as described in Ardia, Guidotti, & Kroencke (2021).

Usage

edge(open, high, low, close, sign = FALSE)

Arguments

open

numeric vector of open prices.

high

numeric vector of high prices.

low

numeric vector of low prices.

close

numeric vector of close prices.

sign

whether signed estimates should be returned.

Details

Prices must be sorted in ascending order of the timestamp.

Value

The spread estimate. A value of 0.01 corresponds to a spread of 1%.

Note

Please cite Ardia, Guidotti, & Kroencke (2021) when using this package in publication.

References

Ardia, D., Guidotti E., & Kroencke T. A. (2021). Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices. Available at SSRN: https://www.ssrn.com/abstract=3892335

Examples

# simulate open, high, low, and close prices with spread 1%
x <- sim(spread = 0.01)

# estimate the spread
edge(x$Open, x$High, x$Low, x$Close)


[Package bidask version 2.0.2 Index]