Description Usage Arguments Value Author(s) Examples
Function to compute impact cost for a security for a day.
1 |
mbp |
a data.frame, containing best price/quantity pairs for buy and sell side with time stamps as row names. Units:
|
Q |
an 'integer' vector containing the quantities for which to compute the Impact Cost. |
d |
Date |
partial |
a 'logical' scalar, telling whether to do partial executions |
A 'list' of matrices containing buy and sell IC. 'names' of the list are the Q values used. Each matrix will contain rows having
buyIC percentage: numeric
sellIC percentage: numeric
The function returns ‘NA’ values if “partial” is ‘FALSE’, or, if there were no orders (empty book) at a particular time.For the buy and sell ic measures the corresponding row name for that entry is its timestamp.
Chirag Anand
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Demonstration of IC functions using the market by price data
## of CINEMAX from the ic_CINEMAX dataset.
try(data(package="ifrogs", "ic_CINEMAX"))
mbp <- cbind(as.data.frame(CINEMAX[1]),
as.data.frame(CINEMAX[2]),
as.data.frame(CINEMAX[3]),
as.data.frame(CINEMAX[4]))
print(mbp)
ans1 <- ic( mbp, Q = 600, d, partial = FALSE)
head(ans1)
ans2 <- ic( mbp, Q = 600, d, partial = TRUE)
head(ans2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.