initial_vals
generates set(s) of starting values
which can be used in optimization routines estimating the probability of informed trading.
It is a wrapper around the specialized functions init_grid_search
, init_hac
and
init_hac_ref
.^[
The specialized functions for generating initial values are not exported.]
Arguments numbuys
and numsells
take vectors of daily buys and sells.
The algorithm for calculating initial values can be specified via method
argument
by which the user can choose one of the previous discussed methods.
Brute force grid search algorithm can be chosen via "Grid"
,
for HAC or refined HAC algorithm method
needs to equal "HAC"
or "HAC_Ref"
.
In addition, there are method-specific arguments length
, num_clust
and details
.
The length
argument is relevant only for grid search in which
it determines the grid width by which the interval $\left[0.1, 0.9\right]$ is split.
This influences the amount of possible initial values for the probability parameters $\probinfevent$ and $\probbadnews$
as well as $\gamma$.
If details
is set to TRUE
and method = "Grid"
a list is returned with elements
representing a matrix with sets of starting values, the number of sets removed due to negative values for the intensity of uninformed sells
and guesses for the intensity of informed trading that are larger than the highest observed number of buys or sells in the data.
Otherwise, solely a matrix of initial values is returned.
Function argument num_clust
determines the number of clusters trading data is grouped into if method = "HAC_Ref"
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.