Package: highfrequency 1.0.0

Kris Boudt

highfrequency: Tools for Highfrequency Data Analysis

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 paper "Analyzing Intraday Financial Data in R: The highfrequency Package" by Boudt, Kleen, and Sjoerup (2022, <doi:10.18637/jss.v104.i08>). The DOI in the CITATION is for a new Journal of Statistical Software publication that will be registered after publication on CRAN. A working paper version can be found on SSRN: <doi:10.2139/ssrn.3917548>.

Authors:Kris Boudt [aut, cre], Jonathan Cornelissen [aut], Scott Payseur [aut], Giang Nguyen [ctb], Onno Kleen [aut], Emil Sjoerup [aut]

highfrequency_1.0.0.tar.gz
highfrequency_1.0.0.zip(r-4.5)highfrequency_1.0.0.zip(r-4.4)highfrequency_1.0.0.zip(r-4.3)
highfrequency_1.0.0.tgz(r-4.4-x86_64)highfrequency_1.0.0.tgz(r-4.4-arm64)highfrequency_1.0.0.tgz(r-4.3-x86_64)highfrequency_1.0.0.tgz(r-4.3-arm64)
highfrequency_1.0.0.tar.gz(r-4.5-noble)highfrequency_1.0.0.tar.gz(r-4.4-noble)
highfrequency_1.0.0.tgz(r-4.4-emscripten)highfrequency_1.0.0.tgz(r-4.3-emscripten)
highfrequency.pdf |highfrequency.html
highfrequency/json (API)
NEWS

# Install 'highfrequency' in R:
install.packages('highfrequency', repos = c('https://jonathancornelissen.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/jonathancornelissen/highfrequency/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

7.39 score 147 stars 314 scripts 1.8k downloads 86 exports 17 dependencies

Last updated 2 years agofrom:967dc40e0f. Checks:OK: 1 ERROR: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 07 2024
R-4.5-win-x86_64ERRORNov 07 2024
R-4.5-linux-x86_64ERRORNov 07 2024
R-4.4-win-x86_64ERRORNov 07 2024
R-4.4-mac-x86_64ERRORNov 07 2024
R-4.4-mac-aarch64ERRORNov 07 2024
R-4.3-win-x86_64ERRORNov 07 2024
R-4.3-mac-x86_64ERRORNov 07 2024
R-4.3-mac-aarch64ERRORNov 07 2024

Exports:aggregatePriceaggregateQuotesaggregateTradesaggregateTSAJjumpTestautoSelectExchangeQuotesautoSelectExchangeTradesBNSjumpTestbusinessTimeAggregationdriftBurstsexchangeHoursOnlygatherPricesgetAlphaVantageDatagetCriticalValuesgetLiquidityMeasuresgetTradeDirectionHARmodelHEAVYmodelintradayJumpTestIVinferenceJOjumpTestknChooseReMeDIleadLaglistAvailableKernelslistCholCovEstimatorsmakeOHLCVmakePsdmakeReturnsmakeRMFormatmatchTradesQuotesmergeQuotesSameTimestampmergeTradesSameTimestampnoZeroPricesnoZeroQuotesplotTQDataquotesCleanuprankJumpTestrAVGCovrBACovrBetarBPCovrCholCovrCovrefreshTimeReMeDIReMeDIAsymptoticVariancerHYCovrKernelCovrKurtrMedRQrMedRQuarrMedRVrMedRVarrMinRQrMinRQuarrMinRVrMinRVarrmLargeSpreadrmNegativeSpreadrmOutliersQuotesrMPVrMPVarrMRCrMRCovrmTradeOutliersUsingQuotesrOWCovrQPVarrQuarrRTSCovrRVarrSemiCovrSkewrSVrSVarrThresholdCovrTPQuarrTSCovRVsalesConditionselectExchangespotDriftspotVolspreadPricestradesCleanuptradesCleanupUsingQuotestradesCondition

Dependencies:curldata.tableDEoptimRjsonlitelatticenumDerivquantmodRcppRcppArmadilloRcppRollrobustbaseRsolnpsandwichtruncnormTTRxtszoo

Readme and manuals

Help Manual

Help pageTopics
highfrequency: Tools for Highfrequency Data Analysishighfrequency-package highfrequency
Aggregate a time series but keep first and last observationaggregatePrice
Aggregate a 'data.table' or 'xts' object containing quote dataaggregateQuotes
Aggregate a 'data.table' or 'xts' object containing trades data´aggregateTrades
Aggregate a time seriesaggregateTS
Ait-Sahalia and Jacod (2009) tests for the presence of jumps in the price series.AJjumpTest
Retain only data from the stock exchange with the highest volumeautoSelectExchangeQuotes
Retain only data from the stock exchange with the highest trading volumeautoSelectExchangeTrades
Barndorff-Nielsen and Shephard (2006) tests for the presence of jumps in the price series.BNSjumpTest
Business time aggregationbusinessTimeAggregation
Inference on drift burst hypothesisdriftBursts
Extract data from an 'xts' object for the exchange hours onlyexchangeHoursOnly
Make TAQ formatgatherPrices
Get high frequency data from Alpha VantagegetAlphaVantageData
Get critical value for the drift burst hypothesis t-statisticgetCriticalValues getCriticalValues.DBH
Compute Liquidity MeasuregetLiquidityMeasures
Get trade directiongetTradeDirection
Heterogeneous autoregressive (HAR) model for realized volatility model estimationHARmodel
HEAVY model estimationHEAVYmodel
Estimators of the integrated covarianceICov
Intraday jump testsintradayJumpTest
Estimators of the integrated varianceIVar
Function returns the value, the standard error and the confidence band of the integrated variance (IV) estimator.IVinference
Jiang and Oomen (2008) tests for the presence of jumps in the price series.JOjumpTest
ReMeDI tuning parameterknChooseReMeDI
Lead-Lag estimationleadLag
Available kernelslistAvailableKernels
Utility function listing the available estimators for the CholCov estimationlistCholCovEstimators
Make Open-High-Low-Close-Volume barsmakeOHLCV
Returns the positive semidefinite projection of a symmetric matrix using the eigenvalue methodmakePsd
Compute log returnsmakeReturns
DEPRECATED use 'spreadPrices'makeRMFormat
Match trade and quote datamatchTradesQuotes
Merge multiple quote entries with the same time stampmergeQuotesSameTimestamp
Merge multiple transactions with the same time stampmergeTradesSameTimestamp
Delete the observations where the price is zeronoZeroPrices
Delete the observations where the bid or ask is zeronoZeroQuotes
Plotting method for 'DBH' objectsplot.DBH
Plotting method for HARmodel objectsplot.HARmodel
Plotting method for HEAVYmodel objectsplot.HEAVYmodel
Plot Trade and Quote dataplotTQData
Predict method for objects of type 'HARmodel'predict.HARmodel
Iterative multi-step-ahead forecasting for HEAVY modelspredict.HEAVYmodel
Printing method for 'DBH' objectsprint.DBH
Printing method for 'HARmodel' objectsprint.HARmodel
Cleans quote dataquotesCleanup
Rank jump testrankJumpTest
Realized covariances via subsample averagingrAVGCov
rBACovrBACov
Realized betarBeta
Realized bipower covariancerBPCov
CholCov estimatorrCholCov
Realized covariancerCov
Synchronize (multiple) irregular timeseries by refresh timerefreshTime
ReMeDIReMeDI
Asymptotic variance of ReMeDI estimatorReMeDIAsymptoticVariance
Hayashi-Yoshida covariancerHYCov
Realized kernel estimatorrKernelCov
Realized kurtosis of highfrequency return series.rKurt
DEPRECATEDrMedRQ
An estimator of integrated quarticity from applying the median operator on blocks of three returnsrMedRQuar
DEPRECATEDrMedRV
rMedRVarrMedRVar
DEPRECATEDrMinRQ
An estimator of integrated quarticity from applying the minimum operator on blocks of two returnsrMinRQuar
DEPRECATEDrMinRV
rMinRVarrMinRVar
Delete entries for which the spread is more than 'maxi' times the median spreadrmLargeSpread
Delete entries for which the spread is negativermNegativeSpread
Remove outliers in quotesrmOutliersQuotes
DEPRECATEDrMPV
Realized multipower variationrMPVar
DEPRECATED rMRCrMRC
Modulated realized covariancerMRCov
Delete transactions with unlikely transaction pricesrmTradeOutliersUsingQuotes
Realized outlyingness weighted covariancerOWCov
Realized quad-power variation of intraday returnsrQPVar
Realized quarticityrQuar
Robust two time scale covariance estimationrRTSCov
An estimator of realized variance.rRVar
Realized semicovariancerSemiCov
Realized skewnessrSkew
DEPRECATEDrSV
Realized semivariance of highfrequency return seriesrSVar
Threshold CovariancerThresholdCov
Realized tri-power quarticityrTPQuar
Two time scale covariance estimationrTSCov
DEPRECATED DEPRECATED USE 'rRVar'RV
salesCondition is deprecated. Use tradesCondition instead.salesCondition
Multivariate tick by tick datasampleMultiTradeData
One minute datasampleOneMinuteData
Sample of cleaned quotes for stock XXX for 2 days measured in microsecondssampleQData
Sample of raw quotes for stock XXX for 2 days measured in microsecondssampleQDataRaw
Sample of cleaned trades for stock XXX for 2 dayssampleTData
European datasampleTDataEurope
Sample of raw trades for stock XXX for 2 dayssampleTDataRaw
Retain only data from a single stock exchangeselectExchange
Spot Drift EstimationspotDrift
Spot volatility estimationspotVol
Convert to format for realized measuresspreadPrices
SPY realized measuresSPYRM
Summary for 'HARmodel' objectssummary.HARmodel
Cleans trade datatradesCleanup
Perform a final cleaning procedure on trade datatradesCleanupUsingQuotes
Delete entries with abnormal trades condition.tradesCondition