Learn R Programming

⚠️There's a newer version (1.0.1) of this package.Take me there.

highfrequency (version 0.5.3)

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.

Copy Link

Version

Install

install.packages('highfrequency')

Monthly Downloads

1,788

Version

0.5.3

License

GPL (>= 2)

Maintainer

Last Published

March 3rd, 2018

Functions in highfrequency (0.5.3)

getPrice

get price column(s) from a timeseries
has.Qty

check for Trade, Bid, and Ask/Offer (BBO/TBBO), Quantity, and Price data
aggregatePrice

Aggregate a time series but keep first and last observation
TAQLoad

Load trade or quote data into R
noZeroPrices

Delete the observations where the price is zero
minRV

minRV
heavyModel

HEAVY Model estimation
rHYCov

Hayashi-Yoshida Covariance
makePsd

Returns the positive semidinite projection of a symmetric matrix using the eigenvalue method
rCumSum

Plot cummulative returns
makeReturns

Compute log returns
rOWCov

Realized Outlyingness Weighted Covariance
rmTradeOutliers

Delete transactions with unlikely transaction prices
rmOutliers

Delete entries for which the mid-quote is outlying with respect to surrounding entries
heavyModelC

HEAVY Model estimation using C code
getTradeDirection

Get trade direction
rRTSCov

Robust two time scale covariance estimation
matchTradesQuotes

Match trade and quote data
medRQ

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

medRV
highfrequency-package

Tools For Highfrequency Data Analysis
sample_tdataraw

Sample of raw trades for stock XXX for 1 day
mergeTradesSameTimestamp

Merge multiple transactions with the same time stamp
rKernel.available

Available Kernels
lltc.xts

LLTC Data
realized_library

The realized library from the Oxford-Man Institute of Quantitative Finance
ivInference

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

Realized Covariance: Kernel
noZeroQuotes

Delete the observations where the bid or ask is zero
sbux.xts

Starbucks Data
rAccumulation

Realized Accumulation Plot
minRQ

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

Realized BiPower Covariance
previoustick

previoustick (internal function)
mergeQuotesSameTimestamp

Merge multiple quote entries with the same time stamp
rBeta

Realized beta: a tool in measuring risk with respect to the market.
refreshTime

Synchronize (multiple) irregular timeseries by refresh time
rCov

Realized Covariance
rmLargeSpread

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

Scatterplot of aligned returns
rThresholdCov

Threshold Covariance
rTSCov

Two time scale covariance estimation
rZero

Calculates the percentage of co-zero returns at a specified sampling period
harModel

HAR model estimation (Heterogeneous Autoregressive model for Realized volatility)
rmNegativeSpread

Delete entries for which the spread is negative
tqLiquidity

Calculate numerous (23) liquidity measures
salesCondition

Delete entries with abnormal Sale Condition.
sample_5minprices

Ten artificial time series for the NYSE trading days during January 2010
tradesCleanupFinal

Perform a final cleaning procedure on trade data
sample_qdataraw

Sample of raw quotes for stock XXX for 1 day
sample_real5minprices

Sample of imaginary price data for 61 days
selectExchange

Retain only data from a single stock exchange
quotesCleanup

Cleans quote data
rAVGCov

Realized Covariance: Average Subsample
rMPV

Realized multipower variation (MPV), an estimator of integrated power variation.
tradesCleanup

Cleans trade data
spotvol

Spot volatility estimation
rMarginal

Maginal Contribution to Realized Estimate
sample_5minprices_jumps

Ten artificial time series (including jumps) for the NYSE trading days during January 2010
sample_qdata

Sample of cleaned quotes for stock XXX for 1 day
sample_returns_5min

Sample returns data
sample_tdata

Sample of cleaned trades for stock XXX for 1 day
BNSjumptest

Barndorff- Nielsen and Shephard (2006) 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.
JOjumptest

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

Extract data from an xts object for the Exchange Hours Only
rSkew

Realized skewness of highfrequency return series.
rTPVar

Realized tri-power variation of highfrequency return series.
rQuar

Realized quarticity of highfrequency return series.
MRC

Modulated Realized Covariance (MRC): Return univariate or multivariate preaveraged estimator.
rQPVar

Realized quad-power variation of highfrequency return series.
rKurt

Realized kurtosis of highfrequency return series.
convert

Convert trade or quote data into xts object saved in the RData format
aggregatets

Aggregate a time series
aggregateTrades

Aggregate an xts object containing trade data
rSV

Realized semivariance of highfrequency return series.
aggregateQuotes

Aggregate an xts object containing quote data
autoSelectExchangeTrades

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

Retain only data from the stock exchange with the highest volume