Description Usage Arguments Value Examples
Extract the list of best prices and quantities for a given mbp.
1 | create_snapshot(mbp, type)
|
mbp |
A 'data.frame' containing market by price data. Rownames of the data frame should contain the timestamp corresponding to the given row. |
type |
a character scalar: 'bsp' for sell side price, 'bbp' for buy side price, 'bbq' for buy side quantity and 'bsq' for sell side quantity. |
A 'matrix' containing prices/quantities for the buy side/sell side with timestamps as rownames. Example: For type = 'bsp', the fields 'bsp1' and 'bsp2' contain the list of 1st and 2nd best sell prices from the LOB at every timestamp.
@author Chirag Anand
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## 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]))
str(mbp)
## create_snapshot for the best buy quantity.
bbqSnap <- create_snapshot( mbp, type = "bbq")
head(bbqSnap)
## create_snapshot for best sell price
bspSnap <- create_snapshot( mbp, type = "bsp")
head(bspSnap)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.