← Back to all sparks
P

PINstimation

INFRA · APIS
Velocity0.0

Estimation of the Probability of Informed Trading

A market-microstructure toolkit that keeps adding estimators as the papers land.

market-microstructurefinanceinformed-tradingr-packagehigh-frequency-dataestimation
Current state
PINstimation estimates probability-of-informed-trading models — PIN, multilayer PIN, adjusted PIN and VPIN — from trade and quote data, and handles the trade classification and aggregation that feeds them. The current 0.2.0 adds ivpin(), a maximum-likelihood variant of VPIN from Ke and Lin (2017). The package's early history is compressed into a single hour of backfilled tags in October 2022, so version order there does not track release order.
Where it's heading
Each release tracks the literature: a Bayesian PIN estimator from Griffin et al., an improved VPIN from Ke and Lin, initial-parameter generation realigned to Ersan and Ghachem. The other steady thread is data handling — matrix inputs so the estimators compose with rolling windows, user-specified aggregation frequencies, and now quote leads as well as lags. The three-year gap between 0.1.2 and 0.2.0 makes this a slow, publication-paced package rather than an actively developed one.
Prediction
On this pattern the next release adds whatever estimator the authors publish next, since two of the three feature releases here implement a specific paper. Nothing in the entries points to a change in the package's structure.

Recent moves

  1. 8mo ago

    PINstimation 0.2.0

    Adds ivpin(), a maximum-likelihood reworking of VPIN that the notes say holds up better with small volume buckets or infrequent informed trades — the conditions where the original estimator is least stable. Trade classification also accepts negative time lags, treating quotes as leads rather than lags.

    View source ↗
  2. 3y ago

    PINstimation v0.1.2

    classify_trades() exposes per-trade buyer or seller initiation directly rather than only inside the aggregation step, and aggregate_trades() accepts a frequency instead of always producing daily data. Together they open intraday work that the daily-only pipeline had ruled out. Also corrects mpin_ecm(), which could admit information layers of zero probability.

    View source ↗
  3. 3y ago

    PINstimation v0.1.1

    The estimators accept matrix input rather than dataframes only, which is what lets them run inside rolling-window helpers like zoo's rollapply. Adds pin_bayes() for Bayesian PIN estimation and fixes calculation bugs in vpin() and negative trade intensities in initials_pin_ea().

    View source ↗
  4. 3y ago

    PINstimation v0.0.1-beta

    A beta tag stamped one minute after the initial release and describing the same pin_bayes() addition and vpin() fixes that 0.1.1 carries. Part of the backfilled October 2022 history rather than a distinct release.

    View source ↗
  5. 3y ago

    PINstimation v0.1.0

    Labelled the initial release, with a two-line body noting a future::plan reset fix. It sits inside the same hour as the 0.0.1-beta and 0.1.1 tags, so this is release history being backfilled rather than the package first appearing.

    View source ↗