Estimating PIN

Share:

Description

Estimates the probability of informed trading (PIN) for daily buys and sells trading data for arbitrary number of trading days.

Usage

1
2
pin_est(numbuys = NULL, numsells = NULL, lower = rep(0, 5), upper = c(1,
  1, rep(Inf, 3)), confint = FALSE, ci_control = list())

Arguments

numbuys

numeric vector of daily buys

numsells

numeric vector of daily sells

lower

numeric lower bounds for optimization, must have length of 5

upper

numeric upper bounds for optimization, must have length of 5

confint

logical Compute confidence intervals for PIN? Defaults to FALSE

ci_control

list see pin_est_core

Details

User-friendly wrapper around workhorse function pin_ll_max. nlminb function in the stats package is used for maximization. In the literature, at least data for 60 trading days is recommended to ensure convergence of optimization. No information about the trading days' dates is needed. Vectors for numbuys and numsells need to have same length.
Calculation of confidence interval for the probability of informed trading is disabled by default. For more details see pin_est_core

Value

A list with the following components:

Results

Matrix containing the parameter estimates as well as their estimated standard errors, t-values and p-values.

ll

Value of likelihood function returned by nlminb

pin

Estimated probability of informed trading

conv

Convergence code for nlminb optimization

message

Convergence message returned by the nlminb optimizer

iterations

Number of iterations until convergence of nlminb optimizer

init_vals

Vector of initial values

confint

If confint = TRUE; confidence interval for the probability of informed trading

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("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("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("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("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("10.1080/14697688.2015.1023336")}

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("10.1016/j.finmar.2011.03.001")}

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("10.1016/j.jbankfin.2011.08.003")}

See Also

nlminb, initial_vals pin_est_core qpin

Examples

1
2
3
4
5
6
7
8
# Loading simulated data for frequently traded stock

data("BSfrequent")

# Optimization with HAC initial values and Lin-Ke likelihood factorization

pin_freq <- pin_est(numbuys = BSfrequent[,"Buys"],
                    numsells = BSfrequent[,"Sells"])