Description Usage Arguments Details Value References See Also Examples
Simulates trades data from the model by Easley, Kiefer, O'Hara and Paperman (1996). The simulation function is implemented in C++ and allows therefore usage in specific performance-sensitive scenarios, like simulating huge amounts of trade data or calling this function repeatedly in large simulations.
1 2 3 4 5 6 7 8 | simulate_ekop(
size = 1000,
alpha = 0.2,
epsilon = 0.2,
delta = 0.5,
mu = 0.02,
T = 60 * 6.5
)
|
size |
An integer specifying the number of trading days that should be simulated. |
alpha |
A double specifying the probability of an information event. |
epsilon |
A double specifying the arrival rate of uninformed traders. |
delta |
A double specifying the probability of information being good or bad. |
mu |
A double specifying the arrival rate of informed traders. |
T |
A double defining the length of a trading day in minutes. |
The functions returns a data.frame
with named columns MisBuy
, MisSell
,
Buy
, Sell
, and Trades
. Buy
and Sell
are the number of buy and sell
trades per trading day and Trades
defines the sum of these amounts.
MisBuy
and MisSell
are only added to allow for a standardization of
input data to the estimation functions of the bayespin
package. The
corresponding simulation function simulate_ekop_mis()
simulates
mis-specified trades data and returns in the fields MisBuy
and MisSell
the number of mis-specified buy and sell trades per trading day respectively.
A data.frame
containing the trades per day.
Easley, D., Kiefer, N., O’Hara, M., Paperman, J., 1996. Liquidity, information, and infrequently traded stocks. Journal of Finance 51, 1405–1436.
Grammig, J., Theissen, E., Zehnder, L.S., 2015. Bayesian Estimation of the Probability of Informed Trading. Conference on Financial Econometrics & Empirical Asset Pricing 2016, Lancaster University
simulate_ekop_mis()
for simulating mis-specified trades data
1 2 3 4 5 | # Simulate trades data for 1000 trading dates with a trading day lasting
# 6.5 hours.
trades_data <- simulate_ekop(size = 1000, alpha = .3, epsilon = .4,
delta = .5, mu = .04, T = 60*6.5)
head(trades_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.