Learn R Programming

highfrequency (version 1.0.2)

Tools for Highfrequency Data Analysis

Description

Provide functionality to manage, clean and match highfrequency trades and quotes data, calculate various liquidity measures, estimate and forecast volatility, detect price jumps and investigate microstructure noise and intraday periodicity. A detailed vignette can be found in the open-access paper "Analyzing Intraday Financial Data in R: The highfrequency Package" by Boudt, Kleen, and Sjoerup (2022, ).

Copy Link

Version

Install

install.packages('highfrequency')

Monthly Downloads

1,693

Version

1.0.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Kris Boudt

Last Published

December 8th, 2025

Functions in highfrequency (1.0.2)

autoSelectExchangeQuotes

Retain only data from the stock exchange with the highest volume
ReMeDIAsymptoticVariance

Asymptotic variance of ReMeDI estimator
SPYRM

SPY realized measures
aggregatePrice

Aggregate a time series but keep first and last observation
autoSelectExchangeTrades

Retain only data from the stock exchange with the highest trading volume
aggregateTS

Aggregate a time series
ReMeDI

ReMeDI
aggregateTrades

Aggregate a data.table or xts object containing trades data´
aggregateQuotes

Aggregate a data.table or xts object containing quote data
businessTimeAggregation

Business time aggregation
driftBursts

Inference on drift burst hypothesis
exchangeHoursOnly

Extract data from an xts object for the exchange hours only
highfrequency-package

highfrequency: Tools for Highfrequency Data Analysis
getTradeDirection

Get trade direction
getCriticalValues

Get critical value for the drift burst hypothesis t-statistic
makeReturns

Compute log returns
getLiquidityMeasures

Compute Liquidity Measure
matchTradesQuotes

Match trade and quote data
mergeQuotesSameTimestamp

Merge multiple quote entries with the same time stamp
mergeTradesSameTimestamp

Merge multiple transactions with the same time stamp
knChooseReMeDI

ReMeDI tuning parameter
makeOHLCV

Make Open-High-Low-Close-Volume bars
intradayJumpTest

Intraday jump tests
listCholCovEstimators

Utility function listing the available estimators for the CholCov estimation
leadLag

Lead-Lag estimation
makeRMFormat

DEPRECATED use spreadPrices
getAlphaVantageData

Get high frequency data from Alpha Vantage
gatherPrices

Make TAQ format
makePsd

Returns the positive semidefinite projection of a symmetric matrix using the eigenvalue method
mukp

to use when p,k different from range [4,6]
listAvailableKernels

Available kernels
plot.HEAVYmodel

Plotting method for HEAVYmodel objects
plot.HARmodel

Plotting method for HARmodel objects
predict.HEAVYmodel

Iterative multi-step-ahead forecasting for HEAVY models
noZeroPrices

Delete the observations where the price is zero
noZeroQuotes

Delete the observations where the bid or ask is zero
plot.DBH

Plotting method for DBH objects
rCholCov

CholCov estimator
rCov

Realized covariance
plotTQData

Plot Trade and Quote data
rBACov

rBACov
rAVGCov

Realized covariances via subsample averaging
predict.HARmodel

Predict method for objects of type HARmodel
rMPV

DEPRECATED
rMedRVar

rMedRVar
rMinRQ

DEPRECATED
rKernelCov

Realized kernel estimator
rMedRQ

DEPRECATED
rKurt

Realized kurtosis of highfrequency return series.
rBeta

Realized beta
rSV

DEPRECATED
rHYCov

Hayashi-Yoshida covariance
rBPCov

Realized bipower covariance
rRTSCov

Robust two time scale covariance estimation
rMinRQuar

An estimator of integrated quarticity from applying the minimum operator on blocks of two returns
rMinRV

DEPRECATED
print.DBH

Printing method for DBH objects
rSVar

Realized semivariance of highfrequency return series
print.HARmodel

Printing method for HARmodel objects
rRVar

An estimator of realized variance.
rMedRV

DEPRECATED
rMRCov

Modulated realized covariance
rMRC

DEPRECATED rMRC
rQuar

Realized quarticity
rMedRQuar

An estimator of integrated quarticity from applying the median operator on blocks of three returns
rQPVar

Realized quad-power variation of intraday returns
rSemiCov

Realized semicovariance
quotesCleanup

Cleans quote data
rThresholdCov

Threshold Covariance
rMPVar

Realized multipower variation
sampleQData

Sample of cleaned quotes for stock XXX for 2 days measured in microseconds
rSkew

Realized skewness
sampleOneMinuteData

One minute data
rmNegativeSpread

Delete entries for which the spread is negative
rankJumpTest

Rank jump test
rTPQuar

Realized tri-power quarticity
rOWCov

Realized outlyingness weighted covariance
rMinRVar

rMinRVar
rmOutliersQuotes

Remove outliers in quotes
sampleTDataEurope

European data
rmOutliersTrades

Remove outliers in trades without using quote data
sampleQDataRaw

Sample of raw quotes for stock XXX for 2 days measured in microseconds
sampleTData

Sample of cleaned trades for stock XXX for 2 days
rmLargeSpread

Delete entries for which the spread is more than maxi times the median spread
rmTradeOutliersUsingQuotes

Delete transactions with unlikely transaction prices
sampleTDataRaw

Sample of raw trades for stock XXX for 2 days
rTSCov

Two time scale covariance estimation
spotDrift

Spot Drift Estimation
spotVol

Spot volatility estimation
summary.HARmodel

Summary for HARmodel objects
refreshTime

Synchronize (multiple) irregular timeseries by refresh time
spreadPrices

Convert to format for realized measures
selectExchange

Retain only data from a single stock exchange
tradesCleanup

Cleans trade data
salesCondition

salesCondition is deprecated. Use tradesCondition instead.
sampleMultiTradeData

Multivariate tick by tick data
tradesCondition

Delete entries with abnormal trades condition.
tradesCleanupUsingQuotes

Perform a final cleaning procedure on trade data
IVar

Estimators of the integrated variance
IVinference

Function returns the value, the standard error and the confidence band of the integrated variance (IV) estimator.
HEAVYmodel

HEAVY model estimation
RV

DEPRECATED DEPRECATED USE rRVar
ICov

Estimators of the integrated covariance
Bj

Internal HEAVY functions
HARmodel

Heterogeneous autoregressive (HAR) model for realized volatility model estimation
BNSjumpTest

Barndorff-Nielsen and Shephard (2006) tests for the presence of jumps in the price series.
JOjumpTest

Jiang and Oomen (2008) tests for the presence of jumps in the price series.
AJjumpTest

Ait-Sahalia and Jacod (2009) tests for the presence of jumps in the price series.