bayespin-package: bayespin: An R package for Bayesian estimation of the...

Description Details References

Description

An R package for Bayesian estimation of the probability of informed trading from a finite mixture distribution. The original model by Easley et al. (1996) can be converted into a compressed model that is a finite mixture distribution as has been shown by Grammig et al. (1996). This package implements the Bayesian estimation of the compressed model together with the traditional approaches using maximum likelihood. The package uses C++ code and performs a single estimation in around 4-5 seconds.

Details

bayespin implements the statistical methods for estimating the probability of informed trading (PIN) with a Bayesian approach as proposed by Grammig et al. (2015). This should simplify the usage of this rather complicated estimation procedure and offers researchers an API that is easy to integrate, stable, and fast in performance.

The model by Grammig et al. (2015) comes along with some advantages in comparison to the original model of Easley et al. (1996) and other Bayesian approaches found in literature:

  1. It uses only the number of trades per day instead of the number of seller- and buyer-initiated trades used by other approaches. This enables the researcher to collect data more easily - also for historical horizons and leads to less bias in case trade initiation must be estimated by using the Lee and Ready (1991) algorithm.

  2. The Bayesian estimation of the PIN measure is found to be more stable especially when it comes to very large trading volumes as they occur on modern markets.

  3. Especially in settings where the rates of informed trading, mu and/or the probability of information events are very small Bayesian estimation of the underlying finite mixture distribution leads to more robust parameter estimates.

The package makes use of high-performance C++ algorithms for MCMC sampling for finite mixture distributions offered by the finmix package. Model estimation with a simple K-means relabeling takes around 4-6 seconds.

Implementation of other estimation approaches

In addition to the Bayesian estimation approach from Grammig et al. (2015) the bayespin package also implements several other methods to compute the probability of informed trading:

References


simonsays1980/bayespin documentation built on Dec. 23, 2021, 2:25 a.m.