Implements an efficient estimation procedure of the bid-ask spread from Open, High, Low, and Close prices as proposed in Ardia, Guidotti, Kroencke (2021): https://www.ssrn.com/abstract=3892335
Install this package with:
install.packages("bidask")
Load the library:
library("bidask")
Simulate a price process with spread 1%
<- sim(spread = 0.01) x
Estimate the spread
edge(x$Open, x$High, x$Low, x$Close)
By default this is equivalent to
spread(x)
Use a rolling window of 21 periods
spread(x, width = 21)
Compute the spread for each month
<- xts::endpoints(x, on = "months")
ep spread(x, width = ep)
Compute the critical values at 5% and 95%
spread(x, probs = c(0.05, 0.95))
Use multiple estimators
spread(x, method = c("EDGE", "AR", "CS", "ROLL", "OHLC", "OHL.CHL", "GMM"))
Full documentation available on CRAN
Ardia, David and Guidotti, Emanuele and Kroencke, Tim Alexander, “Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices”. Available at SSRN: https://ssrn.com/abstract=3892335
A BibTex entry for LaTeX users is:
@unpublished{edge2021,
author = {Ardia, David and Guidotti, Emanuele and Kroencke, Tim},
title = {Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices},
year = {2021},
note = {Available at SSRN}
url = {https://ssrn.com/abstract=3892335}
}