Description Usage Arguments Value References Examples
Generates set(s) of initial values which can be used in PIN optimization routines.
1 2 | initial_vals(numbuys = NULL, numsells = NULL, method = "HAC",
length = 5, num_clust = 5, details = FALSE)
|
numbuys |
numeric: vector of daily buys |
numsells |
numeric: vector of daily sells |
method |
character Switch between algorithms for generating initial values, valid choices are: 'Grid', 'HAC' and 'HAC_Ref' |
length |
numeric length of equidistant sequence from 0.1 to 0.9 for parameters of grid search algorithm, defaults to 5, irrelevant for HAC and refined HAC method |
num_clust |
numeric only relevant for refined HAC method, total number of clusters trading data is grouped into
equals |
details |
logical only relevant for grid search,
if |
Matrix with set(s) of initial values for PIN model optimization.
If method = 'Grid'
and details = TRUE
a list with four elements is returned:
Matrix of sets of initial values
Number of infeasible sets due to negative values for intensity of uninformed sells
Number of infeasible sets due to intensity of informed trading larger than any daily buys and sells data
Total number of removed sets of initial values
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
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
doi: 10.1080/14697688.2015.1023336
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
doi: 10.1016/j.jbankfin.2011.08.003
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Loading simulated datasets
data("BSinfrequent")
data("BSfrequent")
data("BSheavy")
# Grid Search
grid <- initial_vals(numbuys = BSinfrequent[,"Buys"],
numsells = BSinfrequent[,"Sells"],
method = "Grid")
# Grid Search: Detailed Output
grid_detailed <- initial_vals(numbuys = BSinfrequent[,"Buys"],
numsells = BSinfrequent[,"Sells"],
method = "Grid", details = TRUE)
# HAC
hac <- initial_vals(numbuys = BSfrequent[,"Buys"],
numsells = BSfrequent[,"Sells"],
method = "HAC")
# Refined HAC
hac_ref <- initial_vals(numbuys = BSheavy[,"Buys"],
numsells = BSheavy[,"Sells"],
method = "HAC_Ref")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.