Description Usage Arguments Details Value References
Applies the Lee & Ready (1991) algorithm
1 | lee_ready_vec(price, bid_price, ask_price)
|
price |
a numeric vector containing the transaction price series. |
bid_price |
a numeric vector containing the bid price series. |
ask_price |
a numeric vector containing the ask price series. |
This function applies the algorithm by
Lee & Ready (1991)
to infer trade direction from prices. The function runs fast C++-code in the
background using the Rcpp
functionality. Note that the
length of all input vectors have to be the same, otherwise the C++-code
throws an exception.
an integer vector containing the trade direction with a buy indicated as 1 and a sell indicated as -1
Lee and Ready (1991), "Inferring Trade Direction from Intraday Data," Journal of Finance, Vol. 42, Issue 2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.