Description Usage Arguments Details Value References See Also Examples
Simulates mis-specified 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 9 | simulate_ekop_mis(
size = 1000,
alpha = 0.2,
epsilon = 0.2,
delta = 0.5,
mu = 0.02,
T = 60 * 6.5,
mis = 0.15
)
|
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. |
mis |
A double specifying the mis-sepcification rate for trades. |
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
define 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()
for simulating trades data without mis-specification
correct_trades()
to reconstruct original trades data from mis-specified
ones
1 2 3 4 5 | # Simulate mis-specifed trades data for 1000 trading dates with a trading
# day lasting 6.5 hours.
trades_data <- simulate_ekop_mis(size = 1000, alpha = .3, epsilon = .4,
delta = .5, mu = .04, T = 60*6.5, mis = .1)
head(trades_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.