Title: | Manage Tick-by-Tick Transaction Data |
---|---|
Description: | Manager of tick-by-tick transaction data that performs 'cleaning', 'aggregation' and 'import' in an efficient and fast way. The package engine, written in C++, exploits the 'zlib' and 'gzstream' libraries to handle gzipped data without need to uncompress them. 'Cleaning' and 'aggregation' are performed according to Brownlees and Gallo (2006) <DOI:10.1016/j.csda.2006.09.030>. Currently, TAQMNGR processes raw data from WRDS (Wharton Research Data Service, <https://wrds-web.wharton.upenn.edu/wrds/>). |
Authors: | Francesco Calvori, Fabrizio Cipollini, Giampiero M. Gallo and 'gzstream' authors. |
Maintainer: | Fabrizio Cipollini <[email protected]> |
License: | GPL (>= 2) |
Version: | 2018.5-1 |
Built: | 2024-11-24 06:42:19 UTC |
Source: | CRAN |
Manage tick-by-tick transaction data
TAQ.CleanTickByTick(dirInput, dirOutput, window = 80, deltaTrimmed = 0.10, granularity = 0.04, useCleaned = TRUE) TAQ.Aggregate(dirInput, symbol, bin, useAggregated = TRUE) TAQ.Report(dirInput, symbol) TAQ.Read(dirInput, symbol, import = NULL, startDate, endDate, bin)
TAQ.CleanTickByTick(dirInput, dirOutput, window = 80, deltaTrimmed = 0.10, granularity = 0.04, useCleaned = TRUE) TAQ.Aggregate(dirInput, symbol, bin, useAggregated = TRUE) TAQ.Report(dirInput, symbol) TAQ.Read(dirInput, symbol, import = NULL, startDate, endDate, bin)
dirInput |
A character scalar: the input directory. |
dirOutput |
A character scalar: the output directory.
It must be different from |
window |
A numeric integer scalar: the window size for the trimming procedure of data clean (see Details). |
deltaTrimmed |
A numeric scalar into $(0,1)$: the trimming proportion (see Details). |
granularity |
A numeric positive scalar: the granularity parameter (see Details). |
useCleaned |
A logical scalar: if |
useAggregated |
A logical scalar: if |
symbol |
A character (vector in |
startDate |
A numeric integer scalar: the start date in the yyyymmdd format. |
endDate |
A numeric integer scalar: the end date in the yyyymmdd format. |
bin |
A numeric integer scalar: the bin size (in seconds) for aggregating data. |
import |
A character: the list of fields to be imported. One or more among: |
The meaning of the arguments window
, deltaTrimmed
, and granularity
is detailed in the reference below.
Brownlees, C. T., and Gallo, G. M. (2006). Financial Econometric Analysis at Ultra–High Frequency: Data Handling Concerns, Computational Statistics and Data Analysis 51, 2232–2245.
#### A fake dataset for running the example can be downloaded at #### 'http://local.disia.unifi.it/cipollini/webpage-new/data/data_sample.txt.gz' ## Input # dirInput <- "path of the input folder" # dirOutput <- "path of the output folder" ## Must be different from 'dirInput' ## Clean # TAQ.CleanTickByTick(dirInput = dirInput, dirOutput = dirInput) ## Make the report (1 at a time) # TAQ.Report(dirInput = dirOutput, symbol = c("DOG")) ## A scalar symbol # TAQ.Report(dirInput = dirOutput, symbol = c("GNU")) ## A scalar symbol ## Aggregate # TAQ.Aggregate(dirInput = dirOutput, symbol = c("DOG", "GNU"), bin = 300, # useAggregated = TRUE) ## Import data # dog <- TAQ.Read(dirInput = dirOutput, symbol = "DOG", # startDate = 00010101, endDate = 20141231, bin = 300)
#### A fake dataset for running the example can be downloaded at #### 'http://local.disia.unifi.it/cipollini/webpage-new/data/data_sample.txt.gz' ## Input # dirInput <- "path of the input folder" # dirOutput <- "path of the output folder" ## Must be different from 'dirInput' ## Clean # TAQ.CleanTickByTick(dirInput = dirInput, dirOutput = dirInput) ## Make the report (1 at a time) # TAQ.Report(dirInput = dirOutput, symbol = c("DOG")) ## A scalar symbol # TAQ.Report(dirInput = dirOutput, symbol = c("GNU")) ## A scalar symbol ## Aggregate # TAQ.Aggregate(dirInput = dirOutput, symbol = c("DOG", "GNU"), bin = 300, # useAggregated = TRUE) ## Import data # dog <- TAQ.Read(dirInput = dirOutput, symbol = "DOG", # startDate = 00010101, endDate = 20141231, bin = 300)
The package manages tick-by-tick transaction data, performing cleaning, aggregation and import.
The package manages tick-by-tick transaction data, performing cleaning, aggregation and import in an efficient and fast way (the package engine is developed in C++
).
Cleaning and Aggregation are performed according to Brownlees and Gallo (2006).
Package: | TAQMNGR |
Type: | Package |
Version: | 2015.2-1 |
Date: | 2015-02-21 |
License: | GPL (>= 2) |
Currently, the package processes raw data from WRDS (Wharton Research Data Service).
They have to satisfy the following requirements:
all fields have to be included (select the 'Check All
' button at the WRDS downloading page);
select the fixed-width text and 'G zip
' as output format and compression type, respectively, at the WRDS downloading page.
An example with fake raw data can be downloaded at http://local.disia.unifi.it/cipollini/webpage-new/data/data_sample.txt.gz.
The package uses the following libraries: 'Gzstream' (available at 'http://www.cs.unc.edu/Research/compgeom/gzstream/' under LGPL license), and 'zlib' (freely available at 'http://www.zlib.net/').
Francesco Calvori <[email protected]>,
Fabrizio Cipollini <[email protected]>,
Giampiero M. Gallo <[email protected]>.
Maintainer: <[email protected]>
Brownlees, C. T., and Gallo, G. M. (2006). Financial Econometric Analysis at Ultra–High Frequency: Data Handling Concerns, Computational Statistics and Data Analysis 51, 2232–2245.