Giter Site home page Giter Site logo

ob-analytics's Introduction

obAnalytics

Build Status Coverage Status License CRAN Downloads

Limit Order Book event processing and visualisation.

"limit order book analytics"

obAnalytics is an R package intended for visualisation and analysis of limit order data. The package is experimental and is based on the R code used to create the visualisations in this Limit Order Book Visualisation article.

Installation

CRAN

install.packages("obAnalytics")

Github

if(!require("devtools")) install.packages("devtools")
devtools::install_github("phil8192/ob-analytics")

Environment settings

Due to the large number of columns in the example data, it is recommended to set the display width to make the most use of the display. It is also recommended to set digits.secs=3 and scipen=999 in order to display timestamps and fractions nicely. This can be achieved as follows:

max.cols <- Sys.getenv("COLUMNS")
options(width=if(max.cols != "") max.cols else 80, scipen=999, digits.secs=3)

Example use

Preprocessed limit order data from the inst/extdata directory has been included in the package. The data, taken from a Bitcoin exchange on 2015-05-01, consists of 50,393 limit order events and 482 trades occuring from midnight up until ~5am. To use the data, attach it to the environment:

library(obAnalytics)
data(lob.data)

The lob.data data structure contains 4 data.frames describing limit order events, trades, depth and summary statistics. All of which are described in detail in the package documentation. To visualise all of the example order book data, use the plotPriceLevels function:

with(lob.data, {
  spread <- getSpread(depth.summary)
  plotPriceLevels(depth, spread, volume.scale=10^-8, show.mp=T)
})

Web app

An interactive interface making use of this package is available in the shiny-ob-analytics respository.

Documentation

Example use documentation has been created in R Markdown (see vignettes) directory. knitr is used to generate vignettes. roxygen2 is used to generate the pdf manual from code comments.

Example use of obAnalytics package (html)

An end-to-end walk-through to demonstrate the main features and functionality of the package is available here: http://parasec.net/transmission/ob-analytics/guide.html

Example use (pdf)

http://parasec.net/transmission/ob-analytics/guide.pdf

Manual

In addition to online ?help, package data and function documentation is available in the form of a manual: http://parasec.net/transmission/ob-analytics/obAnalytics-manual.pdf

License

GPL (>= 2)

ob-analytics's People

Contributors

phil8192 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.