xts
object for the exchange hours onlyFilter raw trade data such and return only data between market close and market open.
By default, marketOpen = "09:30:00"
and marketClose = "16:00:00"
(see Brownlees and Gallo (2006) for more information on good choices for these arguments).
exchangeHoursOnly(
data,
marketOpen = "09:30:00",
marketClose = "16:00:00",
tz = NULL
)
xts
or data.table
object depending on input.
a data.table
or xts
object containing the time series data.
Multiple days of input are allowed.
character in the format of "HH:MM:SS"
,
specifying the opening time of the exchange(s).
character in the format of "HH:MM:SS"
,
specifying the closing time of the exchange(s).
fallback time zone used in case we we are unable to identify the timezone of the data, by default: tz = NULL
. We attempt to extract the timezone from the DT column of the data, which may fail.
In case of failure we use tz
if specified, and if it is not specified, we use "UTC"
Jonathan Cornelissen, Kris Boudt, Onno Kleen, and Emil Sjoerup.
Brownlees, C. T. and Gallo, G. M. (2006). Financial econometric analysis at ultra-high frequency: Data handling concerns. Computational Statistics & Data Analysis, 51, pages 2232-2245.
exchangeHoursOnly(sampleTDataRaw)
Run the code above in your browser using DataLab