correct_trades: Corrects mis-specified trades data

Description Usage Arguments Details Value See Also Examples

Description

Calling correct_trades() on simulated mis-specified trades data corrects the mis-specifications. This becomes handy when using simulated data in comparison studies of e.g. estimators, etc.

Usage

1

Arguments

trades

A data.frame containing the trades data. This must have the columns MisBuy, MisSell, Buy, and Sell specified.

Details

Mis-specified trades are recorded in the columns MisBuy and MisSell for buy and sell trades respectively. This information is used to re-construct the well-specified trades data.

Value

A data.frame containing the re-constructed well-specified trades data.

See Also

Examples

1
2
3
4
5
6
# 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)
trades_data_corr <- correct_trades(trades = trades_data)                        
head(trades_data_corr)

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