plotVolumePercentiles {obAnalytics}R Documentation

Visualise available limit order book liquidity through time.

Description

Plots the available volume in 25bps increments on each side of the order book in the form of a stacked area graph.

Usage

plotVolumePercentiles(depth.summary,
  start.time = head(depth.summary$timestamp, 1),
  end.time = tail(depth.summary$timestamp, 1), volume.scale = 1,
  perc.line = T, side.line = T)

Arguments

depth.summary

depth.summary data.

start.time

Plot events from this time onward.

end.time

Plot events up until this time.

volume.scale

Volume scale factor.

perc.line

If true, separate percentiles with subtle line.

side.line

If true, separate bid/ask side with subtle line.

Details

The top of the graph depicts the ask side of the book, whilst the bottom depicts the bid side. Percentiles and order book sides can be separated by an optional subtle line for improved legibility.

Author(s)

phil

Examples


# visualise 2 hours of order book liquidity.
# data will be aggregated to minute-by-minute resolution.
plotVolumePercentiles(lob.data$depth.summary,
    start.time=as.POSIXct("2015-05-01 02:30:00.000", tz="UTC"),
    end.time=as.POSIXct("2015-05-01 04:30:00.000", tz="UTC"),
    volume.scale=10^-8)

## Not run: 

# visualise 15 minutes of order book liquidity.
# data will be aggregated to second-by-second resolution.
plotVolumePercentiles(lob.data$depth.summary,
    start.time=as.POSIXct("2015-05-01 04:30:00.000", tz="UTC"),
    end.time=as.POSIXct("2015-05-01 04:35:00.000", tz="UTC"),
    volume.scale=10^-8)

## End(Not run)

[Package obAnalytics version 0.1.1 Index]