processData {obAnalytics} | R Documentation |
Import CSV file.
Description
Imports and performs preprocessing of limit order data contained in a CSV.
Usage
processData(csv.file)
Arguments
csv.file |
Location of CSV file to import |
Details
The CSV file is expected to contain 7 columns:
- id
Numeric limit order unique identifier
- timestamp
Time in milliseconds when event received locally
- exchange.timestamp
Time in milliseconds when order first created on the exchange
- price
Price level of order event
- volume
Remaining order volume
- action
Event type (see below)
- direction
Side of order book (bid or ask)
action describes the limit order life-cycle:
- created
The limit order has been created
- modified
The limit order has been modified (partial fill)
- deleted
The limit order was deleted. If the remaining volume is 0, the order has been filled.
An example dataset returned from this function can be seen in
lob.data
which is the result of processing the example data
included in the inst/extdata
directory of this package.
Value
A list containing 4 data frames:
- events
Limit order events.
- trades
Inferred trades (executions).
- depth
Order book price level depth through time.
- depth.summary
Limit order book summary statistics.
Author(s)
phil
Examples
## Not run:
csv.file <- system.file("extdata", "orders.csv.xz", package="obAnalytics")
lob.data <- processData(csv.file)
## End(Not run)