refreshTime: Synchronize (multiple) irregular timeseries by refresh time

Description Usage Arguments Value Author(s) References Examples

Description

This function implements the refresh time synchronization scheme proposed by Harris et al. (1995). It picks the so-called refresh times at which all assets have traded at least once since the last refresh time point. For example, the first refresh time corresponds to the first time at which all stocks have traded. The subsequent refresh time is defined as the first time when all stocks have again traded. This process is repeated untill the end of one time series is reached.

Usage

1
refreshTime(pdata)

Arguments

pdata

a list. Each list-item contains an xts object containing the original time series (one day only and typically a price series).

Value

An xts object containing the synchronized time series.

Author(s)

Jonathan Cornelissen and Kris Boudt

References

Harris, F., T. McInish, G. Shoesmith, and R. Wood (1995). Cointegration, error correction, and price discovery on infomationally linked security markets. Journal of Financial and Quantitative Analysis 30, 563-581.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#suppose irregular timepoints:
start = as.POSIXct("2010-01-01 09:30:00")
ta = start + c(1,2,4,5,9);    	
tb = start + c(1,3,6,7,8,9,10,11);

#yielding the following timeseries:
a = as.xts(1:length(ta),order.by=ta);
b = as.xts(1:length(tb),order.by=tb);

#Calculate the synchronized timeseries:
refreshTime(list(a,b))

Example output

Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

                    [,1] [,2]
2010-01-01 09:30:01    1    1
2010-01-01 09:30:03    2    2
2010-01-01 09:30:06    4    3
2010-01-01 09:30:09    5    6
Warning message:
timezone of object (GMT) is different than current timezone (). 

highfrequency documentation built on May 2, 2019, 6:09 p.m.