Learn R Programming

pinbasic (version 0.2.0)

pinbasic: A Package for Fast and Stable Estimation of the Probability of Informed Trading (PIN)

Description

Utilities for fast and stable estimation of the probability of informed trading (PIN) in the model introduced by Easley, Hvidkjaer and O'Hara (EHO, 2002) are implemented. Since the model developed by Easley, Kiefer, O'Hara and Paperman (EKOP, 1996) is nested in the EHO model due to equating the intensity of uninformed buys and sells, functionalities can also be applied to this simpler model structure, if needed. State-of-the-art factorization of the model likelihood function as well as hierarchical agglomerative clustering algorithm for generating initial values for optimization routines are provided. In total, two different likelihood factorizations and three methodologies generating starting values are implemented. The probability of informed trading can be estimated for arbitrary length of daily buys and sells data with pin_est function which is a wrapper around the workhorse function pin_est_core. No information about the time span of the underlying data is required to perform optimizations. However, recommendation given in the literature is using at least data for 60 trading days to ensure convergence of the likelihood maximization. The qpin function delivers quarterly estimates. The number of available quarters in the data are detected utilizing functions from the lubridate package. Quarterly estimates can be visualized with the qpin_plot function.

Arguments

Functions

Datasets

Source of all included datasets: own simulation

Author

Andreas Recktenwald (Saarland University, Statistics & Econometrics) Email: a.recktenwald@mx.uni-saarland.de

References

Easley, David et al. (2002) Is Information Risk a Determinant of Asset Returns? The Journal of Finance, Volume 57, Number 5, pp. 2185 - 2221 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1111/1540-6261.00493http://doi.org/10.1111/1540-6261.00493doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1111/1540-6261.00493 Easley, David et al. (1996) Liquidity, Information, and Infrequently Traded Stocks The Journal of Finance, Volume 51, Number 4, pp. 1405 - 1436 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1111/j.1540-6261.1996.tb04074.xhttp://doi.org/10.1111/j.1540-6261.1996.tb04074.xdoi:\ifelse{latex}{\out{~}}{ }latex~ 10.1111/j.1540-6261.1996.tb04074.x Easley, David et al. (2010) Factoring Information into Returns Journal of Financial and Quantitative Analysis, Volume 45, Issue 2, pp. 293 - 309 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1017/S0022109010000074http://doi.org/10.1017/S0022109010000074doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1017/S0022109010000074 Ersan, Oguz and Alici, Asli (2016) An unbiased computation methodology for estimating the probability of informed trading (PIN) Journal of International Financial Markets, Institutions and Money, Volume 43, pp. 74 - 94 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1016/j.intfin.2016.04.001http://doi.org/10.1016/j.intfin.2016.04.001doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1016/j.intfin.2016.04.001 Gan, Quan et al. (2015) A faster estimation method for the probability of informed trading using hierarchical agglomerative clustering Quantitative Finance, Volume 15, Issue 11, pp. 1805 - 1821 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1080/14697688.2015.1023336http://doi.org/10.1080/14697688.2015.1023336doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1080/14697688.2015.1023336 Grolemund, Garett and Wickham, Hadley (2011) Dates and Times Made Easy with lubridate Journal of Statistical Software, Volume 40, Issue 3, pp. 1 - 25 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.18637/jss.v040.i03http://doi.org/10.18637/jss.v040.i03doi:\ifelse{latex}{\out{~}}{ }latex~ 10.18637/jss.v040.i03 Lin, Hsiou-Wei William and Ke, Wen-Chyan (2011) A computing bias in estimating the probability of informed trading Journal of Financial Markets, Volume 14, Issue 4, pp. 625 - 640 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1016/j.finmar.2011.03.001http://doi.org/10.1016/j.finmar.2011.03.001doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1016/j.finmar.2011.03.001 Wickham, Hadley (2009) ggplot2: Elegant Graphics for Data Analysis Springer-Verlag New York \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1007/978-0-387-98141-3http://doi.org/10.1007/978-0-387-98141-3doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1007/978-0-387-98141-3 Wickham, Hadley (2007) Reshaping Data with the reshape Package Journal of Statistical Software, Volume 21, Issue 12, pp. 1 - 20 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.18637/jss.v021.i12http://doi.org/10.18637/jss.v021.i12doi:\ifelse{latex}{\out{~}}{ }latex~ 10.18637/jss.v021.i12 Wickham, Hadley (2016) scales: Scale Functions for Visualization R package version 0.4.0 Yan, Yuxing and Zhang, Shaojun (2012) An improved estimation method and empirical properties of the probability of informed trading Journal of Banking & Finance, Volume 36, Issue 2, pp. 454 - 467 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1016/j.jbankfin.2011.08.003http://doi.org/10.1016/j.jbankfin.2011.08.003doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1016/j.jbankfin.2011.08.003