Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.0.2
Date: 2025-12-08 09:28:36 UTC
SHA: bd4cf71f9dcbb8f796c5e3b40a85313f57466171
Version: 1.0.3
Date: 2026-01-05 14:28:03 UTC
SHA: fddb6336ed9cf644e367f8c070e7cf9bb0347c87
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: highfrequency
Version: 1.0.2
Date: 2025-12-06
Version: 1.0.3
Date: 2026-01-05
Title: Tools for Highfrequency Data Analysis
Authors@R: c(
person("Kris", "Boudt", , "kris.boudt@ugent.be", role = c("aut", "cre"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## highfrequency 1.0.3

- Bug fix: time zone handling via Github issue #104.

## highfrequency 1.0.2

- Bug fix: spotVol had some clash arguments when specifying m
Expand Down
8 changes: 4 additions & 4 deletions R/dataHandling.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ aggregatePrice <- function(pData, alignBy = "minutes", alignPeriod = 1, marketOp



timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
if(is.null(timeZone) || timeZone == ""){
if(is.null(tz)){
tz <- "UTC"
Expand Down Expand Up @@ -1998,7 +1998,7 @@ rmOutliersTrades <- function (pData, maxi = 10, window = 50, type = "advanced",
pData[, SYMBOL := "UNKNOWN"]
}

timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
if(is.null(timeZone) || timeZone == ""){
if(is.null(tz)){
tz <- "UTC"
Expand Down Expand Up @@ -2786,7 +2786,7 @@ businessTimeAggregation <- function(pData, measure = "volume", obs = 390, bandwi
}
}

timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
if(is.null(timeZone) || timeZone == ""){
if(is.null(tz)){
tz <- "UTC"
Expand Down Expand Up @@ -2943,7 +2943,7 @@ makeOHLCV <- function(pData, alignBy = "minutes", alignPeriod = 5, tz = NULL){
pData <- pData[, list(DT, PRICE, SIZE, SYMBOL)]
}

timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
if(is.null(timeZone) || timeZone == ""){
if(is.null(tz)){
tz <- "UTC"
Expand Down
5 changes: 3 additions & 2 deletions R/driftBursts.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ driftBursts <- function(pData, testTimes = seq(34260, 57600, 60),
stop("pData must have columns DT and PRICE")
}

timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
if(is.null(timeZone) || timeZone == ""){
tz <- "UTC"
pData[, DT := as.POSIXct(format(DT, digits = 20, nsmall = 20), tz = tz)]
Expand Down Expand Up @@ -274,6 +274,7 @@ driftBursts <- function(pData, testTimes = seq(34260, 57600, 60),
return(lDriftBursts)
}


#' Plotting method for \code{DBH} objects
#' @param x an object of class \code{DBH}
#' @param ... optional arguments, see details
Expand Down Expand Up @@ -334,7 +335,7 @@ plot.DBH <- function(x, ...){
stop("pData must have columns DT and PRICE")
}

timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
if(is.null(timeZone) || timeZone == ""){
tz <- "UTC"
pData[, DT := as.POSIXct(format(DT, digits = 20, nsmall = 20), tz = tz)]
Expand Down
6 changes: 5 additions & 1 deletion R/internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ checkMultiDays <- function(x) {
}
}


### The time zone, or NULL if it could not be determined
#' @keywords internal
getTimeZone <- function(dt) {
attr(dt$DT, "tzone")
}


### functions used to calculate whether a burst of drift has occured.
Expand Down
2 changes: 1 addition & 1 deletion R/jumpTests.R
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ intradayJumpTest <- function(pData, volEstimator = "RM", driftEstimator = "none"
}
}

timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
if(is.null(timeZone) || timeZone == ""){
if(is.null(tz)){
tz <- "UTC"
Expand Down
2 changes: 1 addition & 1 deletion R/realizedMeasures.R
Original file line number Diff line number Diff line change
Expand Up @@ -4198,7 +4198,7 @@ rBACov <- function(pData, shares, outstanding, nonEquity, ETFNAME = "ETF",
setkey(pData, "DT")
# setkey(backup, "DT")

timeZone <- format(pData$DT[1], format = "%Z")
timeZone <- getTimeZone(pData)
tz <- NULL
if(is.null(timeZone) || timeZone == ""){
if(is.null(tz)){
Expand Down
3 changes: 2 additions & 1 deletion R/spotVolAndDrift.R
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,8 @@ spotDrift <- function(data, method = "mean", alignBy = "minutes", alignPeriod =
#' \dontrun{
#' vol5 <- spotVol(sampleOneMinuteData[, list(DT, PRICE = MARKET)],
#' method = "piecewise", m = 200, n = 100, online = FALSE)
#' plot(vol5)}
#' plot(vol5)
#' }
#'
#' # Compare regular GARCH(1,1) model to eGARCH, both with external regressors
#' \dontrun{
Expand Down
3 changes: 2 additions & 1 deletion man/spotVol.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.