The class dataset
is a blueprint of S4
objects that store
the result of simulation of the aggregate daily trading data.
Details
theoreticals
are the parameters used to generate the daily buys
and sells. empiricals
are computed from the generated daily buys and sells.
If we generate data for a 60 days using \(\alpha\)=0.1, the most likely
outcome is to obtain 6 days (0.1 x 60) as
information event days. In this case, the theoretical value of
\(\alpha\)=0.1
is equal to the empirically estimated value of
\(\alpha\)=6/60=0.1
.
The number of generated information days can, however, be different from 6
;
say 5
. In this case, empirical (actual) \(\alpha\) parameter derived
from the generated numbers would be 5/60=0.0833
, which differs from the
theoretical \(\alpha\)=0.1
.
The weak law of large numbers ensures the empirical parameters (empiricals
)
converge towards the theoretical parameters (theoreticals
) when the number
of days becomes very large.
To detect the estimation biases from the models/methods, comparing the
estimates with empiricals
rather than theoreticals
would yield more
realistic results.
Slots
model
(
character
) returns the model being simulated, either"MPIN"
, or"adjPIN"
.days
(
numeric
) returns the length of the generated data in days.layers
(
numeric
) returns the number of information layers in the simulated data. It takes the value1
for the adjusted PIN model, i.e. whenmodel
takes the value'adjPIN'
.theoreticals
(
list
) returns the list of the theoretical parameters used to generate the data.empiricals
(
list
) returns the list of the empirical parameters computed from the generated data.aggregates
(
numeric
) returns an aggregation of information layers' empirical parameters alongside with \(\epsilon\)b and \(\epsilon\)s. The aggregated parameters are calculated as follows: \(\alpha_{agg} = \sum \alpha_j\)\(\alpha*= \sum \alpha\)j \(\delta_{agg} = \sum \alpha_j \times \delta_j\) \(\delta*= \sum \alpha\)j\(\delta\)j, and \(\mu_{agg} = \sum \alpha_j \times \mu_j\)\(\mu*= \sum \alpha\)j\(\mu\)j.emp.pin
(
numeric
) returns thePIN/MPIN/AdjPIN
value derived from the empirically estimated parameters of the generated data.data
(
dataframe
) returns a dataframe containing the generated data.likelihood
(
numeric
) returns the value of the (log-)likelihood function evaluated at the empirical parameters.warnings
(
character
) stores warning messages for events that occurred during the data generation, such as conflict between two arguments.restrictions
(
list
) returns a binary list that contains the set of parameter restrictions on the original AdjPIN model in the estimated AdjPIN model. The restrictions are imposed equality constraints on model parameters. If the value of the parameterrestricted
is the empty list(list())
, then the model has no restrictions, and the estimated model is the unrestricted, i.e., the original AdjPIN model. If not empty, the list contains one or multiple of the following four elements{theta, mu, eps, d}
. For instance, Iftheta
is set toTRUE
, then the estimated model has assumed the equality of the probability of liquidity shocks in no-information, and information days, i.e., \(\theta\)=
\(\theta'\). If any of the remaining rate elements{mu, eps, d}
is equal toTRUE
, (saymu=TRUE
), then the estimated model imposed equality of the concerned parameter on the buy side, and on the sell side (\(\mu\)b=
\(\mu\)s). If more than one element is equal toTRUE
, then the restrictions are combined. For instance, if the slotrestrictions
containslist(theta=TRUE, eps=TRUE, d=TRUE)
, then the estimated AdjPIN model has three restrictions \(\theta\)=
\(\theta'\), \(\epsilon\)b=
\(\epsilon\)s, and \(\Delta\)b=
\(\Delta\)s, i.e., it has been estimated with just7
parameters, in comparison to10
in the original unrestricted model.[i]
This slot only concerns datasets generated by the functiongeneratedata_adjpin()
.