Package: PINstimation 0.2.0

PINstimation: Estimation of the Probability of Informed Trading

A comprehensive bundle of utilities for the estimation of probability of informed trading models: original PIN in Easley and O'Hara (1992) and Easley et al. (1996); Multilayer PIN (MPIN) in Ersan (2016); Adjusted PIN (AdjPIN) in Duarte and Young (2009); and volume-synchronized PIN (VPIN) in Easley et al. (2011, 2012). Implementations of various estimation methods suggested in the literature are included. Additional compelling features comprise posterior probabilities, an implementation of an expectation-maximization (EM) algorithm, and PIN decomposition into layers, and into bad/good components. Versatile data simulation tools, and trade classification algorithms are among the supplementary utilities. The package provides fast, compact, and precise utilities to tackle the sophisticated, error-prone, and time-consuming estimation procedure of informed trading, and this solely using the raw trade-level data.

Authors:Montasser Ghachem [aut, cre, cph], Oguz Ersan [aut], Alexandre Borentain [ctb]

PINstimation_0.2.0.tar.gz
PINstimation_0.2.0.zip(r-4.7)PINstimation_0.2.0.zip(r-4.6)PINstimation_0.2.0.zip(r-4.5)
PINstimation_0.2.0.tgz(r-4.6-any)PINstimation_0.2.0.tgz(r-4.5-any)
PINstimation_0.2.0.tar.gz(r-4.7-any)PINstimation_0.2.0.tar.gz(r-4.6-any)
PINstimation_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
PINstimation/json (API)

# Install 'PINstimation' in R:
install.packages('PINstimation', repos = c('https://monty-se.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/monty-se/pinstimation/issues

Pkgdown/docs site:https://www.pinstimation.com

Datasets:

On CRAN:

Conda:

clustering-analysisexpectation-maximisation-algorithmhierarchical-clusteringinformation-asymmetrymarket-microstructuremaximum-likelihood-estimationmixture-distributionspoisson-distribution

6.11 score 41 stars 21 scripts 247 downloads 34 exports 53 dependencies

Last updated from:ac6a46340d. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK213
source / vignettesOK350
linux-release-x86_64OK148
macos-release-arm64OK143
macos-oldrel-arm64OK135
windows-develOK129
windows-releaseOK126
windows-oldrelOK145
wasm-releaseOK114

Exports:adjpinaggregate_tradesclassify_tradesdetectlayers_edetectlayers_ecmdetectlayers_egfact_adjpinfact_mpinfact_pin_efact_pin_ehofact_pin_lkgeneratedata_adjpingeneratedata_mpinget_posteriorsgetSummaryinitials_adjpininitials_adjpin_clinitials_adjpin_rndinitials_mpininitials_pin_eainitials_pin_gwjinitials_pin_yzivpinmpin_ecmmpin_mlpinpin_bayespin_eapin_gwjpin_yzselectModelset_display_digitsshowvpin

Dependencies:base64encbslibcachemclicodacodetoolscpp11digestdplyrevaluatefastmapfontawesomefsfurrrfuturegenericsglobalsgluehighrhtmltoolsjquerylibjsonliteknitrlatticelifecyclelistenvmagrittrmemoisemimenloptrparallellypillarpkgconfigpurrrR6rappdirsrbibutilsRdpackrlangrmarkdownsassskellamstringistringrtibbletidyrtidyselecttinytexutf8vctrswithrxfunyaml

Get started
Overview | Installation | Note to frequent users | Usage examples | Example 1: Estimate the PIN model | Example 2: Estimate the Multilayer PIN model | Example 3: Estimate the Adjusted PIN model | Example 4: Estimate the Volume-adjusted PIN model | Example 5: Estimate the AdjPIN model using aggregated high-frequency data | Getting help

Last update: 2025-12-17
Started: 2022-05-24

Parallel Processing
Overview | Parallel processing with PINstimation | Option 1: Number of cores used | Option 2: Threshold of initial parameter sets | Illustrative Example | Sequential processing | Parallel processing | number of sets below the threshold | Parallel processing | number of sets above the threshold | Getting help

Last update: 2025-12-17
Started: 2022-05-24

Sample datasets
Overview | Sample datasets for the PIN model | Sample datasets for the MPIN model | Sample datasets for the ADJPIN model | Getting help

Last update: 2025-12-17
Started: 2022-10-19

Readme and manuals

Help Manual

Help pageTopics
Estimation of adjusted PIN modeladjpin
Example of quarterly datadailytrades
List of dataset objectsdata.series-class show,data.series-method
Simulated data objectdataset-class show,dataset-method
Layer detection in trade-datadetecting-layers detectlayers_e detectlayers_ecm detectlayers_eg
AdjPIN estimation resultsestimate.adjpin-class show,estimate.adjpin-method
MPIN estimation resultsestimate.mpin-class show,estimate.mpin-method
MPIN estimation results (ECM)estimate.mpin.ecm-class getSummary getSummary,estimate.mpin.ecm-method selectModel selectModel,estimate.mpin.ecm-method show,estimate.mpin.ecm-method
PIN estimation resultsestimate.pin-class show,estimate.pin-method
VPIN estimation resultsestimate.vpin-class show,estimate.vpin-method
Factorizations of the different PIN likelihood functionsfactorizations fact_adjpin fact_mpin fact_pin_e fact_pin_eho fact_pin_lk
Simulation of AdjPIN model data.generatedata_adjpin
Simulation of MPIN model datageneratedata_mpin
Posterior probabilities for PIN and MPIN estimatesget_posteriors
High-frequency trade-datahfdata
AdjPIN initial parameter sets of Ersan & Ghachem (2022b)initials_adjpin
AdjPIN initial parameter sets of Cheng and Lai (2021)initials_adjpin_cl
AdjPIN random initial setsinitials_adjpin_rnd
MPIN initial parameter sets of Ersan (2016)initials_mpin
Initial parameter sets of Ersan & Alici (2016)initials_pin_ea
Initial parameter set of Gan et al.(2015)initials_pin_gwj
Initial parameter sets of Yan and Zhang (2012)initials_pin_yz
MPIN model estimation via an ECM algorithmmpin_ecm
MPIN model estimation via standard ML methodsmpin_ml
PIN estimation - custom initial parameter setspin
PIN estimation - Bayesian approachpin_bayes
PIN estimation - initial parameter sets of Ersan & Alici (2016)pin_ea
PIN estimation - initial parameter set of Gan et al. (2015)pin_gwj
PIN estimation - initial parameter sets of Yan & Zhang (2012)pin_yz
Package-wide number of digitsset_display_digits
Classification and aggregation of high-frequency dataaggregate_trades classify_trades trade_classification
Estimation of Volume-Synchronized PIN model (vpin) and the improved volume-synchronized PIN model (ivpin)ivpin vpin vpin_measures