simulate_ekop_mis: Simulates mis-specified trades data

Description Usage Arguments Details Value References See Also Examples

Description

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.

Usage

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
)

Arguments

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.

Details

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.

Value

A data.frame containing the trades per day.

References

See Also

Examples

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)

simonsays1980/bayespin documentation built on Dec. 23, 2021, 2:25 a.m.